View Single Post

  #2 (permalink)  
Old 06-25-2008, 06:40 PM
rockdalinux's Avatar
rockdalinux rockdalinux is offline
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 581
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

I don't wanna believe you. Are you sure about memory issue? Do you run lighttpd in VPS server or dedicated server? How many PHP requests per second do you need? If you need 25 PHP requests per/sec, then
25 * 0.1sec/php = 2.5 php process. Let us round it to 3 process. Here is some optimized config:
Code:
fastcgi.server    = ( ".php" =>
        ((
                "bin-path" => "/usr/bin/php-cgi",
                "socket" => "/tmp/php-cgi.socket",
                "max-procs" => 3,
                "idle-timeout" => 30,
                "bin-environment" => (
                        "PHP_FCGI_CHILDREN" => "50",
                        "PHP_FCGI_MAX_REQUESTS" => "500"
                ),
                "bin-copy-environment" => (
                        "PATH", "SHELL", "USER"
                ),
                "broken-scriptfilename" => "enable"
        ))
)
Once updated you need to install xcache
Redhat / CentOS / Fedora Linux Install XCache for PHP 5
XCache - Boost PHP Performance - Trac

You also need to optimize mysql by enabling mysql query cache
MySQL :: MySQL 5.0 Reference Manual :: 7.5.4 The MySQL Query Cache
Enable the query cache in MySQL to improve performance

Also note that sometime VPS put restrictions on open file and connections.
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote