Share » Forums » Developer » eAccelerator slows my website down?

eAccelerator slows my website down?

eAccelerator slows my website down?

Tuesday 01 September 2009 11:12:50 am - 8 replies

Author Message

Björn Dieding@xrow.de

Tuesday 01 September 2009 2:45:41 pm

from my memory

eaccelerator.shm_only 1

and "maybe" disable

eaccelerator.content
eaccelerator.sessions

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Clemens T

Wednesday 02 September 2009 5:10:51 am

Björn,

Thanks for your response. Can you offer me extra background information as to why this setting will work (shm_only)? On a lot of other configurations here on this site people don't have that enabled, where they still get great speed. I'm not sure that's it, and unfortunately I cannot 'just' try it for a second since I'm on a shared platform.

Thanks!!

Clemens T

Wednesday 02 September 2009 5:21:27 am

for example here:
http://www.frefred.fr/blog/linux/installer-eaccelerator-pour-ez-publish

it gives these settings:

extension=eaccelerator.so
eaccelerator.shm_size="48"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="0"

I think the most important different from mine there is that compression is turned off and the memory is more than in my configuration. Are these settings any better?

Björn, I also saw your earlier post (@: http://ez.no/developer/forum/install_configuration/eaccelerator_benchmark ) regarding eAccelerator. Did you manage to fix that issue?

Your configuration while underperforming was:

eaccelerator.cache_dir = /var/cache/php-eaccelerator
eaccelerator.shm_size = 0
eaccelerator.enable = 1
eaccelerator.optimizer = 1
eaccelerator.check_mtime = 1
eaccelerator.filter = "*.php *.phtml !.cache"
eaccelerator.shm_max = 0
eaccelerator.shm_ttl = 3600
eaccelerator.shm_prune_period = 0
eaccelerator.shm_only = 1
eaccelerator.compress = 1
eaccelerator.compress_level = 9
eaccelerator.debug = 0
eaccelerator.keys = "shm_only"
eaccelerator.sessions = "shm_only"
eaccelerator.content = "shm_only"

with a lot of shm_only in it. Is that still required? How about that filter, is that at 'must'?

What are recommended settings for ezpublish?

Regards & thanks again!
Clemens

Gaetano Giunta

Wednesday 02 September 2009 7:49:02 am

By your data:

Memory Size     33,554,396 Bytes
Memory Available        1,660 Bytes
Memory Allocated        33,552,736 Bytes

It means that eA is currently using (almost) all of the shmem it can use.
Once it goes over that limit, it will start swapping cached files out of it to make room for new ones when they are needed (or not cache new ones at all - there might be a setting to control how cache pruning is done).

Try raising that value to 48 or 64 MB and see if things get better...

[EDIT]

Otoh if you already have it set to 0 it might mean that eA will allocate dynamically as much as needed, so the above suggestion might not apply.

Not enabling compression makes sense, as compressing/decompressing the cached scripts will of course take some time.

Relying only on shmem and not disk is also a good idea, as it is probable that eA currently stores the cached files on disk too - which adds a lot of IO to the disk, probably very much stressed already by eZ.

Last but not least, the filter - it should not be necessary. But your best option is to look in the eA control panel and look at the list of cached files to see what is in there...

Principal Consultant International Business
Member of the Community Project Board

Clemens T

Wednesday 02 September 2009 8:02:45 am

Hey Gaetano,

Thank you for the time you took to write the reply.

Since the memory is still not full I believe it is not the solution, the usage doesn't increase anymore either.

I will try to ask if they can enable shm_only and disable compression. Disabling compression will probably require a higher amount of memory, so I will ask for a 48MB limit.

Unfortunately I don't have admin rights to get into the admin interface of eAccelerator, I can only ask for config changes and cannot see which files are being cached etc.

I'm using ez Publish 3.9.5, and it looks as though a lot of files in de /var directory are still .php (for example: compile templates / compiled .ini). They probably have to be excluded from acceleration, or am I making a mistake here? Can I use a filter to do that?

Regards & thanks again,
Clemens

Gaetano Giunta

Wednesday 02 September 2009 10:05:15 am

Do the compiled ini and template files have to be excluded from caching?

That's a good question.

In principle, after being cached, most of those will be run many times, so caching them with an opcode cache should benefit anyway.

If they are used only once or regenerated too often, then the problem lies in your eZP cache config and you should try to fix that instead.

Some of those are basically definitions of a single php array, so the net speed gain is probably not much for those (eg. compiled ini files or translations)

All of the files that contain html chunks (template-block/*) should not be cached by eA anyway.

About not being admin: the control.php file that comes with eA does pwd checking, it's not a function of the eA api; So you can just grab a copy of it, remove the password checking, and copy it in the server and voilà, istant eA info - or you can install the ggsysinfo extension...

Principal Consultant International Business
Member of the Community Project Board

Clemens T

Wednesday 02 September 2009 11:53:38 am

Hey Gaetano,

Thanks again. I speed up the loading of the ini files by using the 'hack' I found on this site ( http://www.seeds.no/eng/ez-publish/ez-publish-tips-and-tricks/speeding-up-ez-publish-by-fixing-ini-cache/ini-cache-patch ), so they are not regenerated everytime. This doesn't work in combination with eAccelerator. I did turn off the eA for that part via .htaccess:

php_flag eaccelerator.enable 0
php_flag eaccelerator.optimizer 0

All the other settings are OK. eZPublish cache and templates are well configured so I don't have to regenerate a lot of files every other second, next to that the stuff in the template dir are .cache files, so they're probably ok too.

The hint on the controlpanel was a smart one, and it does work I get some extra info, but the list of cached files is not there. It table is empty, or I don't have the right to read any of that info at this time? Next to that I can also not purge/clear/clean caches I believe. Any thoughts on that?

Regards,
Clemens

Clemens T

Thursday 03 September 2009 5:24:28 am

OK turns out, the INI -hack doesn't work with eAccelerator. Everything has been re-set, and the following settings make my site blazing fast (0.2-0.4s per page... ):

Directive	Local Value	Master Value
eaccelerator.cache_dir	/var/cache/eaccelerator	/var/cache/eaccelerator
eaccelerator.check_mtime	1	1
eaccelerator.compress	0	0
eaccelerator.compress_level	9	9
eaccelerator.content	shm_only	shm_only
eaccelerator.debug	0	0
eaccelerator.enable	1	0
eaccelerator.filter	no value	no value
eaccelerator.keys	shm_only	shm_only
eaccelerator.log_file	/var/log/httpd/eaccelerator_log	/var/log/httpd/eaccelerator_log
eaccelerator.name_space	no value	no value
eaccelerator.optimizer	1	1
eaccelerator.sessions	shm_only	shm_only
eaccelerator.shm_max	0	0
eaccelerator.shm_only	1	1
eaccelerator.shm_prune_period	3600	3600
eaccelerator.shm_size	0	0
eaccelerator.shm_ttl	0	0

Regards & thanks to all,
Clemens

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu