Re: Trace replaying

From: Jens Axboe <jens.axboe_at_oracle.com>
Date: Thu, 23 Aug 2007 09:05:39 +0200

On Wed, Aug 22 2007, Jens Axboe wrote:
> On Thu, Aug 23 2007, Joshua Root wrote:
> > Jens Axboe wrote:
> > > you need to do something ala
> > >
> > > # fio --name=replay --filename=/dev/sdb --direct=1 --read_iolog=sdb.bin
> > >
> > > to replay that IO pattern.
> >
> > OK, I'm trying this with the latest (git) fio. This command line:
> >
> > % sudo fio --name=replay --read_iolog=kerncomp.bin --filename=/dev/sdc
> >
> > Produces only this output:
> >
> > replay: (g=0): rw=read, bs=4K-4K/4K-4K, ioengine=sync, iodepth=1
> > Starting 1 process
> > Jobs: 1 (f=1): [W] [0.0% done] [ 0/ 0 kb/s] [eta 19h:59m:23s]
> >
> > It actually shows a few thousand kb/s for the first few seconds, but
> > then it drops to 0 and the eta just keeps going up.
> >
> > Using Debian testing on IA64, vanilla 2.6.22.3 kernel.
>
> Can you pass me your kerncomp.bin? Just send it in private.

OK got that trace and found the problem. The patch below should fix it,
I will commit it now. The issue is that blktrace (on the kernel side)
can send out notices, telling you about a process or the time mapping.
The fio blktrace loader just needs to discard such messages, right now
it got intepreted it as a normal trace and do random things. What
happened with this trace was that the delay from the previous notice was
seen as really huge, so fio was just sleeping waiting for that time to
pass.

diff --git a/blktrace.c b/blktrace.c
index b4d05c7..58f28ce 100644
--- a/blktrace.c
+++ b/blktrace.c
@@ -281,6 +281,8 @@ int load_blktrace(struct thread_data *td, const char *filename)
                         log_err("fio: discarded %d of %d\n", ret, t.pdu_len);
                         goto err;
                 }
+ if (t.action & BLK_TC_ACT(BLK_TC_NOTIFY))
+ continue;
                 if (!ttime) {
                         ttime = t.time;
                         cpu = t.cpu;

-- 
Jens Axboe
Received on Thu Aug 23 2007 - 09:05:39 CEST

This archive was generated by hypermail 2.2.0 : Thu Aug 23 2007 - 09:30:02 CEST