Thursday, October 8, 2009

Making your hard drive faster

Some manufacturers worry too much about their customers' comfort. For example, Apple disabled multitasking on their iPhones because too many running processes could slow down the system's responsiveness and everyone would say "iPhone is slow" rather than "you have too much stuff running, close something". In this case IMHO Apple worries more about themselves, but whatever.

In my case it's Dell/WD who worried too much about my comfort. My workhorse is Dell Precision T5400 with 2 quad-core Xeons. While running anything on it in 8 processes is fun, disk is always a bottleneck.

Let me introduce AAM(wikipedia: Automatic acoustic management). This option is used for decreasing the speed of disk rotation and head positioning. And for some people it's really necessary. But at work I have other people who, combined, produce much more noise. Thus, I don't need an additional care.

For my Linux PC 'hdparm' is a trusted tool:

# hdparm

-M  get/set acoustic management (0-254, 128: quiet, 254: fast)

Checking current setting:

# hdparm -M /dev/sda

acoustic      = 128 (128=quiet ... 254=fast)

And changed to max performance:

# hdparm -M 254 /dev/sda

Useful tool for testing the average random access time - seeker.c:

Benchmark results:

./seeker /dev/sda
Results: 58 seeks/second, 17.18 ms random access time

./seeker /dev/sda
Results: 76 seeks/second, 13.05 ms random access time

I think I already feel this 30% improvement. Or maybe it's the placebo effect :)