# ioping 0.7 does microseconds!?



## Damian (Aug 29, 2013)

Needed to download ioping for a new install and noticed that there was an 0.7 version out and about. 

Apparently it does microseconds now, instead of calling it 0.1 milliseconds:



> 4.0 kb from /vz (ext4 /dev/sda5): request=1 time=48 us
> 
> 4.0 kb from /vz (ext4 /dev/sda5): request=2 time=76 us
> 
> ...


Crazy! Looks like it was released in July, so I might just be a bit late to the party otherwise.


----------



## Deleted (Aug 29, 2013)

One of the 'cavets' to doing latency calculations on Linux with I/O is that, for example, ioping has the following section of code. (Linux has a shared ELF page at the top of the stack that caches lookups for time and a few other syscalls so you'll never be able to know the true amount>. Only way to really measure it is to use rdtsc() in a loop and measure CPU ticks, otherwise you'll get 'low' results. Find it interesting that you're seeing 60uS, on my drives without any crazy caching or time stuff I'm seeing triple that.)


```
long long now(void)
{
struct timeval tv;
 
if (gettimeofday(&tv, NULL))
err(3, "gettimeofday failed");
 
return tv.tv_sec * 1000000ll + tv.tv_usec;
}
```


----------



## Damian (Aug 30, 2013)

Monkburger said:


> Find it interesting that you're seeing 60uS, on my drives without any crazy caching or time stuff I'm seeing triple that.)


Some random other servers. Here's our last RAID 5 server:



> 4.0 kb from /vz (ext4 /dev/mapper/vg_sapphire-home): request=1 time=134 us
> 
> 4.0 kb from /vz (ext4 /dev/mapper/vg_sapphire-home): request=2 time=180 us
> 
> ...


Here's SSD cached:



> 4.0 kb from / (ext4 /dev/mapper/vg_ipx8-root): request=1 time=52 us
> 
> 4.0 kb from / (ext4 /dev/mapper/vg_ipx8-root): request=2 time=64 us
> 
> ...


And the server I posted initially isn't SSD cached but has a heavy-duty RAID card in it. So it seems to be pretty random.


----------



## drmike (Aug 30, 2013)

Really nice to see ioping supporting these actual lower that millisecond times (finally).

Great info from @Monkburger.


----------

