On Thu, May 19, 2011 at 5:35 AM, Sašo Kiselkov <skiselkov...@gmail.com> wrote:
> I'd like to ask whether there is a way to monitor disk seeks. I have an
> application where many concurrent readers (>50) sequentially read a
> large dataset (>10T) at a fairly low speed (8-10 Mbit/s). I can monitor
> read/write ops using iostat, but that doesn't tell me how contiguous the
> data is, i.e. when iostat reports "500" read ops, does that translate to
> 500 seeks + 1 read per seek, or 50 seeks + 10 reads, etc? Thanks!

You can sort of do this with a DTrace script.

Something like: (forgive my crappy script, I've only poked at DTrace a
few times)

#pragma D option quiet
io:::done
/ args[1]->dev_name == "sd" && args[1]->dev_instance < 11 /
{
  printf("%d.%03d,%s,%i,%s,%i\n",
         (timestamp/1000000),
         (timestamp / 1000) % 1000,
         args[1]->dev_statname,
         args[0]->b_lblkno,
         (args[0]->b_flags & B_WRITE ? "W" : "R"),
         args[0]->b_bcount
        );
}

For every completed IO, this should give you the timestamp, device
name, start LBA, "R"ead or "W"rite and length of the IO.

-B

-- 
Brandon High : bh...@freaks.com
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to