Hardware and Operating System Issues
The
single biggest hardware issue affecting web server performance is
RAM. A web server should never ever have to swap: swapping increases
the latency of each request beyond a point that users consider fast
enough. This causes users to hit Stop and reload, further increasing
the load. You can, and should, control the
MaxClients setting so that your server does not
spawn so many children it starts swapping.
Beyond that, the rest is mundane: get a fast enough CPU, a fast enough network card, and fast enough disks, where “fast enough” is something that needs to be determined by experimentation.
Operating system choice is largely a matter of local concerns. But a general guideline is to always apply the latest vendor TCP/IP patches. HTTP serving completely breaks many of the assumptions built into Unix kernels up through 1994, and even 1995. Good choices include recent FreeBSD and Linux.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access