[linux-lvm] Tracing IO requests?
Frank Ch. Eigler
fche at redhat.com
Mon Mar 7 16:02:35 UTC 2011
Bart Kus <me at bartk.us> writes:
>>>> issue is why all the reads? It should be 99% writes.
>> cp has to read something before it can write it elsewhere.
> Ray, my bad, I should have specified, the cp reads from a different
> volume/set of drives. [...]
One way to try answering such "why" questions is to plop a systemtap
probe at an event that should not be happening much, and print a
backtrace. In your case you could run this for a little while during
the copy:
# stap -c 'sleep 2' -e '
probe ioblock.request {
if (devname == "sdg2") # adjust to taste
if ((rw & 1) == 0) # ! REQ_WRITE
if (randint(100) < 2) # 2% of occurrences, if you like
{ println(devname, rw, size)
print_backtrace() }
}
'
- FChE
More information about the linux-lvm
mailing list