How Secure Cookies Help Protect Your Login


A client messaged me last month, panicking. He was running two Windows VMs on a single VMware Workstation host to test some software across different versions, and one of them had suddenly gone sluggish — clicking a button took two full seconds to register.

His first guess was that the VM was infected. His second guess was that VMware was broken.

Neither was true. What actually happened was way more boring, and way more interesting once you understand it: his other VM was busy running a backup job at that exact moment, and it had grabbed almost all the CPU time available. The sluggish VM wasn't broken. It was just waiting in line.

That's the part nobody explains clearly when you're starting out with virtualization — a VM doesn't own a CPU. It borrows one, in tiny slices, constantly, alongside everything else fighting for the same processor.

Also Read: How Virtual Machines Use Your Computer's RAM


Your VM's "CPU" isn't really a CPU

When you create a VM and assign it, say, 4 vCPUs, it feels like you just handed it four physical processor cores, dedicated and locked in.

You didn't.

What you actually did was tell the hypervisor "this VM should behave as if it has 4 cores." The hypervisor is now responsible for making that illusion hold up, using whatever real physical cores your machine actually has.

If your laptop has an 8-core CPU and you're running three VMs each assigned 4 vCPUs, you've told your machine to somehow produce 12 vCPUs worth of work using 8 real cores. That's not a mistake on your part — it's completely normal, and it's called CPU oversubscription. Almost every virtualization setup does this to some degree.

The trick is that a CPU is fast enough to fake being in multiple places at once, as long as the scheduler managing it is doing its job properly.


Think of it like one chef, several tables

I explain this to clients using a restaurant analogy, because it's the one that actually sticks.

Imagine a single chef working the kitchen, and three tables that all ordered food at roughly the same time. The chef can't cook three meals simultaneously with one pair of hands — but a good chef works in short bursts. A few seconds on Table 1's order, switch, a few seconds on Table 2, switch, back to Table 1, and so on. Move fast enough, and every table gets their food in a reasonable time, even though only one dish was ever being cooked at any single instant.

Your physical CPU core is the chef. Each VM waiting for CPU time is a table. The hypervisor's scheduler is the person deciding which table gets attention next, and for how long.

This is why a 4 vCPU VM doesn't need four physical cores reserved just for it. It just needs the scheduler to keep handing it turns often enough that, from inside the VM, everything feels continuous.


The moment this actually clicked for me

I was running three VMs at once on my personal machine — a 6-core CPU, nothing fancy — while compressing a large video file in the background for a Fiverr job.

One of the VMs, a Linux box I was using to test a script, went from feeling instant to feeling like I was remote-controlling it from another country. Every keypress had a lag.

I opened Task Manager on the host and watched the CPU graph. It wasn't a crash. It was pegged near 100% across all cores, because the video compression job was eating everything it could get.

The VM wasn't broken. It simply wasn't getting called to the kitchen counter often enough. The moment the compression job finished, the VM snapped back to normal instantly — no restart, no fix, nothing. It had just been sitting in line the whole time.

That's when CPU scheduling stopped being an abstract concept for me and became something I could actually watch happen in real time.


Where you can actually see this happening

You don't need special software to observe CPU scheduling in action — most of it is visible with tools you probably already have open.

  • Windows Task Manager (Performance tab) shows real-time CPU usage per core on the host, which tells you how much "kitchen capacity" is currently being fought over.
  • htop or top on a Linux host shows the same thing, plus per-process CPU percentage, so you can see exactly which VM process (like VBoxHeadless or a qemu-system process) is currently hogging cycles.
  • VMware's esxtop (on ESXi hosts) goes a level deeper and shows a metric called %RDY, or "ready time" — literally the percentage of time a virtual CPU was ready to run but had to wait for a physical core to become free. High %RDY is the exact technical version of "your VM is sitting in line."
  • Hyper-V's Resource Metering and VirtualBox's built-in performance graphs show similar CPU contention info, just with different labels.

If you've never actually looked at these while a VM feels slow, it's worth doing once. Watching the number that explains the lag is far more convincing than reading about it.




What you can actually control

You're not completely at the mercy of the scheduler. There are a few real settings worth knowing.

1. vCPU count isn't "more is always better"

Assigning a VM 6 vCPUs on a 4-core host doesn't make it faster — it can actually make it slower, because the scheduler now has to find six free slots at once before certain operations proceed smoothly. I've fixed sluggish VMs before simply by lowering the vCPU count to match realistic usage, not maximum ambition.

2. CPU execution caps exist for a reason

VirtualBox lets you set an Execution Cap percentage per VM, limiting how much CPU time it's allowed to take even if it's available. I use this on background VMs I don't want competing with whatever I'm actively working in.

3. CPU affinity and pinning are real, but rarely necessary

Some hypervisors let you pin a VM to specific physical cores. It sounds powerful, but for most everyday use it actually removes flexibility from the scheduler and can hurt performance rather than help it. I've only used this for very specific latency-sensitive testing, never for normal workloads.

4. Priorities matter more than raw allocation

On the host OS, you can lower the process priority of a VM you don't currently need responsive — via Task Manager on Windows or nice/renice on Linux — effectively telling the scheduler "serve this table last" without shutting the VM down.


A quick way to check if CPU scheduling is your actual problem

Next time a VM feels slow and you're not sure why, here's the order I actually go through:

  • Step 1 — Check host CPU usage first, not VM usage. If all physical cores on the host are near 100%, the VM isn't broken — everything is just waiting its turn.
  • Step 2 — Count your total vCPUs across all running VMs and compare that to your physical core count. If you're wildly oversubscribed and everything is running heavy workloads at once, that's your answer.
  • Step 3 — Look at what else is competing. A backup job, a game, a render, another VM — anything eating sustained CPU on the host steals turns from everyone else.
  • Step 4 — Only then start adjusting settings, like vCPU count or execution caps, rather than assuming something is corrupted or misconfigured.

Skipping straight to Step 4 without doing Steps 1 through 3 is exactly how I used to waste time "fixing" VMs that were never actually broken.

Also Read: What Happens When a Virtual Machine Crashes


Where people usually get confused

The biggest misunderstanding I see — and made myself early on — is treating "vCPU" as a guaranteed reservation instead of a scheduling request. A 4 vCPU VM is a promise the hypervisor tries to keep, not a hardware lock.

The second is assuming a slow VM means something is wrong with the VM itself, rather than checking what else is running on the host at that exact moment. Nine times out of ten, in my experience, the real cause is sitting outside the VM entirely.

And the third is over-allocating vCPUs "just in case" — which, counterintuitively, often makes performance worse instead of better, because the scheduler has a harder job to do.


Final thoughts

If you only remember one thing from all of this, make it that a virtual CPU isn't a smaller version of a real one. It's a turn in line, handed out by a scheduler that's busy juggling everyone else's turns too.

Once you can actually see that happening on your own machine — a CPU graph pegged at 100%, a VM that unfreezes the second the real bottleneck clears — VM slowdowns stop being mysterious and start being something you can genuinely diagnose instead of guess at.

Hashir
Author At TopicGems • Published Tuesday, September 15, 2026
Hashir is a freelance cybersecurity professional and web developer, working with clients since 2022. He writes about virtualization, networking, and cloud infrastructure based on hands-on client work.

comments