Posted on 2 Comments

HDlatency – now with quick option

I’ve done a minor update to the hdlatency tool (get it from Launchpad), it now has a –quick option to have it only do its tests with 16KB blocks rather than a whole range of sizes. This is much quicker, and 16KB is the InnoDB page size so it’s the most relevant for MySQL/MariaDB deployments.

However, I didn’t just remove the other stuff, because it can be very helpful in tracking down problems and putting misconceptions to rest. On SANs (and local RAID of course) you have things like block sizes and stripe sizes, and opinions on what might be faster. Interestingly, the real world doesn’t always agree with the opinions.

We Mark Callaghan correctly pointed out when I first published it, hdlatency does not provide anything new in terms of functionality, the db IO tests of sysbench cover it all. A key advantage of hdlatency is that it doesn’t have any dependencies, it’s a small single piece of C code that’ll compile on or can run on very minimalistic environments. We often don’t control what the base environment we have to work on is, so that’s why hdlatency was initially written. It’s just a quick little tool that does the job.

We find hdlatency particularly useful for comparing environments, primarily at the same client. For instance, the client might consider moving from one storage solution to another – well, in that case it’s useful to know whether we can expect an actual performance benefit.

The burst data rate (big sequential read or write) which often gets quoted for a SAN or even an individual disk is of little interest to database use, since its key performance bottleneck lies in random access I/O. The disk head(s) will need to move. So it’s important to get some real relevant numbers, rather than just go with magic vendor numbers that are not really relevant to you. Also, you can have a fast storage system attached via a slow interface, and consequentially the performance then will not be at all what you’d want to see. It can be quite bad.

To get an absolute baseline on what are sane numbers, run hdlatency also on a local desktop HD. This may seem odd, but you might well encounter storage systems that show a lower performance than that. ‘nuf said.

If you’re willing to share, I’d be quite interested in seeing some (–quick) output data from you – just make sure you tell what storage it is: type of interface, etc. Simply drop it in a comment to this post, so it can benefit more people. thanks

Posted on 2 Comments

2 thoughts on “HDlatency – now with quick option

  1. On my notebook server, the result of “hdlatency –quick test test.file 1000 60” is the following:

    * Calculating timekeeping latency over 5 seconds… 104166 usecs per 100000 calls
    label,iotype,rw,fsize,msize,alignment,direct,max_seconds,iosize,num_iterations,usecs,iterations_per_second,avg_usecs_per_iteration
    test,SEQ,WRONLY,1048576000,262144,4096,1,60,16384,64000,33045518,1937,516
    test,SEQ,RDONLY,1048576000,262144,4096,1,60,16384,64000,30333435,2114,473
    test,RND,WRONLY,1048576000,262144,4096,1,60,16384,9761,60208054,162,6168
    test,RND,RDONLY,1048576000,262144,4096,1,60,16384,5705,59997933,95,10516
    test,RND,RDWR,1048576000,262144,4096,1,60,16384,6697,60004823,111,8959
    test,SEQ,WRONLY,1048576000,262144,4096,0,60,16384,1360,60043211,22,44149
    test,RND,WRONLY,1048576000,262144,4096,0,60,16384,1247,60043829,20,48150

  2. […] Arjen has done an update to the hdlatency tool, it now has a –quick option to have it only do its tests with 16KB blocks rather than a whole range of sizes. […]

Comments are closed.