high cpu usage guest system when working with io system

E

err

Guest
Hi,
I have never used proxmox and kvm in general.
Therefore, I decided to see how it would work. And I have questions.
In the guest system when working with a network or hard drives, CPU load is almost 100%. For example, when I download a file using wget (6-8 mb per second), or copy files within the guest system, the CPU load is almost 100%.

Proxmox was installed on debain squeeze. Virtual machines use a file-storing RAW format. Network card - e1000 emulation. HDD - ide emulation.
I would like to know if this is normal or not. And is it possible to reduce the CPU load on the guest in this case.

Code:
root@srv01:/# uname -a
Linux srv01 2.6.32-11-pve #1 SMP Tue Apr 3 10:21:21 CEST 2012 x86_64 GNU/Linux

Code:
root@srv01:/# pveversion -v
pve-manager: 2.0-57 (pve-manager/2.0/ff6cd700)
running kernel: 2.6.32-11-pve
proxmox-ve-2.6.32: 2.0-65
pve-kernel-2.6.32-11-pve: 2.6.32-65
pve-kernel-2.6.32-7-pve: 2.6.32-60
lvm2: 2.02.88-2pve2
clvm: 2.02.88-2pve2
corosync-pve: 1.4.1-1
openais-pve: 1.1.4-2
libqb: 0.10.1-2
redhat-cluster-pve: 3.1.8-3
resource-agents-pve: 3.9.2-3
fence-agents-pve: 3.1.7-2
pve-cluster: 1.0-26
qemu-server: 2.0-36
pve-firmware: 1.0-15
libpve-common-perl: 1.0-25
libpve-access-control: 1.0-17
libpve-storage-perl: 2.0-17
vncterm: 1.0-2
vzctl: 3.0.30-2pve2
vzprocps: 2.0.11-2
vzquota: 3.0.12-3
pve-qemu-kvm: 1.0-9
ksm-control-daemon: 1.1-1

Code:
root@srv01:/# cat /sys/devices/system/clocksource/clocksource0/available_clocksource
hpet acpi_pm
root@srv01:/# cat /sys/devices/system/clocksource/clocksource0/current_clocksource
hpet

Motherboard Intel 5000vsa, CPU - Intel Xeon 5405, hdd - sas 3,5" 15k seagate

Thank you.
 
what guest OS do you run? also post the guest settings (VMID.conf) file.
 
