Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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.