1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

KVM CPU Limits

Discussion in 'Proxmox VE: Installation and configuration' started by CobraHost, Apr 9, 2012.

  1. CobraHost

    CobraHost New Member

    Joined:
    Feb 17, 2012
    Messages:
    23
    Likes Received:
    0
    Hello,

    Is it possible to add CPU limits on Proxmox VE 2.x with KVM ?
     
  2. tylerdurden81

    tylerdurden81 Member

    Joined:
    Jan 8, 2011
    Messages:
    124
    Likes Received:
    0

    Yes
     
  3. CobraHost

    CobraHost New Member

    Joined:
    Feb 17, 2012
    Messages:
    23
    Likes Received:
    0
    How do we do this?
     
  4. tylerdurden81

    tylerdurden81 Member

    Joined:
    Jan 8, 2011
    Messages:
    124
    Likes Received:
    0
    When you are creating a VM and it asks about cores .. If you give the VM 1 core .. it can only use one physical core, this is the way I understand it.
     
  5. CobraHost

    CobraHost New Member

    Joined:
    Feb 17, 2012
    Messages:
    23
    Likes Received:
    0
    That is not limiting the CPU to a certain amount of units or amount per core.

    when we use 100% of 1 core, it raises the CPU usage to around 20% on a 16core AMD CPU.

    XEN/VMware you can limit it to a certain amount of Ghz and that won't happen.
     
    #5 CobraHost, Apr 9, 2012
    Last edited: Apr 9, 2012
  6. tylerdurden81

    tylerdurden81 Member

    Joined:
    Jan 8, 2011
    Messages:
    124
    Likes Received:
    0
    From what I understand you can not limit each cpu. You can add weight to a vm so it has more or less priority over CPU time. This really only comes into play (from what I understand) if the Physical cpu is over a certain usage percent. there is some DOCS about it here http://pve.proxmox.com/pve2-api-doc/ expand nodes, qemu, vmid and click on config then put
     
  7. CobraHost

    CobraHost New Member

    Joined:
    Feb 17, 2012
    Messages:
    23
    Likes Received:
    0
    I'm guessing.

    cpunits: 100 = 10%
    cpuunits: 1000 = 100%

    That is per core ?
     
  8. tylerdurden81

    tylerdurden81 Member

    Joined:
    Jan 8, 2011
    Messages:
    124
    Likes Received:
    0
    No it dosn't work like that. It is weight based on the numbers given to other running VM's
     
  9. CobraHost

    CobraHost New Member

    Joined:
    Feb 17, 2012
    Messages:
    23
    Likes Received:
    0
    So we cannot limit single VM using a lot of CPU to 10% ?

    It has to be active on every other VPS.
     
  10. tylerdurden81

    tylerdurden81 Member

    Joined:
    Jan 8, 2011
    Messages:
    124
    Likes Received:
    0
    I suggest you read through the WIKI to understand better. But you can limit a VM to the power of one physical CPU. Not less. Now if the Physical cpu useage gets high you can give some VM's more priority over CPU time. But you can not limit a VM to less power. Now i am not a expert but this is how I understand it.
     

Share This Page