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/
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
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/
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
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
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
participants (2)
-
Matthias Brugger -
Mulyadi Santosa