Remarks on Web server performance

Some people have remarked these servers seem pretty fast. If they are, here's why.
  1. Uncongested link. Petra is on a lightly loaded T-1 at Explosive that dumps into Above.net whose internal ATM fabric peers at MAE-West and MAE-East. What a deal.
  2. Apache running on Linux. Apache is as efficient as the OS it runs on. It does a lot of logging and searching. It really needs an efficient disk cache under the file system. When Apache is slow, it's (often) due to looking for .htaccess in every directory between docroot and the file you wanted. If that's all cached in memory, you don't notice it. Also, Linux uses true demand-paged virtual memory with copy-on-write. OSes that use segmented addressing cannot compete. Unixes that don't do copy-on-write can't compete, either.
  3. Domain logging is turned off. We log visitors' IP numbers only. looking up all your visitors' names takes a long time, and who cares.
  4. Enough memory. Your whole working set must fit in there, or you swap pages to disk.
  5. Swap and root are in the middle of the drive. This cuts the average seek time in half. Our swap space is divided evenly among three spindles. When a system is swapping, write throughput to the swap device is a bottleneck. Having three equal size swap partitions triples the throughput. ALSO, on a busy system, the swap area is visited often. Having it in the middle cuts in half the typical seek time to the next sector on that drive accessed after the swap operation.
  6. We are not running any Netnews servers.