Re: Disk hardware caching, performance, and journalling

Chris Wedgwood (cw@f00f.org)
Sun, 25 Nov 2001 22:19:26 +1300


On Sat, Nov 24, 2001 at 12:36:18PM -0600, Steve Bergman wrote:

1. Disk hardware caching defaults to ON. (hdparm -W1 /dev/hda)
2. It makes a *big* difference in write performance.

I depends on the drive, my IDE drives do default to on, my SCSI drives
do not.

The difference in write performance doesn't seem to be a problem other
that in contrived situations (eg. streaming 5G of data to disk takes
the same amount of time either way, but untar something then 'sync' is
faster with the drive caching).

It also depends of your filesystems to some extent and the operations
being performed [1].

So what are the implications here for journalling? Do I have to
turn off caching and suffer a huge performance hit?

Yes. I do this on workstations and it doesn't seem to hurt in
practice (only in benchmarks).

I can't comment on your bonnie++ results and I have no idea how well
they reflect reality (I assume to a large extent they try to though).

--cw

[1] XFS rm -rf some_large_dir bites with drive-caching off for example.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/