KVM performance
I am using Intel Core2 Duo E6600, Kubuntu 8.04 with kernel 2.6.24-21-generic, kvm (as in "QEMU PC emulator version 0.9.1 (kvm-62)") and a WinXP SP3 guest, with bridged networking. My start command is:
sudo kvm -m 1024 -cdrom /dev/cdrom -boot c -net nic,macaddr=00:d0:13:b0:2d:32, model=rtl8139 -net tap -soundhw all -localtime /home/rbroman/windows.img
All this is stable and generally works well, except that internet-based video and audio performance is poor (choppy, skips) in comparison with performance under WinXP running native on the same machine (it's a dual-boot). I would appreciate recommendations to improve video and audio performance, and have the following specific questions:
-I've tried both the default Cirrus adapter and the "-std-vga" option. Which is better? I saw reference to another VMware-based adapter, but I can't figure out how to implement it - would that be better?
-I notice we're up to kvm-79 vs my kvm-62. Should I move to the newer version? Do I have to custom-compile my kernel to do so, and if so what kernel version and what specific kernel options should I use?
-Are there other tuning steps I could take?
Please copy me directly as I'm not on this list. Thankyou
See if boosting the priority of the VM (see man chrt), and locking it to a core (see man taskset) helps. You'll want to do that for the vcpu thread(s) (in the qmeu monitor, run 'info cpus' command).
david
Quoted 44 lines · Randy Broman
I am using Intel Core2 Duo E6600, Kubuntu 8.04 with kernel 2.6.24-21-generic,
kvm (as in "QEMU PC emulator version 0.9.1 (kvm-62)") and a WinXP SP3 guest,
with bridged networking. My start command is:sudo kvm -m 1024 -cdrom
/dev/cdrom-boot c -net nic,macaddr=00:d0:13:b0:2d:32,
model=rtl8139 -net tap -soundhw all -localtime/home/rbroman/windows.imgAll this is stable and generally works well, except that internet-based video and
audio performance is poor (choppy, skips) in comparison with performance under
WinXP running native on the same machine (it's a dual-boot). I would appreciate
recommendations to improve video and audio performance, and have the following
specific questions:-I've tried both the default Cirrus adapter and the "-std-vga" option. Which is better?
I saw reference to another VMware-based adapter, but I can't figure out how to implement
it - would that be better?-I notice we're up to kvm-79 vs my kvm-62. Should I move to the newer version? Do I
have to custom-compile my kernel to do so, and if so what kernel version and what
specific kernel options should I use?-Are there other tuning steps I could take?
Please copy me directly as I'm not on this list. Thankyou
Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · Randy Broman
-I've tried both the default Cirrus adapter and the "-std-vga" option. Which is better?
Cirrus is generally better, but supports fewer resolutions.
Quoted 3 lines
I saw reference to another VMware-based adapter, but I can't figure out how to implement it - would that be better?
-vga vmware (with the new syntax needed by kvm-79); it should be better, but is less will tested. I'm not at all sure the Windows driver will like it.
Quoted 2 lines
-I notice we're up to kvm-79 vs my kvm-62. Should I move to the newer version?
Yes.
Quoted 2 lines
Do I
have to custom-compile my kernel to do so
No.
Signature · 1 line
error compiling committee.c: too many arguments to function
After I submitted the initial question, I downloaded the latest kernel 2.6.27.6, and compiled with the following options, some of which are new since my previous kernel 2.6.24-21.
CONFIG_PARAVIRT_GUEST=yCONFIG_XEN_SAVE_RESTORE=yCONFIG_VMI=yCONFIG_KVM_CLOCK=yCONFIG_KVM_GUEST=y
# CONFIG_LGUEST_GUEST is not setCONFIG_PARAVIRT=yCONFIG_PARAVIRT_CLOCK=y
Using my existing kvm-62 and the following invocation:
$ aoss kvm -m 1024 -cdrom /dev/cdrom -boot c -net nic,macaddr=00:d0:13:b0:2d:32,model=rtl8139 -net tap -soundhw all -localtime /home/rbroman/windows.img
CPU usage went down and performance was much better (no skips), for my video/audio feeds.
I then downloaded, compiled, installed kvm-79, and invoked using the following options
$ aoss ~/kvm-79/kvm -m 1024 --cdrom /dev/cdrom --mac=00:d0:13:b0:2d:32 --nictype=rtl8139 --smp=2 /home/rbroman/windows.img
Note I'm using the new kvm in the compile directory, and I've confirmed that the kvm and kvm-intel modules from the kvm-79 compile are what's loaded. Some of the options from the kvm-62 invocation are missing - because they give errors - I understand that the command syntax/options have changed, and I've checked ~/kvm-79/kvm --help for the new syntax, but I can't figure out how to invoke the remaining options. One of the missing options seems to be the tap network, and the kvm-79 WinXP guest now has no networking.
I also tried the "-vga vmware" option below, as well as -vga=vmware and various other permutations, and I can't get that to work either.
Can someone help me resolve the above? Are there any README's, HowTo's or other documentation on compiling, installing and using kvm-79?
Thanks, Randy
Quoted 24 lines · Avi Kivity
Quoted 3 lines · Randy Broman
-I've tried both the default Cirrus adapter and the "-std-vga" option. Which is better?
Cirrus is generally better, but supports fewer resolutions.
Quoted 3 lines
I saw reference to another VMware-based adapter, but I can't figure out how to implement it - would that be better?
-vga vmware (with the new syntax needed by kvm-79); it should be
better, but is less will tested. I'm not at all sure the Windows driver will like it.Quoted 2 lines
-I notice we're up to kvm-79 vs my kvm-62. Should I move to the newer version?
Yes.
Quoted 2 lines
Do I
have to custom-compile my kernel to do soNo.
Don't use kvm in the tarball. It's not what you want. That's just a wrapper that calls qemu/kvm (possibly even the system one) after it mangles some command line options. Use qemu/x86_64-softmmu/qemu-system-x86_64 from the tarball if you aren't going to install it. Then you just use the same command line params as when you run the "kvm" that your distro installed.
Quoted 80 lines · Randy Broman
After I submitted the initial question, I downloaded the latest kernel 2.6.27.6, and compiled
with the following options, some of which are new since my previous kernel 2.6.24-21.
CONFIG_PARAVIRT_GUEST=yCONFIG_XEN_SAVE_RESTORE=yCONFIG_VMI=yCONFIG_KVM_CLOCK=yCONFIG_KVM_GUEST=y
#CONFIG_LGUEST_GUESTis not setCONFIG_PARAVIRT=yCONFIG_PARAVIRT_CLOCK=yUsing my existing kvm-62 and the following invocation:
$ aoss kvm -m 1024 -cdrom /dev/cdrom -boot c -net nic,macaddr=00:d0:13:b0:2d:32,model=rtl8139 -net tap -soundhw all -localtime /home/rbroman/windows.imgCPU usage went down and performance was much better (no skips), for my video/audio feeds.
I then downloaded, compiled, installed kvm-79, and invoked using the following options
$ aoss ~/kvm-79/kvm -m 1024 --cdrom /dev/cdrom --mac=00:d0:13:b0:2d:32 --nictype=rtl8139 --smp=2 /home/rbroman/windows.imgNote I'm using the new kvm in the compile directory, and I've confirmed that the kvm and kvm-intel
modules from the kvm-79 compile are what's loaded. Some of the options from the kvm-62 invocation
are missing - because they give errors - I understand that the command syntax/options have changed,
and I've checked ~/kvm-79/kvm --help for the new syntax, but I can't figure out how to invoke the
remaining options. One of the missing options seems to be the tap network, and the kvm-79 WinXP
guest now has no networking.I also tried the "-vga vmware" option below, as well as -vga=vmware and various other permutations,
and I can't get that to work either.Can someone help me resolve the above? Are there any README's, HowTo's or other documentation
on compiling, installing and using kvm-79?Thanks, Randy
Quoted 17 lines · Avi Kivity
Quoted 2 lines · Randy Broman
-I've tried both the default Cirrus adapter and the "-std-vga" option. Which is better?
Cirrus is generally better, but supports fewer resolutions.
Quoted 3 lines
I saw reference to another VMware-based adapter, but I can't figure out how to implement
it - would that be better?-vga vmware (with the new syntax needed by kvm-79); it should be better, but is less will tested. I'm not at all sure the Windows driver will like it.
Quoted 2 lines
-I notice we're up to kvm-79 vs my kvm-62. Should I move to the newer version?
Quoted 6 lines
Yes.
Quoted 2 lines
Do I
have to custom-compile my kernel to do soNo.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 12 lines · Randy Broman
After I submitted the initial question, I downloaded the latest kernel 2.6.27.6, and compiled with the following options, some of which are new since my previous kernel 2.6.24-21.
CONFIG_PARAVIRT_GUEST=yCONFIG_XEN_SAVE_RESTORE=yCONFIG_VMI=yCONFIG_KVM_CLOCK=yCONFIG_KVM_GUEST=y
#CONFIG_LGUEST_GUESTis not setCONFIG_PARAVIRT=yCONFIG_PARAVIRT_CLOCK=y
Quoted 8 lines
Using my existing kvm-62 and the following invocation:
$ aoss kvm -m 1024 -cdrom /dev/cdrom -boot c -net nic,macaddr=00:d0:13:b0:2d:32,model=rtl8139 -net tap -soundhw all -localtime /home/rbroman/windows.imgand I've checked ~/kvm-79/kvm --help for the new syntax, but I can't figure out how to invoke the remaining options. One of the missing options seems to be the tap network, and the kvm-79 WinXP guest now has no networking.
These options have not changed. Do you get any error messages?
Oh, and don't use the kvm python script, I'll remove it from the repository.
Quoted 4 lines
I also tried the "-vga vmware" option below, as well as -vga=vmware and various other permutations, and I can't get that to work either.
What error message do you get?
Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.