Shared vs Dedicated vCPU: How to Choose the Right VM Class

Serdar Tekin
Serdar Tekin
Co-Founder & CTO
Updated Nov 17, 202612 min read
Written for: Developers, CTOs, and small infrastructure teams comparing shared CPU vs dedicated CPU for cloud VMs, VPS workloads, production apps, CI, and sustained compute.
VM Machine ClassesShared vCPUDedicated vCPUCPU PerformanceCloud VM
Last reviewed:
Guide
Shared vs Dedicated vCPU: How to Choose the Right VM Class
rafftechnologies.com/learn
On this page

Key Takeaways

Shared CPU vs dedicated CPU is primarily a trade-off between cost efficiency and CPU predictability. Shared vCPU fits bursty and variable workloads when CPU consistency is not the constraint. Dedicated vCPU becomes relevant when sustained CPU pressure repeatedly affects latency, build duration, worker throughput, queue processing, or another measurable outcome. Raff Cost-Optimized is a separate, lower-cost class for Linux and FreeBSD with DDR4, node-local NVMe and a 1 Gbps port; its CPU entitlement must not be inferred from price or vCPU count.

Choose shared vCPU or dedicated CPU-Optimized plans on Raff.

  1. 1Pick a Linux imageUbuntu, Debian and more, with your SSH key added.
  2. 2Choose a sizeFrom $4.99 a month. Resize when your app grows.
  3. 3Connect over SSHYour server is up in about 55 seconds.

Ubuntu, Debian and other Linux distributions with full root and SSH access, up and running in about 55 seconds.

Shared vs dedicated vCPU describes how a cloud VM receives CPU time. Shared vCPU uses host compute scheduled across multiple VMs; dedicated vCPU reserves CPU capacity for one VM so sustained compute behavior is more predictable.

The practical choice is straightforward: use shared vCPU when the workload is bursty, variable, or cost-sensitive and CPU consistency is not the bottleneck. Consider dedicated vCPU when sustained CPU pressure repeatedly affects latency, build time, queue processing, or another measurable workload outcome.

On Raff, General Purpose uses shared vCPU, while CPU-Optimized uses dedicated compute. Raff also offers a separate Cost-Optimized family for Linux and FreeBSD with previous-generation DDR4 hardware, local NVMe and a 1 Gbps public port. The published Cost-Optimized class description should not be treated as a dedicated-vCPU guarantee; verify CPU allocation and sustained-use rules for that plan before drawing conclusions from the price. This guide focuses on shared versus dedicated CPU scheduling, not on ranking VM classes solely by cost. For the broader choice between balanced and CPU-focused machines, start with Cloud VM Machine Classes Explained. If the question is simply whether you need 2 vCPU or 4 vCPU, use 2 vCPU vs 4 vCPU Cloud VMs.

Shared vs dedicated vCPU at a glance

Shared and dedicated vCPU can both run production workloads. The difference is what you are paying to control.

FactorShared vCPUDedicated vCPU
CPU allocationHost CPU time is scheduled across multiple VMsCPU capacity is reserved for the VM
Main advantageLower cost for variable workloadsMore predictable sustained CPU behavior
Main trade-offMore potential performance variationHigher cost for reserved compute
Strong starting fitWebsites, dev, staging, small apps, variable APIsCI runners, busy workers, compute-heavy services, latency-sensitive apps
Production useValid when CPU consistency is not the constraintUseful when consistency has measurable value
Raff familyGeneral PurposeCPU-Optimized

A useful mental model is: shared vCPU buys cost efficiency; dedicated vCPU buys CPU predictability.

Neither class fixes insufficient RAM, slow storage, inefficient queries, external API latency, or application code that cannot use additional CPU.

The decision starts with sustained CPU behavior

The decision should connect CPU pressure to a workload outcome.

EvidenceBetter first decisionWhy
CPU is usually low with short burstsShared vCPUReserved compute would sit unused much of the time
Brief deployment or traffic spikesStay shared and observeShort spikes alone do not prove a consistency problem
Sustained CPU around 70–80% with rising latency or queue timeInvestigate CPU class and sizeCompute may be controlling the workload
CPU pressure repeats during equivalent builds or jobsDedicated vCPU becomes a candidatePredictable compute can matter to completion time
p95/p99 latency rises with sustained CPU pressureDedicated vCPU becomes a candidateTail latency may be sensitive to CPU scheduling
CPU is moderate but RAM is exhausted or swap is activeAdd memory or change memory classCPU allocation is not the primary constraint
CPU is low but database queries are slowDiagnose queries, locks, storage, or connectionsDedicated CPU would not address the main wait
Development or staging workload is intermittentShared vCPUCost efficiency usually matters more than strict consistency
Worker or CI workload runs CPU-bound for long periodsDedicated vCPUSustained compute makes reservation more useful

