--with-eaccelerator-shared-memory and performance

Skip to first unread message


Nov 22, 2010, 9:03:49 AM11/22/10
to eaccelerator
I need for a project the eaccelerator_put function which is only
available when eaccelerator is compiled with "--with-eaccelerator-

The facts that I found where
Include eaccelerator shared memory functions. The name is a bit
confusing, but this will include the eaccelerator_get, _put, ...
functions that allow scripts to store data in the eAccelelerator
cache. This options has been enabled by default until version 0.9.5.
When enabling this feature on systems where you can't trust all users,
like in shared hosting environments, this could really fill up the
cache causing all scripts to only exist on disk which isn't good for

SO this means:
If your users scripts dont clean up after themselves they will use up
all the memory cache, forcing everything else to be written to the
disk cache - which then means all those scripts will slow way down, I/
O will go up, that will slow down your entire server, users will
reload pages out of frustration, causing new I/O requests, which will
stack up the queue - slowing things down further - etc.

How can I prevent this or check if the scripts clean up correctly?


Wouldn't those configuration options (set wisely) prevent this
situation of "users scripts don't clean up after themselves they will
use up all the memory cache"
eaccelerator.shm_size = "X"

This setting will allow you to control the amount of shared memory
eAccelerator should allocate to cache PHP scripts. The number sets the
amount of memory in megabytes. Setting this value to 0 will use the
default size.
eaccelerator.shm_max = "X"

By default there is no limit on the maximum size a user can put in
shared memory with functions like eaccelerator_put, the maximum size
is controlled by this setting. This value is the maximum size that can
be put in the cache, the size is given in bytes (10240, 10K, 1M). The
default value is "0" which disables the limit.

This setting doesn't affect the maximum size for a script'''
eaccelerator.shm_ttl = "X"

When eAccelerator doesn't have enough free shared memory to cache a
new script it will remove all scripts from shared memory cache that
haven't been accessed in at least shm_ttl seconds. By default this
value is set to "0" which means that eAccelerator won't try to remove
any old scripts from shared memory.
eaccelerator.shm_prune_period = "X"

When eAccelerator doesn't have enough free shared memory to cache a
script it tries to remove old scripts if the previous try was made
more then "shm_prune_period" seconds ago. Default value is "0" which
means that eAccelerator won't try to remove any old script from shared

Thanks a lot for any help, explanation or advice


Jan 25, 2011, 4:26:10 PM1/25/11
to eaccel...@googlegroups.com
try reading http://groups.google.com/group/eaccelerator/browse_thread/thread/187520adc1d9f10a?hl=en
seems like SHM functions aren't maintained... i think that the SHM
functions belong to another extension anyway (in my opinion SHM
functions and EA functions should be completely separated, as they
serve different purposes)

> --
> You received this message because you are subscribed to the Google Groups "eaccelerator" group.
> To post to this group, send email to eaccel...@googlegroups.com.
> To unsubscribe from this group, send email to eaccelerator...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/eaccelerator?hl=en.

----THE END of this transmission----


Jan 26, 2011, 6:42:56 AM1/26/11
to eaccelerator
Thanks a lot Quamis.
Now I understand why I couldn't find much information about it and why
it is disabled.
This requirement and some other facts made me switch to another
OPCache for PHP.
Thanks again for your help.
Reply all
Reply to author
0 new messages