what guest OS do you run? also post the guest settings (VMID.conf) file.
ubuntu-server 10.04 x64:
Code:
[root@srv01:/etc/pve/qemu-server# cat 102.conf
bootdisk: ide0
cores: 1
cpu: kvm64
ide0: local:102/vm-102-disk-1.raw
ide2: none,media=cdrom
memory: 2048
name: star
net0: e1000=A6:2A:EB:73:C7:07,bridge=vmbr0
onboot: 1
ostype: l26
sockets: 1

debian squueze x86:
Code:
[root@srv01:/etc/pve/qemu-server# cat 101.conf
bootdisk: ide0
cores: 1
cpu: kvm32
ide0: local:101/vm-101-disk-1.raw
ide2: backup:iso/debian-6.0.4-i386-CD-1.iso,media=cdrom
memory: 512
name: 201.36
net0: rtl8139=5E:BA:E2:3A:45:D6,bridge=vmbr0
onboot: 1
ostype: l26
sockets: 1
 
try virtio for net (instead of e1000) and block (instead of IDE). ubuntu and debian got virtio drivers in the kernel.

small howto, all can be done via gui:

  1. poweroff the VM
  2. nic can just changed via hardware tab
  3. harddisks needs to be removed on the hardware tab and then re-added again with virtio
  4. after this, make sure to adapte the boot order.
  5. start the VM
 
try virtio for net (instead of e1000) and block (instead of IDE). ubuntu and debian got virtio drivers in the kernel.

small howto, all can be done via gui:

  1. poweroff the VM
  2. nic can just changed via hardware tab
  3. harddisks needs to be removed on the hardware tab and then re-added again with virtio
  4. after this, make sure to adapte the boot order.
  5. start the VM

Now, i have that it:
1.png

Code:
root@srv01:/# cat /etc/pve/qemu-server/102.conf
boot: cd
bootdisk: virtio0
cores: 1
cpu: kvm64
ide2: none,media=cdrom
memory: 2048
name: star
net0: virtio=A6:2A:EB:73:C7:07,bridge=vmbr0
onboot: 1
ostype: l26
sockets: 1
virtio0: local:102/vm-102-disk-1.raw
root@srv01:/#

I am downloading a file via wget (7 mb per sec)

The load has decreased, but ... Is this normal load now?
 
Last edited by a moderator:
compare it with the values on the host. wget is probably not the best tool to measure performance and load.
 
pls post your storage hardware details (raid controller, disks, raid level and setting), also the results of the simple 'pveperf' benchmark.
 
compare it with the values on the host. wget is probably not the best tool to measure performance and load.
There are not such problems on the host. The only problem with the guest systems. The problem occurs only with the guest system when working with the system IO (I wrote about wget only as a example).
Отменить изменения
 
pls post your storage hardware details (raid controller, disks, raid level and setting), also the results of the simple 'pveperf' benchmark.

Intel 5000 vsa internal raid (lsi 1064E)
2x HDD SAS Seagate ST3146855SS RAID 1, no other settings

all guest system was create with cache=none setting


Code:
root@srv01:/# ps waux | grep kvm
root        2445  0.0  0.0      0     0 ?        S    Apr06   0:00 [kvm-irqfd-clean]
root        2984  0.2  4.6 1195896 379660 ?      Sl   Apr06   3:31 /usr/bin/kvm -id 100 -chardev socket,id=monitor,path=/var/run/qemu-server/100.mon,server,nowait -mon chardev=monitor,mode=readline -vnc unix:/var/run/qemu-server/100.vnc,x509,password -pidfile /var/run/qemu-server/100.pid -daemonize -usbdevice tablet -name 201.35 -smp sockets=1,cores=1 -cpu kvm32 -nodefaults -boot menu=on -vga cirrus -k en-us -drive if=none,id=drive-ide2,media=cdrom,aio=native -device ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200 -drive file=/var/lib/vz/images/100/vm-100-disk-1.raw,if=none,id=drive-ide0,aio=native,cache=none -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=100 -m 1024 -netdev type=tap,id=net0,ifname=tap100i0,script=/var/lib/qemu-server/pve-bridge -device rtl8139,romfile=,mac=82:18:12:CE:BA:D0,netdev=net0,bus=pci.0,addr=0x12,id=net0 -cpuunits 1000
root        2997  0.0  0.0      0     0 ?        S    Apr06   0:06 [kvm-pit-wq]
root        3015 11.0  5.0 675056 414876 ?       Sl   Apr06 159:18 /usr/bin/kvm -id 101 -chardev socket,id=monitor,path=/var/run/qemu-server/101.mon,server,nowait -mon chardev=monitor,mode=readline -vnc unix:/var/run/qemu-server/101.vnc,x509,password -pidfile /var/run/qemu-server/101.pid -daemonize -usbdevice tablet -name 201.36 -smp sockets=1,cores=1 -cpu kvm32 -nodefaults -boot menu=on -vga cirrus -k en-us -drive file=/mnt/backups/template/iso/debian-6.0.4-i386-CD-1.iso,if=none,id=drive-ide2,media=cdrom,aio=native -device ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200 -drive file=/var/lib/vz/images/101/vm-101-disk-1.raw,if=none,id=drive-ide0,aio=native,cache=none -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=100 -m 512 -netdev type=tap,id=net0,ifname=tap101i0,script=/var/lib/qemu-server/pve-bridge -device rtl8139,mac=5E:BA:E2:3A:45:D6,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300 -cpuunits 1000
root        3028  0.0  0.0      0     0 ?        S    Apr06   0:06 [kvm-pit-wq]
root      106964 66.3  2.0 2315676 165712 ?      Sl   18:58   0:07 /usr/bin/kvm -id 102 -chardev socket,id=monitor,path=/var/run/qemu-server/102.mon,server,nowait -mon chardev=monitor,mode=readline -vnc unix:/var/run/qemu-server/102.vnc,x509,password -pidfile /var/run/qemu-server/102.pid -daemonize -usbdevice tablet -name star -smp sockets=1,cores=1 -cpu kvm64 -nodefaults -boot menu=on -vga cirrus -k en-us -drive if=none,id=drive-ide2,media=cdrom,aio=native -device ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200 -drive file=/var/lib/vz/images/102/vm-102-disk-1.raw,if=none,id=drive-virtio0,aio=native,cache=none -device virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa -m 2048 -netdev type=tap,id=net0,ifname=tap102i0,script=/var/lib/qemu-server/pve-bridge -device virtio-net-pci,romfile=,mac=A6:2A:EB:73:C7:07,netdev=net0,bus=pci.0,addr=0x12,id=net0
root      106977  0.0  0.0      0     0 ?        S    18:58   0:00 [kvm-pit-wq]
root      106989  0.0  0.0   7580   904 pts/1    S+   18:58   0:00 grep kvm

Code:
root@srv01:/# pveperf
CPU BOGOMIPS:      31920.57
REGEX/SECOND:      571521
HD SIZE:           18.33 GB (/dev/mapper/SYSTEM-debian)
BUFFERED READS:    129.15 MB/sec
AVERAGE SEEK TIME: 4.18 ms
FSYNCS/SECOND:     63.58
DNS EXT:           155.20 ms
 
Intel 5000 vsa internal raid (lsi 1064E)
2x HDD SAS Seagate ST3146855SS RAID 1, no other settings

...
Code:
root@srv01:/# pveperf
CPU BOGOMIPS:      31920.57
REGEX/SECOND:      571521
HD SIZE:           18.33 GB (/dev/mapper/SYSTEM-debian)
BUFFERED READS:    129.15 MB/sec
AVERAGE SEEK TIME: 4.18 ms
FSYNCS/SECOND:     63.58
DNS EXT:           155.20 ms

your FSYNCS/SECOND are much too low (needs to be at least 1000). you did not have write cache enabled on your raid controller (set it to write-back). and make sure your raid controller cache is protected by a BBU or similar.

but I suggest you use a better raid controller, fast IO is the most essential part.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!