This is a discussion on Lighttpd eating more RAM than Apache. within the Web servers forums, part of the Mastering Servers category; I am in mid phase of replacing apache with lighttpd , I have 600 MB RAM , when apache runs ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
|||
|
I am in mid phase of replacing apache with lighttpd , I have 600 MB RAM , when apache runs alone it eats 200 MB RAM where as lighttpd eats 550 MB RAM in same conditions
.Site functions faster with lighttpd but during peak hours lighttpd crashes since it goes short of RAM . below is my main settings of lighttpd , plz tell what changes should i make PHP Code:
|
| Sponsored Links | ||
|
|
|
||||
|
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"
))
)
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 |
|
|||
|
I used your settings but lighttpd eated all the RAM , as more than 30 instance of php-cgi were started as soon lighttpd was started .
and i got two big sites alexa ranking of one is 5K ----------its file/ image sharing (thubnails enabled) the other is an IPB forum alexa ranking 15K I hv no idea how much php request i get , hope you hav estimated it with abv information also i am already using xcache .I think mysql is tuned since it takes only 10% of RAM. |
|
|||
|
well i dnt got fastcgi.debug anywhere in my lighttpd.conf ,
using monit n top cmmand i come to conclusion lighttpd eating ram , fastcgi.active-requests: 2 fastcgi.backend.0.0.connected: 55701 fastcgi.backend.0.0.died: 0 fastcgi.backend.0.0.disabled: 0 fastcgi.backend.0.0.load: 2 fastcgi.backend.0.0.overloaded: 0 fastcgi.backend.0.load: 3 fastcgi.requests: 55701 |
![]() |
| Bookmarks |
| Tags |
| fastcgi , lighttpd |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| lighttpd ProxyPass | thunderbirdsei | Web servers | 0 | 04-30-2008 10:50 PM |
| Can lighttpd access log be filtered? | petu | Web servers | 2 | 01-18-2008 10:59 AM |
| Apache and lighttpd together | anjanesh | Web servers | 4 | 08-29-2007 05:11 PM |
| redirect to www in lighttpd | muks | Web servers | 11 | 06-02-2007 10:55 PM |
| lighttpd user cgi-bin setup | chiku | All about FreeBSD/OpenBSD/NetBSD | 1 | 12-15-2006 01:52 AM |