Use this when a VM is slow and may be capped by a CPU limit.
CPU Limits
A CPU limit caps how much CPU (in MHz or percent) a VM may use even when the host is idle. Limits are rarely needed and easily cause unexplained slowness and high ready time, so use them deliberately.
1. A CPU limit caps usage even when the host is idle.
2. Causes throttling (%MLMTD, cpu.stat throttled).
3. Use only for noisy or licensing-limited VMs.
4. Prefer fewer vCPUs.
5. Monitor throttling.
vCPU demand → limit → throttled
Context & applicabilityCommon mistakes · platform/version boundaries
- Limits copied from templates.
- Limits set to "save" capacity that slow VMs even on idle hosts.
- Forgetting limits after a performance test.
Operational reference
Fast context before you go deeper.
Get-VM | Get-VMProcessor | Where-Object Maximum -lt 100 | Select VMName,MaximumVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Finding limits Verify boundary
# PowerCLI
Get-VM | Get-VMResourceConfiguration | Where-Object { $_.CpuLimitMhz -ne -1 } | Select VM,CpuLimitMhz
# Hyper-V
Get-VM | Get-VMProcessor | Where-Object Maximum -lt 100 | Select VMName,Maximum
In esxtop, %MLMTD above 0 shows a VM being held back by a limit.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Limits apply even when idle.
- Often forgotten after testing.
- Ready time rises under a limit.
qm set <vmid> --cpulimit 2— cap at 2 cores (Proxmox)Set-VMProcessor <vm> -Maximum 50— cap at 50 % (Hyper-V)cat /sys/fs/cgroup/machine.slice/*/cpu.max— cgroup quota
ReferenceWhy it matters1 section · depth on demand
Why to avoid limits
A limit caps CPU even when the host is idle. The guest sees slow performance and high CPU ready, but host CPU looks free, which is confusing. Remove leftover limits from templates; use shares or reservations to protect other VMs instead. Check on ESXi with the VM's resource settings or esxtop (%MLMTD shows time held back by a limit).
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
A CPU limit caps a VM's CPU in MHz (VMware), percent (Hyper-V "Virtual machine limit") or CPU units (cpulimit in Proxmox, cgroup quota on KVM).
qm set 120 --cpulimit 2 # max 2 cores' worth of time
Set-VMProcessor vm1 -Maximum 50 # Hyper-V: 50 % of assigned vCPUs
virsh schedinfo vm1 --set vcpu_quota=50000 vcpu_period=100000
A limited VM shows high CPU ready / steal time even on idle hosts. Check for forgotten limits (often inherited from templates) when a VM is unexpectedly slow.
ReferenceConfiguration & state1 section · depth on demand
Removing limits
Get-VM vm01 | Get-VMResourceConfiguration | Set-VMResourceConfiguration -CpuLimitMhz $null
Set-VMProcessor -VMName vm01 -Maximum 100
Documented example, not captured output.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Resource Management → CPU Limits. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://libvirt.org/html/libvirt-libvirt-domain.html · confidence 94%