Project

General

Profile

Serving 200+ concurrent users

Added by pradhanparas over 14 years ago

Hi,

I am migrating a php/mysql based webmail client ( horde) from a physical server running apache to a xen virtual machine and configured lighttpd for this purpose. The lighttpd server now has four 2.2GHz AMD 64 bit cores CPUs and 12 GB of Physical RAM with another 8 GB of swap. This is Redhat 5.5 machine and lighttpd is installed from EPEL.

I have enabled mod_access, mod_status , mod_fastcgi , mod_expire and mod_accesslog.

What are the right config parameters for serving 200+ concurrent users?

Here are some of the directives I have tuned. I am seeking for recommendation to make it this web server even better !

--

fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/var/run/lighttpd/php-fastcgi.socket",
"bin-path" => "/usr/bin/php-cgi",

)
)
)

server.max-worker = 16
server.max-keep-alive-requests = 4
server.max-keep-alive-idle = 4
server.max-fds = 4096
server.stat-cache-engine = "simple"
server.max-connections = 2048

Thanks all for the help !
Paras.


Replies (4)

RE: Serving 200+ concurrent users - Added by nitrox over 14 years ago

server.max-worker = 16 ==> no help. Read the wiki about it. Ignoring us, ignoring you!

RE: Serving 200+ concurrent users - Added by nitrox over 14 years ago

Even then you ignored the warnings. Lighty isn´t multithreaded.

RE: Serving 200+ concurrent users - Added by pradhanparas over 14 years ago

Ok, I changed the number of workers to 1 as recommend. My server is live now and here are some info. I can see a lot of CPU and memory load. I really need to keep both of them low.

Load: load average: 30.50, 29.16, 25.53

RAM: 8GB used out of 12GB

free m
total used free shared buffers cached
Mem: 12288 9218 3069 0 138 1224
/+ buffers/cache: 7855 4432
Swap: 8191 0 8191

Established TCP sessions:

netstat -a |grep https|grep EST|wc -l

72

vmstat:

vmstat S M 2
procs -----------memory---------
---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
26 0 0 3196 133 1218 0 0 26 35 527 643 61 11 28 1 0
29 1 0 3193 133 1218 0 0 136 208 1978 3124 87 13 0 0 0
25 1 0 3191 133 1218 0 0 44 0 1744 3710 80 20 0 0 0
26 1 0 3188 133 1218 0 0 84 282 1562 2207 83 17 0 0 0
38 1 0 3187 133 1218 0 0 44 0 1881 2458 80 20 0 0 0
30 1 0 3185 133 1218 0 0 50 144 1860 2304 86 14 0 0 0
30 1 0 3185 134 1218 0 0 16 224 1751 3078 86 14 0 0 0
30 1 0 3184 134 1218 0 0 14 0 1815 2179 88 12 0 0 0
39 1 0 3184 134 1218 0 0 8 564 2430 2556 88 12 0 0 0
35 1 0 3184 134 1218 0 0 32 0 1870 2386 86 14 0 0 0
38 1 0 3184 134 1218 0 0 24 38 2039 2604 89 11 0 0 0
31 1 0 3184 134 1218 0 0 50 306 2028 2078 82 17 0 0 0

-

I don't have much users right now. When I have 100+ establised sessions I think my server will stop to response.

Any help would be highly appreciated.

My config:

server.max-worker = 1
server.max-request-size = 10000
server.max-write-idle = 700
server.max-read-idle = 10
server.max-keep-alive-requests = 0
server.max-keep-alive-idle = 0
server.max-fds = 4096
server.stat-cache-engine = "simple"
server.max-connections = 2048

fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/var/run/lighttpd/php-fastcgi.socket",
"bin-path" => "/usr/bin/php-cgi",
"max-procs" => 4,
"idle-timeout" => 20,
"bin-environment" => ("PHP_FCGI_CHILDREN" => "8", "PHP_FCGI_MAX_REQUESTS" => "10000")
)
)
)

Thanks
Paras.

    (1-4/4)