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.

Get Web Performance Tuning now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.