The 70–80% range is an investigation trigger, not a universal threshold. A workload can operate correctly at high utilization, while another can miss latency goals at a lower average. The important relationship is CPU pressure plus impact.

In Raff infrastructure work, the useful evidence is repeatability. If CPU pressure and user-visible latency or job duration rise together under comparable load, changing CPU class is defensible. If memory, storage, queries, or a dependency controls the outcome, dedicated CPU usually does not fix the problem.

Decision framework for choosing shared or dedicated vCPU based on workload behavior.

Shared vCPU fits bursty and cost-sensitive workloads

Shared vCPU is usually the sensible default when compute demand is variable and occasional CPU variation does not create a meaningful business or operational problem.

Good fits include:

  • websites and content applications with uneven request patterns;
  • development and staging environments;
  • internal tools with intermittent usage;
  • early SaaS applications with modest traffic;
  • small APIs that spend substantial time waiting on databases or external services;
  • test servers and temporary environments;
  • workloads where memory or storage matters more than sustained compute.

Shared CPU is also valid for production when the application is healthy on it. “Production” describes responsibility, not CPU behavior. A low-traffic customer application with comfortable latency and resource headroom does not become CPU-bound merely because users pay for it.

Stay on shared vCPU when the workload meets its latency and throughput targets and CPU pressure is not repeatably controlling the outcome. If more headroom is needed, a larger shared VM may be a simpler and more economical change than moving immediately to dedicated compute.

Use Raff General Purpose VM Plans to compare current shared-vCPU sizes.

Dedicated vCPU fits sustained or latency-sensitive compute

Dedicated vCPU becomes more useful as compute demand becomes sustained, repeatable, and expensive to vary.

Common candidates include:

  • CI/CD runners with CPU-bound builds or test suites;
  • queue workers processing jobs continuously;
  • encoding, compression, compilation, or transformation workloads;
  • CPU-heavy application services;
  • customer-facing APIs where tail latency correlates with CPU pressure;
  • databases whose measured workload is genuinely CPU-bound;
  • scheduled processing that must finish inside a predictable window.

The strongest case is a workload where execution time has operational value. If a build blocks every deployment, a worker queue has a deadline, or request latency directly affects users, greater CPU predictability may justify the additional cost.

Dedicated CPU is not automatically the right database class. A database can be limited by memory, query plans, indexes, locks, connections, or storage latency. Confirm CPU is controlling the workload before changing allocation model.

Likewise, a CPU-Optimized VM is not a substitute for application tuning. Reserved compute can make CPU-bound execution more predictable, but it cannot remove work the application should not be doing.

Workload map showing where shared vCPU and dedicated vCPU are better fits.

More vCPU and dedicated vCPU solve different problems

A common mistake is treating “more vCPU” and “dedicated vCPU” as the same upgrade.

More vCPU increases available compute capacity. Dedicated vCPU changes how predictably CPU capacity is allocated. A workload may need one, the other, both, or neither.

SituationBetter first move
Shared VM is consistently CPU-saturatedTest a larger shared size or dedicated class
CPU utilization is moderate but execution time varies under comparable loadTest dedicated CPU
RAM is exhausted or swap is activeAdd memory
Database is waiting on I/OInvestigate storage and queries
App is waiting on external servicesFix dependency behavior before CPU class
One service dominates a multi-service VMConsider separating services

If the problem is simply insufficient core count, 2 vCPU vs 4 vCPU Cloud VMs provides the narrower sizing framework.

Measure the workload before changing VM class

A dedicated CPU decision should be supported by a before-and-after test rather than a plan label.

Track metrics that connect compute pressure to outcomes:

  • CPU utilization over time;
  • load or run-queue pressure;
  • CPU steal time when the guest exposes it;
  • request p50, p95, and p99 latency;
  • queue depth and oldest-job age;
  • worker throughput and job duration;
  • build and test duration;
  • database query time;
  • memory and swap activity;
  • disk I/O wait;
  • error and timeout rates.

Compare equivalent workload windows. A production traffic peak should not be compared with an idle overnight period, and a clean build should not be compared with a cached build.

TestShared classDedicated classDecision
Same request mixRecord p95/p99 and CPU pressureRepeat with equivalent loadKeep dedicated only if the workload outcome improves meaningfully
Same CI buildRecord duration and variance across runsRepeat the same pipelineLook for lower or more predictable duration
Same worker batchRecord completion time and queue ageRepeat with the same job setConfirm throughput improves without moving the bottleneck

Do not evaluate only average CPU percentage. A class change is successful when latency, completion time, throughput, or operational predictability improves enough to justify the cost.

