Irregular response times
I've got various Qemu running linux (gentoo or debian, all running the same kernel). On one of them, I get very irregular response time.
During a few seconds, it works normally. Eg. thru a ssh connection, I can type commands at bash, and I get the character echoed right away. And then, for a few tens of seconds, it hangs, with no output and no
way to interrupt it or whatever. The qemu process is in S state,
waiting in poll_s WCHAN.
The same occurs on the console too.
Any hints?
Signature · 1 line
__Pascal Bourguignon__ http://www.informatimago.com/
Quoted 10 lines · [email protected] (Pascal J. Bourguignon) writes:
I've got various Qemu running linux (gentoo or debian, all running the same kernel). On one of them, I get very irregular response time.
During a few seconds, it works normally. Eg. thru a ssh connection, I can type commands at bash, and I get the character echoed right away. And then, for a few tens of seconds, it hangs, with no output and no
way to interrupt it or whatever. The qemu process is in S state,
waiting inpoll_sWCHAN.The same occurs on the console too.
Eventually, I could run emacs thru ssh, and it looks like these response time irregularities don't occur within emacs.
Quoted 1 line
Any hints?
Signature · 1 line
__Pascal Bourguignon__ http://www.informatimago.com/
Quoted 10 lines · Pascal J. Bourguignon
Quoted 8 lines · [email protected] (Pascal J. Bourguignon) writes:
I've got various Qemu running linux (gentoo or debian, all running the same kernel). On one of them, I get very irregular response time.
During a few seconds, it works normally. Eg. thru a ssh connection, I can type commands at bash, and I get the character echoed right away. And then, for a few tens of seconds, it hangs, with no output and no way to interrupt it or whatever. The qemu process is in S state, waiting in
poll_sWCHAN.
Did you notice the qemu or kvm version? Also, is it happen in pure qemu or qemu utilizing kvm? or both?
I somewhat "smell" buggy spurious interrupt handling..... try to set your processor to use constant clock frequency.
And....few month ago, I learned quite funny tricks. Sometimes qemu/kvm window hangs if I place it on different workspace other than my current workspace in my GNOME desktop. Moving out focus from Qemu's workspace somehow make it hang for few seconds (qemu-kvm 0.10.6). So, the trick is, always place it on your current active workspace.
Signature · 7 lines
regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
Quoted 7 lines · Mulyadi Santosa
Quoted 5 lines · Pascal J. Bourguignon
Quoted 3 lines · [email protected] (Pascal J. Bourguignon) writes:
I've got various Qemu running linux (gentoo or debian, all running the same kernel). On one of them, I get very irregular response time.
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
During a few seconds, it works normally. Eg. thru a ssh connection, I can type commands at bash, and I get the character echoed right away. And then, for a few tens of seconds, it hangs, with no output and no way to interrupt it or whatever. The qemu process is in S state, waiting in
poll_sWCHAN.Did you notice the qemu or kvm version? Also, is it happen in pure qemu or qemu utilizing kvm? or both?
This is
% qemu --version
QEMU PC emulator version 0.12.4 (qemu-kvm-0.12.4), Copyright (c) 2003-2008 Fabrice Bellard
% uname -a
Linux kuiper 2.6.34-gentoo-c5-kvm #8 SMP Fri Jul 2 19:19:27 CEST 2010 x86_64 Intel(R) Core(TM) i7 CPU 950 @ 3.07GHz GenuineIntel GNU/Linux
% ls -l /dev/kvm
crw-rw---- 1 root kvm 10, 232 Jul 2 19:28 /dev/kvm
% cat /domU/bin/qemu-hubble
#!/bin/bash
vm=hubble
nic_model=e1000
cpu=coreduo
ncpus=2
ncores=2
mem=2G
# video=(-vga std)
# video=(-nographic)
video=(-curses)
if [ -r /dev/kvm ] ; then
kvm='-enable-kvm'
else
kvm=''fi
exec qemu $kvm \
-cpu ${cpu} -smp ${ncpus},cores=${ncores} -m ${mem} ${video[@]} \
-boot menu=on \
-net nic,model=${nic_model} -net tap \
-hda /domU/images/${vm}.boot.disk \
-hdb /domU/images/${vm}.ext3 \
-hdc /domU/images/${vm}.swap \Quoted 2 lines
I somewhat "smell" buggy spurious interrupt handling..... try to set your processor to use constant clock frequency.
I think it is:
$ zcat /proc/config.gz |grep HZ # CONFIG_NO_HZ is not set # CONFIG_HZ_100 is not set # CONFIG_HZ_250 is not set # CONFIG_HZ_300 is not set CONFIG_HZ_1000=y CONFIG_HZ=1000 # CONFIG_MACHZ_WDT is not set
That said, I do also have problems with some conftest (eg. stackoverflow_handler / setcontext or stackoverflow_handler / sigaltstack) that hang on this x86_64 host. Mostly when I boot a Xen kernel, but I think I saw it once also on this Linux+KVM kernel (without Xen). So indeed, it sounds like some problem with handling signals.
Quoted 5 lines
And....few month ago, I learned quite funny tricks. Sometimes qemu/kvm window hangs if I place it on different workspace other than my current workspace in my GNOME desktop. Moving out focus from Qemu's workspace somehow make it hang for few seconds (qemu-kvm 0.10.6). So, the trick is, always place it on your current active workspace.
Well, I use ratpoison on X, and I launch the Qemu VM from screen in an xterm. These machines are launched with -curses.
Signature · 1 line
__Pascal Bourguignon__ http://www.informatimago.com/
Quoted 14 lines · [email protected] (Pascal J. Bourguignon) writes:
Quoted 4 lines · Mulyadi Santosa
Quoted 2 lines · Pascal J. Bourguignon
[email protected] (Pascal J. Bourguignon) writes:
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
I've got various Qemu running linux (gentoo or debian, all running the same kernel). On one of them, I get very irregular response time.
During a few seconds, it works normally. Eg. thru a ssh connection, I can type commands at bash, and I get the character echoed right away. And then, for a few tens of seconds, it hangs, with no output and no way to interrupt it or whatever. The qemu process is in S state, waiting in
poll_sWCHAN.
Quoted 7 lines
exec qemu $kvm \
-cpu ${cpu} -smp ${ncpus},cores=${ncores} -m ${mem} ${video[@]} \
-boot menu=on \
-net nic,model=${nic_model} -net tap \
-hda /domU/images/${vm}.boot.disk \
-hdb /domU/images/${vm}.ext3 \
-hdc /domU/images/${vm}.swap \I eventually found the problem: all qemu instances will use the same
MAC address for their NIC. When I set different MACs to the
different VMs, everything works well:
mac=52:54:0:0:0:1 # or 2, 3, ...
...
-net nic,macaddr=${mac},model=${nic_model} -net tap \Signature · 1 line
__Pascal Bourguignon__ http://www.informatimago.com/