Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Im using eAccelerator 0.9.5.2, CentOS 5.3, lighttpd 1.4.22

But because eAccelerator is cached in RAM, I needs too much RAM. So Im trying to cache in hard disk. (my website is not generate money, so Im thinking about cheaper solution)

So, I modify /etc/php.d/eaccelerator.ini with below codes:
extension="eaccelerator.so"
eaccelerator.shm_size="12"
eaccelerator.cache_dir="/var/cache/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="0"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="20M"
eaccelerator.shm_ttl="1800"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="0"
eaccelerator.compress_level="9"
eaccelerator.keys="disk_only"
eaccelerator.sessions="disk_only"
eaccelerator.content="disk_only"

So, the output of phpinfo() as below:
http://img175.imageshack.us/img175/1104/screenshggot.png

But after using "disk_only" in eAccelerator and restart lighttpd & php-cgi using killall, my RAM usage is still high for php-cgi. Reboot the server also not works.

The data is created in cache directory, but RAM usage is still high.

share|improve this question

Try changing eaccelerator.shm_size="12" with eaccelerator.disk_size="12"

share|improve this answer

Make sure that your cache_dir (/var/cache/eaccelerator) exists and is writable by everyone. Usually it's in the temp (/tmp) directory.

share|improve this answer
    
I think that you do NOT want it to be writable by everyone. That's a security hole because that code gets executed, and you're letting anyone write to the files that are getting executed. – Andy Lester Oct 14 '10 at 4:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.