Disk

Next to your Internet connection, the parameter most likely to affect the perceived performance of your server is the speed of its hard disks. If everything seems reasonable but your performance is still lagging, the problem is probably your disks. Remember how much of a penalty it is to go to disk rather than RAM. The relationship between a 100 nanosecond RAM access and a 10 millisecond disk access is the same proportion as one second to 28 hours, a factor of 100,000. And that’s assuming a fast disk. So we want to avoid disk access wherever possible.

Disk Architecture and Parameters

Hard disks are literally that: hard platters coated with a magnetic recording material. There are usually multiple platters in a single hard disk unit. The unit is called a spindle. Each platter surface has an associated arm that swings in a wide enough angle to be able to position the data-reading and -writing tip of the arm over any point on the radius of the platter. The disks generally start rotating when you boot up your computer and continue until you turn off the power. Laptops and other power-conscious machines may spin down (stop) the disk after a certain period of inactivity, but you should disable this feature on any such machine to be used as a web server, because there is usually a several second wait for the disk to spin up again. Current hard disks typically rotate at 7200 or 10000 rpm. Since the disk has moving parts, for example, the platters and the disk arms, it is the part ...

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.