Problem with high load average when using -nographic with qemu in background
Sorry to bother you with this. I did try the qemu forums first.
I am having trouble running a trixbox/centos guest under an ubuntu host. Both completely uptodate installs of the OS's. I am using Qemu 0.8.2 with kqemu-1.3.0pre9.
If I start the qemu without -nographic interactively the VM runs well, and the hostOS maintains a load average of about 0.1
Trouble comes when I add -nographic to the command line, and redirect stdout and stderrout to a logfile. (I do this so I can start qemu from during the boot up process and run the VM in background all the time.
If I start qemu like this (from an interactive shell (tcsh)) qemu -m 256 -localtime -net nic -net tap -nographic trixbox.img \
Quoted 1 line
&!
/tmp/qemulog&
It will stop on
+ Suspended[tty output]
If I also redirect stdin (eg adding "< /dev/null") it then starts and runs fine, but the hostOS load climbs to 1.0 and higher (depending on what the guest is doing, and the performance of the VM is seriously impaired.
I can ssh into the machine under both scenarios and see that the guest thinks it is fine, but it is really burdening the hostOS.
Looking through /var/log/messages on the guest shows that I have (I think) successfully set io to go through /dev/ttyS0, eg.
Jan 6 09:46:49 asterisk1 kernel: Kernel command line: ro console=ttyS0,9600n8
vga=normal root=LABEL=/
Can anyone offer advice?
Phil
Hi Phil
Quoted 5 lines
If I start qemu like this (from an interactive shell (tcsh)) qemu -m 256 -localtime -net nic -net tap -nographic trixbox.img \
Quoted 2 lines
&!
/tmp/qemulog&
I never did this before, but maybe you need to take a look on -serial option. Maybe you can use it to redirect the serial output onto FIFO and then read the other end point of this FIFO into a file
About the high load, I guess that happens when login prompt appears. It keeps polling for input but never get it and feeding /dev/null just made it "eating" endless null.
I hope this hint is useful.
regards,
Mulyadi
Quoted 5 lines · Phil Rasch
Sorry to bother you with this. I did try the qemu forums first.
I am having trouble running a trixbox/centos guest under an ubuntu host. Both completely uptodate installs of the OS's. I am using Qemu 0.8.2 with kqemu-1.3.0pre9.
1) Try disabling kqemu. We can't help you with that.
2) I'm fairly sure I already fixed this in cvs.
Paul
Now that I know that I didn't completely miss the point, and may even have tried a reasonable thing, I have a question and a workaround.
1) Question: How do other people do this sort of thing? That is, start a virtual machine when the hostmachine is booted automatically? Or dont they worry about the load/performance issues?
2) Workaround: I now start qemu up inside a screen session at boot. This seems to work fine, the load stays low, and performance is OK. I dont need to depend upon X11 being up. I can connect from a regular console, or from an xterm.
Thanks again
Phil
Quoted 6 lines · Phil Rasch
Now that I know that I didn't completely miss the point, and may even have tried a reasonable thing, I have a question and a workaround.
1) Question: How do other people do this sort of thing? That is, start a virtual machine when the hostmachine is booted automatically? Or dont they worry about the load/performance issues?
I fixed qemu so it wasn't broken.
Paul