Measure disk performance in linux?

Measure disk performance in linux?

Post just about everything that isn't directly related to Spring here!

Moderator: Moderators

Post Reply
User avatar
Zydox
Lobby Developer
Posts: 453
Joined: 23 May 2006, 13:54

Measure disk performance in linux?

Post by Zydox »

Anyone got any ideas as to how to do that?

I found a nice little program called seeker from http://www.linuxinsight.com/how_fast_is_your_disk.html
Though it doesn't seem to be to accurate...

First run on a virtual server at work (with slow SAN solution):
Results: 75 seeks/second, 13.27 ms random access time
Second run on the same server:
Results: 131 seeks/second, 7.58 ms random access time

I then tried it out on my main virtual server at work (with local RAID5 SCSI):
Results: 640 seeks/second, 1.56 ms random access time
And the second run:
Results: 55332 seeks/second, 0.02 ms random access time

Anyhow... the first run seems to generate somewhat reliable values, but the second runs... I'd assume it uses disk cache somehow...
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Re: Measure disk performance in linux?

Post by koshi »

Have a look at http://www.phoronix-test-suite.com/ ? Dunno if there's dedicated disk benchs, but it's certainly more 'real life'.
SirMaverick
Posts: 834
Joined: 19 May 2009, 21:10

Re: Measure disk performance in linux?

Post by SirMaverick »

Why measure seek speed? Random access is always orders of magnitude slower than sequential access.
Zydox wrote:Anyhow... the first run seems to generate somewhat reliable values, but the second runs... I'd assume it uses disk cache somehow...
If you look in the source code of the program you see why. They use random() to select a random block, but they don't seed the number generator. So they access the same pseudo random blocks every time. First time you measure your disk, after that buffered disk access (ram).
You can clear the caches with (warning: that's system cache, so all programs are affected) :

Code: Select all

echo 3 > /proc/sys/vm/drop_caches
Another issue is that they do sync read access. They call read, wait for it to return and then call read again. You might get a better performance by reading in parallel (e.g. asynchronous read) - which is also more realistic.
User avatar
Zydox
Lobby Developer
Posts: 453
Joined: 23 May 2006, 13:54

Re: Measure disk performance in linux?

Post by Zydox »

Thanks for that Koshi.
I downloaded phoronix, but unfortunately I couldn't get it working... I guess it's related to the firewalls at my work... but I at least found a program in that suite which was called fio and seems to work quite well... or... worked well at work... at home it more or less killed the disk :D

I'm gonna try if iSCSI works better than NFS for my servers... anyone with any experience around this? (ESXi 4.1 host with QNAP NAS as disk)
Post Reply

Return to “Off Topic Discussion”