linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Accuracy of disk statistics IO counter
@ 2006-07-28 16:02 Mark Seger
  2006-07-29 10:42 ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Seger @ 2006-07-28 16:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jens Axboe

Awhile back I had suggested moving the place in the block driver logic 
where stats get updated to more accurately reflect what was happening at 
the time they were actually sent to the drivers and I believe they were 
indeed made in the 2.6.15 timeframe.  I've recently started taking 
closer look at the numbers and while the sector counts look correct I'm 
not sure I'd agree with the number of I/Os being reported and believe 
they can be off by maybe 15% or more.

Specifically, I wrote a 1GB file with a blocksize of 1MB, which would 
result in 1000 writes at the application level.  What I believe then 
happens is that each write turns into 8 128KB requests to the driver, 
which should result in 8000 actual writes.  Toss in metadata operations 
and who knows what else and the actual number should be a little 
higher.  What I've see after repeating the tests a number of times on 
2.6.16-27 is numbers ranging from 6800-7000 writes which feels like a 
big enough difference to at least point out.

-mark



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Accuracy of disk statistics IO counter
  2006-07-28 16:02 Accuracy of disk statistics IO counter Mark Seger
@ 2006-07-29 10:42 ` Jens Axboe
  2006-08-01 19:30   ` Mark Seger
  0 siblings, 1 reply; 5+ messages in thread
From: Jens Axboe @ 2006-07-29 10:42 UTC (permalink / raw)
  To: Mark Seger; +Cc: linux-kernel

On Fri, Jul 28 2006, Mark Seger wrote:
> Awhile back I had suggested moving the place in the block driver logic 
> where stats get updated to more accurately reflect what was happening at 
> the time they were actually sent to the drivers and I believe they were 
> indeed made in the 2.6.15 timeframe.  I've recently started taking 
> closer look at the numbers and while the sector counts look correct I'm 
> not sure I'd agree with the number of I/Os being reported and believe 
> they can be off by maybe 15% or more.
> 
> Specifically, I wrote a 1GB file with a blocksize of 1MB, which would 
> result in 1000 writes at the application level.  What I believe then 
> happens is that each write turns into 8 128KB requests to the driver, 
> which should result in 8000 actual writes.  Toss in metadata operations 
> and who knows what else and the actual number should be a little 
> higher.  What I've see after repeating the tests a number of times on 
> 2.6.16-27 is numbers ranging from 6800-7000 writes which feels like a 
> big enough difference to at least point out.

Install http://brick.kernel.dk/snaps/blktrace-git-20060723022503.tar.gz
and blktrace your disk for the duration of the test and compare the io
numbers. Requires 2.6.17 or later, though.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Accuracy of disk statistics IO counter
  2006-07-29 10:42 ` Jens Axboe
@ 2006-08-01 19:30   ` Mark Seger
  2006-08-01 19:39     ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Seger @ 2006-08-01 19:30 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel, Alan Brunelle


>>Specifically, I wrote a 1GB file with a blocksize of 1MB, which would 
>>result in 1000 writes at the application level.  What I believe then 
>>happens is that each write turns into 8 128KB requests to the driver, 
>>which should result in 8000 actual writes.  Toss in metadata operations 
>>and who knows what else and the actual number should be a little 
>>higher.  What I've see after repeating the tests a number of times on 
>>2.6.16-27 is numbers ranging from 6800-7000 writes which feels like a 
>>big enough difference to at least point out.
>>    
>>
>
>Install http://brick.kernel.dk/snaps/blktrace-git-20060723022503.tar.gz
>and blktrace your disk for the duration of the test and compare the io
>numbers. Requires 2.6.17 or later, though.
>  
>
I had problems getting blktrace going and posted a note to 
linux-btrace@vger.kernel.org at Alan Brunelle's suggestion and he also 
said he'd take a closer look at it himself.  On the other hand he 
pointed me to 'stap' and I was able to use it to get the details I was 
looking for - SystemTAP really rocks for this type of analysis!  As it 
turns out my assumption about driver blocksize was wrong (sorry about 
that).  It turns out that the size of requests from the driver to the 
disk is 160mb and so the I/O count was smaller than I had anticipated.
-mark



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Accuracy of disk statistics IO counter
  2006-08-01 19:30   ` Mark Seger
@ 2006-08-01 19:39     ` Jens Axboe
  2006-08-01 19:43       ` Mark Seger
  0 siblings, 1 reply; 5+ messages in thread
From: Jens Axboe @ 2006-08-01 19:39 UTC (permalink / raw)
  To: Mark Seger; +Cc: linux-kernel, Alan Brunelle

On Tue, Aug 01 2006, Mark Seger wrote:
> 
> >>Specifically, I wrote a 1GB file with a blocksize of 1MB, which would 
> >>result in 1000 writes at the application level.  What I believe then 
> >>happens is that each write turns into 8 128KB requests to the driver, 
> >>which should result in 8000 actual writes.  Toss in metadata operations 
> >>and who knows what else and the actual number should be a little 
> >>higher.  What I've see after repeating the tests a number of times on 
> >>2.6.16-27 is numbers ranging from 6800-7000 writes which feels like a 
> >>big enough difference to at least point out.
> >>   
> >>
> >
> >Install http://brick.kernel.dk/snaps/blktrace-git-20060723022503.tar.gz
> >and blktrace your disk for the duration of the test and compare the io
> >numbers. Requires 2.6.17 or later, though.
> > 
> >
> I had problems getting blktrace going and posted a note to 
> linux-btrace@vger.kernel.org at Alan Brunelle's suggestion and he also 

Documentation issues, sorry about that. It hasn't been updated for the
debugfs change.

> said he'd take a closer look at it himself.  On the other hand he 
> pointed me to 'stap' and I was able to use it to get the details I was 
> looking for - SystemTAP really rocks for this type of analysis!  As it 
> turns out my assumption about driver blocksize was wrong (sorry about 
> that).  It turns out that the size of requests from the driver to the 
> disk is 160mb and so the I/O count was smaller than I had anticipated.

160KiB, I'm assuming? :-)

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Accuracy of disk statistics IO counter
  2006-08-01 19:39     ` Jens Axboe
@ 2006-08-01 19:43       ` Mark Seger
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Seger @ 2006-08-01 19:43 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel, Alan Brunelle


>160KiB, I'm assuming? :-)
>  
>
oops...  8-(
-mark


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-08-01 19:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-28 16:02 Accuracy of disk statistics IO counter Mark Seger
2006-07-29 10:42 ` Jens Axboe
2006-08-01 19:30   ` Mark Seger
2006-08-01 19:39     ` Jens Axboe
2006-08-01 19:43       ` Mark Seger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).