How to check the performance of a hard drive (Either via terminal or GUI). The write speed. The read speed. Cache size and speed. Random speed.
Terminal method
If the drive doesn't have a file system (and only then), use Otherwise, mount it on /tmp and write then delete the test output file.
Graphical method
How to benchmark disk I/OIs there something more you want? |
|||||||||||||||||||||
|
|
If you want accuracy, you should use Sequential READ speed with big blocks (this should be near the number you see in the specifications for your drive):
Sequential WRITE speed with big blocks (this should be near the number you see in the specifications for your drive):
Random 4K read QD1 (this is the number that really matters for real world performance unless you know better for sure):
Mixed random 4K read and write QD1 with sync (this is worst case number you should ever expect from your drive, usually 1-10% of the number listed in the spec sheet):
Increase the Note that |
||||
|
|
|
Write speed
Block size is actually quite large. You can try with smaller sizes like 64k or even 4k. Read speed Run the following command to clear the memory cache
Now read the file which was created in write test:
|
|||
|
|
|
If you want to monitor the disk read and write speed real-time you can use the iotop tool. This is useful to get exact information about how a disk performs for a particular application or task. The output will show you read/write speed per process, and total read/write speed for the server, much similar to To install iotop:
To run it:
|
||||
|
|
|
some hints on how to use bonnie++
A bit more at: SIMPLE BONNIE++ EXAMPLE. |
||||
|
|
|
bonnie++ is the ultimate benchmark utility I know for linux. (I'm currently preparing a linux livecd at work with bonnie++ on it to test our windows-based machine with it!) It takes care of the caching, syncing, random data, random location on disk, small size updates, large updates, reads, writes, etc. Comparing a usbkey, a harddisk (rotary), a solid-state drive and a ram-based filesystem can be very informative for the newbie. I have no idea if it is included in Ubuntu, but you can compile it from source easily. http://www.coker.com.au/bonnie++/ Corto |
|||
|
|
|
Suominen is right, we should use some kind of sync; but there is a simpler method, conv=fdatasync will do the job:
|
|||||||||||||||||
|
|
I would not recommend using Another point of view must be the sync time inclusion; all modern filesystems use caching on file operations. To really measure disk speed and not memory, we must sync the filesystem to get rid of the caching effect. That can be easily done by:
with that method you get output:
so the disk datarate is just 104857600 / 0.441 = 237772335 B/s --> 237MB/s That is over 100MB/s lower than with caching. Happy benchmarking, |
|||
|
|
protected by Community♦ Feb 12 '14 at 16:23
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
