Searching for answers . . . no answers found.

Sunday, August 22, 2004

`hdparm' is a rather nice UNIX utility which lets you tweak the inner settings of your hard drive. Usually, under Linux, the hard drive is not optimized by default in things like DMA and read-ahead. Using `hdparm' can be done to do just that but understanding it and how to use correctly may prove tricky. Even if the manpage is somewhat helpful, the help page is indeed rather terse. There is a number of hdparm information pages up on the Web and here's a quick link for a very simple but straightforward one.

In it you'll find a quick overview of hdparm's main features and settings and also a neat way to use hdparm itself to benchmark your harddrive with different kinds of disk reads. As far as my hard drive is concerned, here's the -tT test results with all the default factory settings (i.e. nothing tweaked):


bash-2.05b# hdparm -Tt /dev/hda

/dev/hda:
Timing buffer-cache reads: 128 MB in 1.02 seconds =125.02 MB/sec
Timing buffered disk reads: 64 MB in 10.27 seconds = 6.23 MB/sec


Whereas, using the hdparm -X66 -d1 -u1 -m16 -c3 /dev/hda command suggested in the page I've just linked, the buffered read improves dramatically:


bash-2.05b# hdparm -Tt /dev/hda

/dev/hda:
Timing buffer-cache reads: 128 MB in 1.01 seconds =126.25 MB/sec
Timing buffered disk reads: 64 MB in 4.65 seconds = 13.78 MB/sec


More than 50% improvement! This is especially encouraging if you have an old and slow machine. The actual performance gain is noticeable and with these simple setting changes extracting a .rar archive, for instance, became a good bit faster. Now only to keep tweaking it to the last breath, using all the possible configuration settings...

No comments:

Followers

About Me

My photo
Always an ace on the river.