For a broader diagnostic sequence, use Cloud Server Performance Bottlenecks.

Compare General Purpose shared-vCPU and CPU-Optimized dedicated-compute options for your workload.

Using Raff for This Sizing Decision

Raff presents three Linux VM classes with different trade-offs:

ClassCPU allocation and workload interpretationOther material conditions
Cost-OptimizedDo not assume the same CPU entitlement or consistency as another class without checking the current technical termsPrevious-generation DDR4, node-local NVMe, 1 Gbps public port
General PurposeShared vCPU for variable and balanced workloadsNewer DDR5 infrastructure, 3 Gbps public port, eligible for 99.90% SLA
CPU-OptimizedDedicated vCPU for sustained CPU-sensitive workloadsNewer DDR5 infrastructure, 3 Gbps public port, eligible for 99.90% SLA

Cost-Optimized runs Linux and FreeBSD and resizes between sizes within that family. Do not assume changing from Cost-Optimized to General Purpose is an in-place plan resize; check migration needs before putting persistent data on the VM.

Use Linux VM hosting to explore Linux workload options, Raff VM for the broader product and current pricing to compare available resource shapes and commercial terms. Keep the workload decision separate from a static plan table: prices can change, while CPU, memory, storage and recovery evidence remain useful. For contractual coverage, see the Service Level Agreement.

Shared vs dedicated CPU for production workloads

Production workloads can use either shared or dedicated vCPU.

Choose shared vCPU for production when:

  • CPU demand is variable;
  • latency and throughput remain inside targets;
  • the application has comfortable CPU headroom;
  • database, memory, storage, or external dependencies are more important constraints;
  • cost efficiency matters more than strict CPU timing consistency.

Choose dedicated vCPU for production when:

  • CPU demand is sustained rather than occasional;
  • repeatable CPU pressure affects p95/p99 latency;
  • worker or build completion time matters operationally;
  • CPU performance variance is itself a problem;
  • testing shows the dedicated class materially improves the workload outcome.

The production label should not decide the CPU class. The measured workload should.

Choose dedicated CPU only when predictability solves a real constraint

Shared vs dedicated vCPU is not a basic-versus-serious distinction. It is a decision about whether reserved CPU capacity improves an outcome that matters.

Start with shared vCPU when the workload is bursty, cost-sensitive, or still has comfortable CPU headroom. If the lowest bill matters most, evaluate Cost-Optimized as its own class (older hardware, local NVMe) rather than as an identical shared-vCPU offer. Keep production workloads on shared compute when they meet their latency and throughput targets. Move toward dedicated vCPU when sustained CPU pressure repeatedly aligns with tail latency, build time, worker throughput, or another measurable constraint.

Before changing class, rule out memory pressure, storage latency, inefficient queries, application code, and external dependencies. If the problem is simply insufficient core count, resizing a shared VM may still be the smaller change.

Continue with Cloud VM Machine Classes Explained, review Raff General Purpose VM Plans, or compare live options on Raff Cloud Servers.

Sources

Was this article helpful?
Serdar Tekin
Serdar Tekin
Co-Founder & CTO

Co-Founder & CTO at Raff, focused on cloud infrastructure, systems architecture, security, reliability, and production operations.

Choose shared vCPU or dedicated CPU-Optimized plans on Raff.

Ubuntu, Debian and other Linux distributions with full root and SSH access, up and running in about 55 seconds.

14-day money-back guarantee

Frequently asked questions

What is shared vs dedicated vCPU?
Shared vCPU uses host CPU capacity scheduled across multiple VMs. Dedicated vCPU reserves CPU capacity for one VM, making sustained compute behavior more predictable.
Is dedicated vCPU always faster than shared vCPU?
No. Dedicated vCPU primarily improves CPU predictability. If the workload is limited by memory, storage, queries, networking, or external services, changing CPU allocation may not improve the result.
When should I choose shared vCPU?
Choose shared vCPU for bursty, intermittent, or cost-sensitive workloads when CPU variation is acceptable and latency or job duration remains within target.
When should I choose dedicated vCPU?
Choose dedicated vCPU when sustained CPU pressure repeatedly affects p95/p99 latency, build time, worker throughput, queue processing, or another important workload outcome.
Can production workloads use shared vCPU?
Yes. Production workloads can use shared vCPU when CPU consistency is not the limiting factor and the application meets its performance and reliability targets.
How do I know CPU predictability is the real bottleneck?
Compare equivalent workload periods and confirm CPU pressure rises with latency, queue age, build duration, or job time. Rule out memory, disk, database, and dependency waits first.
How does Raff map shared and dedicated vCPU?
Raff General Purpose and CPU-Optimized VM families represent different compute allocation models. Use the live Raff VM and pricing pages for current class details, sizes, and commercial terms.