CPU-Usage on kvm-guest in PVE1.9

udo

Distinguished Member
Apr 22, 2009
5,981
204
163
Ahrensburg; Germany
Hi,
i had yesterday evening updated one production-server from 1.8/2.6.35 to 1.9/2.6.32.
The update process run very well and the VMs also.
But on one kvm-guest (an router with ipsec-gateway) i see this morning cpu-loads of 12-30%. This is for such an VM not normal.
I take a look inside the VM: nothing! No diskio and also not realy network-io.

Who eat the CPU-power??

top inside VM:
Code:
top - 08:09:08 up  9:15,  2 users,  load average: 0.00, 0.00, 0.00
Tasks:  61 total,   1 running,  60 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.3%sy,  0.0%ni, 99.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    513628k total,    72116k used,   441512k free,    14436k buffers
Swap:   524280k total,        0k used,   524280k free,    36212k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                      
 4632 root      20   0  2072  996  792 S  0.3  0.2   0:00.63 top                                                                                                          
    1 root      20   0  1592  596  500 S  0.0  0.1   0:01.21 init                                                                                                         
    2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd                                                                                                     
    3 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0                                                                                                  
    4 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0
...
top on the host (pid 12658 is the one of this VM)
Code:
top - 08:09:06 up  9:31,  1 user,  load average: 0.07, 0.10, 0.04
Tasks: 267 total,   1 running, 266 sleeping,   0 stopped,   0 zombie
Cpu(s): 11.7%us,  5.8%sy,  0.0%ni, 82.4%id,  0.1%wa,  0.0%hi,  0.1%si,  0.0%st
Mem:  16429576k total,  9755832k used,  6673744k free,    66104k buffers
Swap:  4194296k total,        0k used,  4194296k free,   733564k cached

    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                    
   8184 root      20   0  642m 253m 1844 S   32  1.6  83:09.03 kvm                                                                                                        
  12658 root      20   0  724m 140m 2004 S   23  0.9 108:42.16 kvm                                                                                                        
  16315 root      20   0 3740m 3.5g 2008 S    6 22.6  44:07.71 kvm                                                                                                        
   8208 root      20   0  973m 111m 1852 S    4  0.7  19:07.87 kvm                                                                                                        
  10250 root      20   0  717m 161m 1848 S    3  1.0  16:44.71 kvm                                                                                                        
  13168 root      20   0 3287m 431m 1860 S    2  2.7  13:32.75 kvm                                                                                                        
   9961 root      20   0  632m 527m 1784 S    1  3.3  14:57.24 kvm                                                                                                        
 139242 root      20   0 90468  25m 2136 S    1  0.2   0:11.09 pvedaemon                                                                                                  
   9034 root      20   0 1219m 1.0g 1872 S    1  6.5   5:52.05 kvm                                                                                                        
   9060 root      20   0  902m 790m 1872 S    0  4.9   3:13.25 kvm                                                                                                        
      1 root      20   0 10320  748  616 S    0  0.0   0:00.79 init                                                                                                       
      2 root      20   0     0    0    0 S    0  0.0   0:00.00 kthreadd
...
some more info:
Code:
pveversion -v
pve-manager: 1.9-24 (pve-manager/1.9/6542)
running kernel: 2.6.32-6-pve
proxmox-ve-2.6.32: 1.9-47
pve-kernel-2.6.32-3-pve: 2.6.32-14
pve-kernel-2.6.35-1-pve: 2.6.35-11
pve-kernel-2.6.24-7-pve: 2.6.24-11
pve-kernel-2.6.32-6-pve: 2.6.32-47
qemu-server: 1.1-32
pve-firmware: 1.0-14
libpve-storage-perl: 1.0-19
vncterm: 0.9-2
vzctl: 3.0.29-2pve1
vzdump: 1.2-16
vzprocps: 2.0.11-2
vzquota: 3.0.11-1
pve-qemu-kvm: 0.15.0-1
ksm-control-daemon: 1.0-6
Code:
more /etc/qemu-server/121.conf 
name: ipsec-vlan99-router
ide2: local:iso/dl1.4-i686-server.iso,media=cdrom
ostype: l26
virtio0: a_sas_r0:vm-121-disk-1
memory: 512
sockets: 1
localtime: 1
boot: d
freeze: 0
cpuunits: 1000
vga: cirrus
acpi: 1
kvm: 1
onboot: 1
description: ersetzt ipsec_n
cores: 1
vlan90: e1000=42:9E:D6:87:8B:FA
vlan99: e1000=E6:C2:12:81:17:08
The kernel inside the VM is an 2.6.32.25.

Any hints ??

Best regards

Udo
 
top is not very specific IMHO.

Try atop (patches not needed) on both the host and vm. Sometimes htop is not bad either.

Regards, holger
 
top is not very specific IMHO.

Try atop (patches not needed) on both the host and vm. Sometimes htop is not bad either.

Regards, holger
Hi Holger,
unfortunately the VM guest is an linux live distro (devil-linux) without atop or htop onboard.

But i have upgraded in the meantime the second cluster-node and after live-migration of the VM the CPU-Usages is at 0%.
Also after migration back this effect don't occur.
All looks fine now... Very strange!

Udo