Hello,
I noticed that running a windows guest causes high context switches on host.
For example:
Running one idle windows guest (2003 r2 x86) with one vcpu. Example output of dstat on the host:
Running one idle linux (ubuntu 10.04) guest:
Without any VMs:
usbdevice tablet is set off. (tablet: no). This would cause even more context switches.
PVE Version:
With 2.6.35 it get worse (>10k csw).
The server is an Dell R510 with 2 x Intel Xeon E5620.
pveperf:
example VM config:
Has anyone an idea how this could be resolved or why on 2.6.35 this get even worse?
esco
*edit*
Here are the different strace results for the guests.
Windows guest (4 minutes):
Linux guest (4 minutes):
Windows has a lot of "futex" calls and more threads (Windows 8, Linux 2). If anyone needs more informations about this problem, don't hesitate to ask!
esco
I noticed that running a windows guest causes high context switches on host.
For example:
Running one idle windows guest (2003 r2 x86) with one vcpu. Example output of dstat on the host:
Code:
----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai hiq siq| read writ| recv send| in out | int csw
0 0 99 0 0 0| 0 0 | 434B 704B| 0 0 |2251 6949
Running one idle linux (ubuntu 10.04) guest:
Code:
----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai hiq siq| read writ| recv send| in out | int csw
0 0 100 0 0 0| 0 0 |3196B 1925B| 0 0 | 119 213
Without any VMs:
Code:
----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai hiq siq| read writ| recv send| in out | int csw
0 0 100 0 0 0| 0 0 |2185B 344B| 0 0 | 40 20
usbdevice tablet is set off. (tablet: no). This would cause even more context switches.
PVE Version:
Code:
pve-manager: 1.7-11 (pve-manager/1.7/5470)
running kernel: 2.6.32-4-pve
proxmox-ve-2.6.32: 1.7-30
pve-kernel-2.6.32-4-pve: 2.6.32-30
qemu-server: 1.1-28
pve-firmware: 1.0-10
libpve-storage-perl: 1.0-16
vncterm: 0.9-2
vzctl: 3.0.24-1pve4
vzdump: 1.2-10
vzprocps: 2.0.11-1dso2
vzquota: 3.0.11-1
pve-qemu-kvm: 0.13.0-3
ksm-control-daemon: 1.0-4
With 2.6.35 it get worse (>10k csw).
The server is an Dell R510 with 2 x Intel Xeon E5620.
pveperf:
Code:
CPU BOGOMIPS: 76804.28
REGEX/SECOND: 982826
HD SIZE: 11.00 GB (/dev/sda3)
BUFFERED READS: 138.16 MB/sec
AVERAGE SEEK TIME: 6.84 ms
FSYNCS/SECOND: 2873.95
DNS EXT: 1047.66 ms
DNS INT: 0.98 ms (local)
example VM config:
Code:
name: test
ide2: local:iso/virtio-win-1.1.16.iso,media=cdrom
vlan0: virtio=4E:42:CF:B7:A3:73
bootdisk: virtio0
virtio0: pve_sdc:vm-10106-disk-1
ostype: w2k3
memory: 1000
sockets: 1
onboot: 0
cores: 1
description: test win2003<br>
boot: c
freeze: 0
cpuunits: 1000
acpi: 1
kvm: 1
Has anyone an idea how this could be resolved or why on 2.6.35 this get even worse?
esco
*edit*
Here are the different strace results for the guests.
Windows guest (4 minutes):
Code:
#strace -c -p 4013 -p 4020 -p 4022 -p 4024 -p 4025 -p 4026 -p 4027 -p 5307
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
98.43 251.413048 212 1185750 133008 futex
1.33 3.385304 3 1316741 ioctl
0.11 0.292721 0 743048 select
0.09 0.228015 38003 6 5 restart_syscall
0.03 0.080217 170 473 pwrite
0.01 0.015842 0 1116955 372610 read
0.00 0.003526 0 371139 write
0.00 0.002749 0 371114 rt_sigaction
0.00 0.002271 0 562989 timer_gettime
0.00 0.002120 0 372044 timer_settime
0.00 0.000013 0 578 kill
0.00 0.000000 0 59 pread
0.00 0.000000 0 149 writev
0.00 0.000000 0 10 madvise
0.00 0.000000 0 46 fdatasync
0.00 0.000000 0 1 rt_sigpending
0.00 0.000000 0 1 1 rt_sigtimedwait
------ ----------- ----------- --------- --------- ----------------
100.00 255.425826 6041103 505624 total
Linux guest (4 minutes):
Code:
#strace -c -p 3738 -p 3745
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
61.28 0.388065 210 1845 ioctl
38.54 0.244037 7 35146 select
0.08 0.000524 0 53749 18439 read
0.04 0.000250 0 16719 write
0.03 0.000187 0 16719 rt_sigaction
0.01 0.000090 0 25118 timer_gettime
0.01 0.000080 0 16720 timer_settime
0.00 0.000000 0 4 rt_sigprocmask
0.00 0.000000 0 2 clone
0.00 0.000000 0 1 rt_sigpending
0.00 0.000000 0 1 1 rt_sigtimedwait
0.00 0.000000 0 16 futex
------ ----------- ----------- --------- --------- ----------------
100.00 0.633233 166040 18440 total
Windows has a lot of "futex" calls and more threads (Windows 8, Linux 2). If anyone needs more informations about this problem, don't hesitate to ask!
esco
Last edited: