Saturday, August 02, 2008

Where Do You Put Your Hibernation Image?

This is a lesson I keep forgetting and relearning: The position of your storage on your hard disk can make a huge difference to your throughput.

I was just discussing this on irc. A TuxOnIce user was only seeing about 17MB/s raw disk throughput, while hdparm -t reported 34MB/s. Why the difference?

It came down to the fact that he was using hdparm -t /dev/sda, rather than hdparm -t /dev/sda5. The speed shown by hdparm was thus that of the start (outside?) of the disk, rather than the area where the swap partition was stored.

Looking at my own hard disk, where the swap partition is also not the first partition, yields some interesting numbers:

hdparm -t /dev/sda yields approximately 50MB/s and hdparm -t /dev/sda3 (my swap partition) gives about 41MB/s. After compression, I should thus get about 15MB/s more if I put my swap first. On a 3GB image, that's around 5 seconds.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home