All of lore.kernel.org
 help / color / mirror / Atom feed
* blktrace vs ftrace
@ 2012-02-02 10:20 Matthias Brugger
  2012-02-02 18:15 ` Mulyadi Santosa
  0 siblings, 1 reply; 6+ messages in thread
From: Matthias Brugger @ 2012-02-02 10:20 UTC (permalink / raw)
  To: kernelnewbies

Hi all,

I'm trying to analize I/O behavior of Qemu on the host.

I used blktrace and the blk tracer for ftrace but I see different I/O 
behavior.
I use 4 threads in the VM each reading sequentially a file. Readahead is 
turned off. With blktrace reads are transmitted in a sequential way, 
which means the next read will be executed when the first one has 
completed. In comparison with ftrace, up to 4 reads are issued to the 
disk in parallel.

I suppose the different behaviors are due to the overhead introduced by 
the tracers.
My doubt is, which tracer has less influence on the I/O behaviour and 
therefore reflects the system behaviour without tracing.

Thanks a lot,
Matthias

---
http://motzblog.wordpress.com/

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

* blktrace vs ftrace
  2012-02-02 10:20 blktrace vs ftrace Matthias Brugger
@ 2012-02-02 18:15 ` Mulyadi Santosa
  2012-02-02 19:06   ` Matthias Brugger
  0 siblings, 1 reply; 6+ messages in thread
From: Mulyadi Santosa @ 2012-02-02 18:15 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Feb 2, 2012 at 17:20, Matthias Brugger
<matthias.bgg@googlemail.com> wrote:
> Hi all,
>
> I'm trying to analize I/O behavior of Qemu on the host.

what is your complete command to invoke Qemu?

sometimes Qemu's I/O behaviour can be modified by certain parameter.
All I know recent Qemu release (>= 1.x) use iothread by default, which
might explain your 4 threads reads.
-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

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

* blktrace vs ftrace
  2012-02-02 18:15 ` Mulyadi Santosa
@ 2012-02-02 19:06   ` Matthias Brugger
  2012-02-03  5:59     ` Mulyadi Santosa
  0 siblings, 1 reply; 6+ messages in thread
From: Matthias Brugger @ 2012-02-02 19:06 UTC (permalink / raw)
  To: kernelnewbies

On 02/02/2012 07:15 PM, Mulyadi Santosa wrote:
> On Thu, Feb 2, 2012 at 17:20, Matthias Brugger
> <matthias.bgg@googlemail.com>  wrote:
>> Hi all,
>>
>> I'm trying to analize I/O behavior of Qemu on the host.
>
> what is your complete command to invoke Qemu?

qemu -hda scheduler.raw -drive 
file=/mnt/disk/testdisk2.img,if=virtio,cache=none -m 1024 -enable-kvm -k 
es -smp 2 -vnc 127.0.0.1:10 -smb /home/matthias/nfs/

>
> sometimes Qemu's I/O behaviour can be modified by certain parameter.
> All I know recent Qemu release (>= 1.x) use iothread by default, which
> might explain your 4 threads reads.

I use qemu-0.15.1 configured with the following parameter:

./configure --disable-xen --enable-kvm --enable-io-thread 
--enable-vnc-thread --disable-darwin-user --disable-bsd-user 
--target-list=i386-softmmu

-- 
---
http://motzblog.wordpress.com/

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

* blktrace vs ftrace
  2012-02-02 19:06   ` Matthias Brugger
@ 2012-02-03  5:59     ` Mulyadi Santosa
  2012-02-08 10:59       ` Matthias Brugger
  0 siblings, 1 reply; 6+ messages in thread
From: Mulyadi Santosa @ 2012-02-03  5:59 UTC (permalink / raw)
  To: kernelnewbies

Hi :)

On Fri, Feb 3, 2012 at 02:06, Matthias Brugger
<matthias.bgg@googlemail.com> wrote:
>
> qemu -hda scheduler.raw -drive
> file=/mnt/disk/testdisk2.img,if=virtio,cache=none -m 1024 -enable-kvm -k es
> -smp 2 -vnc 127.0.0.1:10 -smb /home/matthias/nfs/
>
>
> I use qemu-0.15.1 configured with the following parameter:
>
> ./configure --disable-xen re--enable-kvm --enable-io-thread
> --enable-vnc-thread --disable-darwin-user --disable-bsd-user
> --target-list=i386-softmmu

Looks like indeed you were seeing I/O threads from qemu kicks in.

I could only offer this explanation:
blktrace traces events in block level. In this level, I/O is likely
serialized....unless you have more than one physical disks.

in ftrace, you see events right before it hits block level operation.
Somewhere between VFS, filesystem operation and I/O scheduling which
deals with queue reordering. In this case, parallel operation is
likely to happen because more than processes could submit read or
write.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

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

* blktrace vs ftrace
  2012-02-03  5:59     ` Mulyadi Santosa
@ 2012-02-08 10:59       ` Matthias Brugger
  2012-02-08 17:04         ` Mulyadi Santosa
  0 siblings, 1 reply; 6+ messages in thread
From: Matthias Brugger @ 2012-02-08 10:59 UTC (permalink / raw)
  To: kernelnewbies

Hi,

On 02/03/2012 06:59 AM, Mulyadi Santosa wrote:
>
> I could only offer this explanation:
> blktrace traces events in block level. In this level, I/O is likely
> serialized....unless you have more than one physical disks.
>
> in ftrace, you see events right before it hits block level operation.
> Somewhere between VFS, filesystem operation and I/O scheduling which
> deals with queue reordering. In this case, parallel operation is
> likely to happen because more than processes could submit read or
> write.

If I understand the patch which introduces the blk tracer to ftrace 
(http://lwn.net/Articles/315508/) just uses the blktrace interface. So I 
wonder why using this influences the I/O behaviour.

Best regards,
Matthias

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

* blktrace vs ftrace
  2012-02-08 10:59       ` Matthias Brugger
@ 2012-02-08 17:04         ` Mulyadi Santosa
  0 siblings, 0 replies; 6+ messages in thread
From: Mulyadi Santosa @ 2012-02-08 17:04 UTC (permalink / raw)
  To: kernelnewbies

Hi Matthias...

On Wed, Feb 8, 2012 at 17:59, Matthias Brugger
<matthias.bgg@googlemail.com> wrote:
> If I understand the patch which introduces the blk tracer to ftrace
> (http://lwn.net/Articles/315508/) just uses the blktrace interface. So I
> wonder why using this influences the I/O behaviour.

Then I am completely clueless now. Better consult with qemu-devel mailing list.

PS: just crossed my mind, maybe ftrace that uses blktrace is actually
tracing the qemu's virtio. Whereas blktrace is tracing the physical
block access. This is just speculation, after re-reading that you use
virtio and disable write caching.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

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

end of thread, other threads:[~2012-02-08 17:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-02 10:20 blktrace vs ftrace Matthias Brugger
2012-02-02 18:15 ` Mulyadi Santosa
2012-02-02 19:06   ` Matthias Brugger
2012-02-03  5:59     ` Mulyadi Santosa
2012-02-08 10:59       ` Matthias Brugger
2012-02-08 17:04         ` Mulyadi Santosa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.