Disk Caching and Hard Drive Throughput

1998 – There are several variables that determine hard drive throughput: How fast your Mac can move data over the SCSI or IDE bus, how fast your drive can move data over the drive bus, and caching, including both disk caching by your Mac and the disk’s internal data buffer.

Old Drive vs. New on Old Macs and Newer Macs

For the first test, I used a couple external drives that I already had – an older Quantum 40 MB and a relatively new Quantum 2050 MB – both configured with System 7.5.5, allowing a standard configuration on all tested computers. I use Speedometer 3.06, since it runs on even the oldest Macs (such as my Mac SE).

Note that Speedometer uses a 1 MB file for testing the drive, so a cache larger than 1 MB makes no appreciable difference. Ratings are relative to the Mac Classic, which scores 1.0.

Quantum 40 MB Quantum 2050 MB
Computer 64 KB cache 1 MB cache 64 KB cache 1 MB cache
Mac SE 1.1 n/a 1.4 n/a
Mac II 3.4 5.2
Mac IIsi 1.9 6.5 3.7 6.6
Centris 610 7.2 17.0
PM 6100/66 9.4 18.5

In general, the faster the Mac and the more powerful the CPU, the better the results. 68000-based Macs such as the Classic and SE have less than half the throughput of 68020– and 68030-based Macs. There was a huge jump in performance with the 68040-based Quadra and Centris models and their new SCSI Manager. The 66 MHz Power Mac 6100 is offers throughput only 10-20% faster than the 20 MHz Centris 610; newer PowerPC models that use a PCI bus would probably provide better performance.

The Impact of Disk Cache Size on Performance

You will obtain slightly different results at different cache sizes. There is also a bad interaction between cache size and the disk buffer for drives with larger buffers, as the figure below shows. This data was obtained on a Macintosh IIsi using different drives. Faster Macs would have better performance, slower Macs not as fast.

Throughput vs. cache size

  • Magenta line: Quantum 40
  • Blue line: Quantum 80
  • Green Line: Quantum 2050
  • Red line: 1 MB ramBunctious RAM disk

Older drives with small (usually 64 KB or less) buffers have consistent performance until the disk cache hits 1 MB, the size of Speedometer’s test file. At that point, performance depends on the cache, not the drive mechanism. The Quantum 2050, with its larger buffer, drops 30% between a 128 KB and 512 KB cache.

But note the consistent performance with a 1 MB or larger cache. Whether the drive itself is slow or fast, performance jumps to about 7.0 on the IIsi. That’s 3.5x faster than the Quantum 40, nearly 3x faster for the Quantum 80, and almost 2x faster for the Quantum 2050.

Perhaps the most interesting discovery is that the disk cache has a strong negative impact on the RAM disk created by ramBunctious. Performance dips drastically at 256 KB and 512 KB, leveling off at around 7.0 with a 1 MB or larger cache. Although the RAM disk is over 2x faster than the cache, the large cache drops performance to match that of cached hard drives.

Remember that these findings are true only for the Speedometer 3.0.6 benchmark, which may not emulate the way you access data in the real world.

Still, these tests demonstrate that a large enough data cache can make a real improvement on data throughput and that RAM disks, when used, should be used with a relatively small disk cache. (Ideally the disk cache would ignore a RAM disk.)

Although Speedometer doesn’t show it, the caching provided by Speed Doubler provides better disk caching than the one that ships with the Mac OS as part of the memory control panel.

Keywords: #diskcache #diskbuffer #ramdisk

Short link: https://goo.gl/sw3rTw