The Proxmox VE 9.2.4 administration guide documents CPU affinity as a way to restrict where a VM can run on the host. For ordinary VMs and multi-tenant workloads with changing demand, keep the default scheduler. Test affinity only when a critical workload has a measured scheduling or latency problem and the team can monitor and roll back the change. Pinning limits the eligible CPUs; it does not reserve cores or guarantee faster performance. (Proxmox VE 9.2.4 administration guide)
This guide is for system administrators considering affinity before confirming a CPU bottleneck.
It also helps MSPs separate customer resource limits from CPU placement, and small IT teams avoid unnecessary tuning.
If the workload is temporary or has no measurable CPU scheduling problem, leave affinity unset.
Proxmox CPU pinning: default scheduling or affinity?
A VM receives virtual CPUs, or vCPUs. The host scheduler decides when its virtual CPU threads run on physical CPUs. CPU affinity narrows the host CPUs on which the VM process may run. These choices solve different problems: vCPU count sets what the guest can see, while affinity constrains where its work can be scheduled.
Default scheduling is the better starting choice unless monitoring shows a specific placement problem.
Compare the options by management fit:
- Default scheduling — Strong fit for ordinary VMs. The host can place runnable work across its available CPUs without an administrator maintaining a fixed map. This reduces configuration overhead when VM demand changes.
- CPU affinity — Conditional fit for a measured, stable workload. Restricting a VM to a CPU set can make placement more predictable, but it also reduces the scheduler’s placement options. That trade-off needs to be tested under the actual workload.
- CPU limit or weight — Better fit when the goal is to manage competing workloads. A limit can constrain CPU consumption; a weight influences relative access under contention. Neither is the same as restricting a VM to particular CPUs. Proxmox’s guide describes VM CPU settings, while the systemd resource-control documentation explains how CPU controls such as quotas and weights differ from placement.
Treat these fit ratings as a decision aid, not as benchmark results. An affinity setting can help answer “where may this VM run?” It does not answer “how much host CPU is reserved for it?” A VM without affinity can still experience contention when several workloads need CPU time at once. That is a capacity and scheduling question, not proof that every VM needs pinning.
A single-admin lab: flexibility over fixed placement
For a homelab, development environment, or lightly used test host, default scheduling is usually easier to operate. Workloads often start and stop at different times, and a VM that is quiet today may become busy during a test tomorrow. A fixed CPU set can make that VM harder to balance without solving a problem that has not been observed.
CPU affinity is useful in a lab when a repeatable test requires a VM to stay within a known CPU range, or when measurements show that placement changes are contributing to inconsistent results. Even then, compare repeated runs under similar host conditions. A single fast run after pinning does not establish that affinity caused the improvement.
The Linux CPU affinity interface documentation defines affinity as the set of CPUs on which a thread is eligible to run. Eligibility is not exclusivity: other eligible processes may run on those same CPUs. A lab operator should therefore treat pinning as a placement constraint, not as a way to carve out private cores.
MSP operations: placement is not tenant isolation
In a multi-customer environment, affinity can appear to offer a simple way to keep one customer’s VM away from another’s. That interpretation is unsafe. If two VMs are allowed to run on overlapping CPU sets, they can still compete for those CPUs. If their sets do not overlap, that still does not make the selected CPUs exclusive unless the rest of the host workload is managed accordingly.
Separate the controls by the service objective:
- vCPU allocation determines the virtual CPU resources presented to a guest. It is not a promise that those CPUs are continuously available.
- Affinity limits the host CPUs on which VM work may run. It does not reserve those CPUs for that VM.
- Resource limits and weights shape consumption or relative access when workloads contend. They do not establish fixed CPU placement.
- Host CPU isolation is a broader host-level design. It requires planning for other host tasks and workloads, not just setting affinity on one VM. The Linux kernel CPU-isolation guide describes the additional considerations involved.
Before changing placement for a customer VM, define the service target and who owns the change. If the issue is excess CPU demand across tenants, first review utilization, workload peaks, and resource policy. Do not promise isolation or performance based on affinity alone. A community discussion about allocating host cores across VMs is useful as a reminder that operators make different choices for different workloads, but it is an individual case, not a general sizing rule. (Community discussion)
Critical services: test a suspected scheduling bottleneck
For a service with a latency or stability target, start by determining whether CPU scheduling is actually the limiting factor. A CPU-related symptom can also come from a guest’s own configuration, storage delays, network waits, or a workload that simply needs more processing capacity. Pinning the VM before checking those alternatives can add operational constraints while leaving the real problem unchanged.
Record the same workload before and after any test. Keep the guest configuration, workload, and observation method consistent enough to make the comparison meaningful. Look for persistent pressure rather than reacting to a brief spike. The Linux Pressure Stall Information documentation explains how CPU pressure can be observed through PSI; it is one signal to interpret alongside VM and host monitoring, not a standalone diagnosis.
A useful review asks:
- Does CPU pressure recur during the service’s normal busy period?
- Does the VM show a CPU scheduling concern at the same time?
- Are storage, network, or guest-level limits a more plausible explanation?
- Does affinity improve the target workload without worsening other VMs?
- Can the team maintain and audit the placement as workload needs change?
Do not report a performance gain unless the test supports it. If the evidence is inconclusive, remove the experimental setting and keep the default scheduler.
Development and nested virtualization: preserve room to change
Development and test VMs tend to change more often than stable production services. Teams may adjust vCPU counts, change guest workloads, or move a VM as part of a test. A fixed affinity can make that work less flexible, especially if the permitted CPU set no longer matches the test plan.
Nested virtualization adds another layer to troubleshoot. It is a separate capability from CPU affinity: enabling a guest to run its own virtualization workloads does not, by itself, determine which host CPUs the outer VM may use. Check the Proxmox VE 9.2 guide for the relevant VM CPU configuration, then validate the intended nested workload independently. Do not treat pinning as a substitute for choosing a compatible CPU type or checking guest virtualization support.
The kernel’s cpuset documentation provides additional context on constraining tasks to CPU sets. Use it to understand the host-level concept, not as a reason to apply manual host controls without checking how Proxmox manages the VM.
Capacity planning: affinity is not a VM-count formula
For a VPS reseller or a team consolidating many services, pinning does not calculate how many VMs a host can safely support. A fixed ratio between pinned CPUs and saleable VM vCPUs would ignore workload type, peak overlap, host services, and the amount of CPU pressure the service can tolerate.
Use monitoring and service requirements to set capacity policy. Decide whether customers need a resource ceiling, a relative scheduling priority, or a specific CPU placement constraint. Those are separate requirements and may call for different controls. Revisit the policy when workload patterns change; do not infer a safe capacity from a pinning map.
A simple selection rule is more reliable:
- If the workload is ordinary, bursty, or lightly loaded, keep default scheduling and observe it under representative demand.
- If a critical VM has a repeatable CPU scheduling or latency issue, test affinity on that VM only and compare the same workload before and after.
- If the goal is to limit or prioritize customer CPU consumption, review resource controls and capacity policy rather than treating affinity as a reservation.
- If the team cannot monitor the result or restore the prior configuration, do not deploy the affinity change yet.
Controlled rollout: test, verify, and roll back
Use a small, reversible change rather than applying a pinning policy across the host. The Proxmox VE 9.2.4 guide is the reference for the version’s VM CPU settings and affinity behavior. Check that documentation before changing a production VM; do not copy an example from a different version or host configuration without verifying it.
- Choose a non-critical VM. Select a workload that can be tested without putting a customer-facing service at risk. Write down what problem the trial is meant to address.
- Record the current state. Note the VM’s CPU configuration, host CPU topology, recent workload pattern, and relevant monitoring observations. Save the current configuration so it can be restored.
- Check the host and guest context. Confirm which CPUs the host can use and whether other VMs or host services rely on the same CPUs. Avoid assuming that a VM’s vCPU count maps one-to-one to physical cores.
- Define the comparison. Select the workload and observations before changing affinity. Include CPU pressure and the service metric that matters, such as completion time or response consistency. Keep other relevant conditions as steady as practical.
- Apply a limited test. Use the VM CPU affinity controls documented for Proxmox VE 9.2. Avoid unrelated changes to vCPU count, CPU type, resource limits, or host isolation during the same trial.
- Review results and side effects. Compare the before-and-after records. Check whether other VMs or host services became less responsive. If the result is unclear or negative, restore the saved configuration.
- Document the decision. Record the reason, tested workload, observed result, owner, and rollback procedure. Expand the policy only after the team can explain why it helps this workload and how it will be maintained.
Before changing a production VM, save its current settings, arrange a maintenance window if service behavior could be affected, and confirm that the rollback can be completed without relying on the experimental affinity setting.
Choosing the right host for a VM pool
CPU affinity is a host resource-management choice. It works best when the host’s CPU layout, VM workload, and operational controls are understood together. When a team has confirmed that it needs a dedicated host for a managed VM pool, compare the actual CPU and system options on the RootAMD hardware page rather than assuming a particular CPU topology or Proxmox configuration. The RootAMD pricing page can help compare rental options, but the listed host specifications—not a generic affinity rule—should determine whether a configuration fits.
Shared VPS and public cloud instances can suit light, temporary workloads or services that need rapid elasticity. For a long-running VM pool, shared CPU scheduling, provider-defined resource boundaries, and limited control over host placement may make it harder to manage predictable workloads. If the workload needs a dedicated CPU environment and hands-on control of Proxmox, a RootAMD dedicated AMD bare-metal server is a more appropriate option to evaluate. Check the current host specifications first, then use the RootAMD order page only if those capabilities match the deployment plan.
RootAMD EPYC 7543P Dedicated Server
From $456.3/month
