You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Simon Weller <sw...@ena.com> on 2016/12/01 01:14:24 UTC

Re: vm use more cpu than restricted [kvm]

Hi Stefan,


This sounds very odd.


Can you do a virsh dumpxml <vdomainid from virsh list> on the host so we can see what configuration has been written to the xml configuration?


Thanks,


Simon


________________________________
From: Stefan Beigel <be...@gmail.com>
Sent: Wednesday, November 30, 2016 3:29 PM
To: users@cloudstack.apache.org
Subject: vm use more cpu than restricted [kvm]

Hi,

I'am using cloudstack with a small scale deployment and the following
configuration:

cloudstack version: 4.8

hosts:
 - cpu: 2x 2400 mhz
 - memory: 4GB
 - os: ubuntu 14.04 64 bit

vm:
 - cpu: 1x 500 mhz
 - memory: 500 mb
 - os: ubuntu 14.04 64 bit

I tried some tests and when I utilize the vm to 100% the host gets utilize
to 50%.
So one vm with 500 mhz gets 2400 mhz from the hosts.
Is this normal or a bug?
I enabled the "cpu cap" option for the used service offering.

Hope someone can Help.
Greets Stefan

Re: vm use more cpu than restricted [kvm]

Posted by Stefan Beigel <be...@gmail.com>.
Hallo Simon

This is the xml file of the virtual machine.

greets Stefan

<domain type='kvm' id='7'>
  <name>i-4-118-VM</name>
  <uuid>0c795c99-5bab-46f8-a321-71e3e398036b</uuid>
  <description>Ubuntu 14.04 (64-bit)</description>
  <memory unit='KiB'>512000</memory>
  <currentMemory unit='KiB'>512000</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <cputune>
    <shares>500</shares>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <sysinfo type='smbios'>
    <system>
      <entry name='manufacturer'>Apache Software Foundation</entry>
      <entry name='product'>CloudStack KVM Hypervisor</entry>
      <entry name='uuid'>0c795c99-5bab-46f8-a321-71e3e398036b</entry>
    </system>
  </sysinfo>
  <os>
    <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type>
    <boot dev='cdrom'/>
    <boot dev='hd'/>
    <smbios mode='sysinfo'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <cpu>
  </cpu>
  <clock offset='utc'>
    <timer name='kvmclock'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/kvm-spice</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source
file='/mnt/a5bb6304-61f7-3d9e-9706-1f447a6a5fdb/af0c4ab6-aaad-4990-9046-da6ac83a575f'/>
      <target dev='vda' bus='virtio'/>
      <serial>af0c4ab6aaad49909046</serial>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw' cache='none'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <alias name='ide0-1-0'/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x1'/>
    </controller>
    <interface type='bridge'>
      <mac address='06:0b:00:00:00:15'/>
      <source bridge='cloudbr0'/>
      <bandwidth>
        <inbound average='25600' peak='25600'/>
        <outbound average='25600' peak='25600'/>
      </bandwidth>
      <target dev='vnet8'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/4'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/4'>
      <source path='/dev/pts/4'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='5903' autoport='yes' listen='10.0.0.11'>
      <listen type='address' address='10.0.0.11'/>
    </graphics>
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x0'/>
    </video>
    <memballoon model='none'>
      <alias name='balloon0'/>
    </memballoon>
  </devices>
  <seclabel type='none'/>
</domain>


2016-12-01 2:14 GMT+01:00 Simon Weller <sw...@ena.com>:

> Hi Stefan,
>
>
> This sounds very odd.
>
>
> Can you do a virsh dumpxml <vdomainid from virsh list> on the host so we
> can see what configuration has been written to the xml configuration?
>
>
> Thanks,
>
>
> Simon
>
>
> ________________________________
> From: Stefan Beigel <be...@gmail.com>
> Sent: Wednesday, November 30, 2016 3:29 PM
> To: users@cloudstack.apache.org
> Subject: vm use more cpu than restricted [kvm]
>
> Hi,
>
> I'am using cloudstack with a small scale deployment and the following
> configuration:
>
> cloudstack version: 4.8
>
> hosts:
>  - cpu: 2x 2400 mhz
>  - memory: 4GB
>  - os: ubuntu 14.04 64 bit
>
> vm:
>  - cpu: 1x 500 mhz
>  - memory: 500 mb
>  - os: ubuntu 14.04 64 bit
>
> I tried some tests and when I utilize the vm to 100% the host gets utilize
> to 50%.
> So one vm with 500 mhz gets 2400 mhz from the hosts.
> Is this normal or a bug?
> I enabled the "cpu cap" option for the used service offering.
>
> Hope someone can Help.
> Greets Stefan
>