Jump to content.

IFX Group



The following is about the SMARTDRV program used on DOS (and DOS-like) operating systems like those commonly used as boot loaders in IPAD-OS systems. Virtually all other operating systems have dynamically included caching logic or direct cache control into the operating system itself.

Some people mistakenly believe SMARTDRV to be a magical way to keep part of the hard drive in RAM, so the more memory given to SMARTDRV - the faster things go. This magical part is called a dumb CACHE, but some people mistakenly use SMARTDRV as if it were a dumb cache and wonder why their whole system seems progressively slower under a heavy work load.

SMARTDRV is a little different which is where you can run into problems with overall system performance as the work load increases.

To understand the difference we need to know what happens inside a dumb cache and inside SMARTDRV.

A dumb cache is simply a chunk of RAM between the CPU and a slower media such as a tape, CD/DVD or hard drive. This RAM is often a very simple FIFO (first in, first out) buffer, but some of the more modern caching actually sorts the data writes in ascending order to keep the read/write head always moving in the same direction. You may have noticed the newer high performance hard drives now come with more RAM built inside. This is dumb caching very much like the old Tekram controller cards.

The important part to know about dumb caching is that it has no idea what file system and operating system is running. It simply buffers data flowing to and from the media.

On the other hand, SMARTDRV knows about the file system and operating system and does some very specialized things like grouping and sorting data into directory structures and raw data. This sorting work is not that noticeable when the cache size is small, but gets exponentially slower as the cache size grows.

For a real world analogy think about all those offices that keep paper files. The secretary must take a stack of papers, sort them into groups (e.g. the 26 letters of the alphabet) and then sub-sort them into order within each letter to find the right place in the file cabinet for each individual piece of paper. What would happen to that secretary's performance if there were 676 (26^2) letters in the alphabet? Or 456976 (26^4) letters? Does the job get easier or harder? Yes, it gets much harder!

This is what happens when the SMARTDRV cache size grows because SMARTDRV must sort everything inside the cache before it can send it on to the disk. What does all this sorting do to performance? It simply adds more workload to the CPU for every new disk write that enters the cache. The difference between a small and large SMARTDRV cache is virtually invisible when things are not busy, but as the demand to read and write grows, the sorting overhead becomes visible. This is even more visible when the CPU is heavily tasked with other things and the whole system appears to bog down more than it would if the SMARTDRV cache was small.

So what can be done to improve disk performance to the maximum? Both lab and real-world testing show that a SMARTDRV cache size of 2 megabytes on most IPAD-OS systems is near optimum for the average ISP. The 2 megabyte size has proven to be the best balance between sorting overhead and cache performance. Higher performance can be found by using a drive with more dumb cache inside, higher interface rates, higher spindle speeds and higher raw throughput speeds.

As a last resort, using a much higher speed CPU (over 200% faster than required for the IPAD-OS under its heaviest workload) allows room for the extra sorting overhead of a larger SMARTDRV cache. Even so, simply adding a faster CPU does not have the same performance benefits of adding a faster hard drive with a large physical dumb cache built inside.

First published 2007-02-17. The last major review or update of this information was on 2008-08-18. Your feedback using the form below helps us correct errors and omissions on this page.