server.max-worker doubles llighttpd performance

server.max-worker tells lighttpd the number of worker processes to spawn. This is usually only needed on servers which are fairly loaded and the network handler calls delay often (e.g. new requests are not handled instantaneously).

It has been shown that lighty scales mostly linearly on multicore, multi-processor boxes if you set the number of workers equal to two times the number of cores if you are CPU bound (heavy rewrites, heavy proxying). Usually you don’t have to care about CPU-bound processing but in this case you do.

If your VPS has 8 cores set server.max-worker = 16 and restart lighttpd. Your web server performance just doubled. Run ab -n 1000 -c 10 http://www.domain.com/ before and after changing server.max-worker = 16. Run the tests a few times and keep and eye to Requests per second: before and after the server.max-worker new setting. Your WordPress blog and site just got faster.

Leave a Comment