[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] Tracing IO requests?



Bart Kus <me 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]