วันพฤหัสบดีที่ 11 กุมภาพันธ์ พ.ศ. 2553

xcache opcode/optimizer for php tunning

Installing xcache can help php-apache app responding faster.

1) installing xcache
gentoo :
#emerge cache
ubuntu/debian
#apt-get install php5-xcache

after installing you will see path for xcache admin
2) set xcache config and admin password
#echo -n "yourpassword" | md5sum
edit xcache.ini this line :
xcache.admin.pass="" (from previous command)
http://xcache.lighttpd.net/wiki/XcacheIni

3) point apache to xcache admin path

4) browse xcache admin with browser

use this admin page to see what variable need to be adjusted.

I'll point some importtatn config

xcache.size
- set just fit, not too low or too high. see OOM(out of memory column) from admin page. If there are lots of OOM, please consider increasing.

xcache.count
- set to number of your cpu : cat /proc/cpuinfo | grep -c processor

xcache.slots
- the more slot, the faster PHP code accessing


More reading here :

ไม่มีความคิดเห็น:

แสดงความคิดเห็น