Improvement the lighttpd performance with kernel 2.6
The reason as the title. Follow below items for perform it. Adjust the virtual H/W to two CPU and 2G RAM.
- Compile the CentOS 4.2 kernel-2.6.9-55.EL.src.rpm with –target=i686
- vi /etc/php-fpm.conf
listen.allowed_clients = 127.0.0.1
listen = 127.0.0.1:9000 - vi /etc/lighttpd/conf.d/fastcgi.conf for update fastcgi as below settings.
fastcgi.server += ( ".php" =>
("localhost" =>
(
#"socket" => socket_dir + "/php-fastcgi.socket",
#"bin-path" => "/usr/bin/php-cgi",
"max-procs" => 5,
"host" => "127.0.0.1",
"port" => "9000",
"broken-scriptfilename" => "enable",
))
) - vi /etc/lighttpd/lighttpd.conf
server.event-handler = "linux-sysepoll" - Make sure the php-fpm service start before the lighttpd service start at system booting.