แสดงบทความที่มีป้ายกำกับ tunning แสดงบทความทั้งหมด
แสดงบทความที่มีป้ายกำกับ tunning แสดงบทความทั้งหมด

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

วันพฤหัสบดีที่ 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 :

วันศุกร์ที่ 8 มกราคม พ.ศ. 2553

swappiness tuning linux

vm.swappiness is a tunable kernel parameter that controls how much the kernel favors swap over RAM. At the source code level, it’s also defined as the tendency to steal mapped memory. A high swappiness value means that the kernel will be more apt to unmap mapped pages. A low swappiness value means the opposite, the kernel will be less apt to unmap mapped pages. In other words, the higher the vm.swappiness value, the more the system will swap.

More to read : http://www.linuxvox.com/2009/10/what-is-the-linux-kernel-parameter-vm-swappiness/

The following is the test. It seems that the higher swapiness the slower i/o rate. More to read : http://lwn.net/Articles/100978/