On Fri, Feb 20, 2009 at 4:42 PM, Nick Cummings <[email protected]> wrote:
> 2) How much does hard drive cache size matter in a Linux system?=20
> Obviously, I understand that the HD cache is much faster than the disk
> itself, but I would have assumed that the OS would already do caching of
> data from the hard drive where possible, so it's hard to see how a
> measly extra 8, 16, or 24 MB of cache could really make much of a
> difference.  But I don't know much about hardware, so there's probably
> something important I'm missing here.

They serve quite different purposes.  The kernel buffer cache exists
primarily to avoid redundant reads/writes to disk, although it is also
used in the kernel's elevator algorithm.  However, the kernel has far
less information about a drive's geometry (especially modern drives
which do dynamic bad-block remapping and all kinds of other crazy
magic), so this elevator algorithm basically just clusters
reads/writes to similar locations in the disk as well as possible.
The drive then uses its buffer space to implement its own request
re-ordering, read-ahead, and so on, based on the much more accurate
information it has about the drive geometry.  In any kind of dynamic
situation (basically anything more than linear reads or linear
writes), a larger drive cache will buy you better performance.

Dustin

-- 
Storage Software Engineer
http://www.zmanda.com

Reply via email to