Running small databases on shared CPU instances might seem like a straightforward and cost-effective approach. After all, these small services often appear low-risk and low-traffic at first glance. Yet, as any seasoned cloud engineer will tell you, hidden pitfalls abound, and the cost — both in performance and budget — can be surprising. In this post, we’ll dissect what can go wrong with small databases running on shared CPUs in the cloud, and provide actionable advice driven by hard metrics and real-world observations.
Why Small Databases on Shared CPUs Are a Cloud Infrastructure Trap
Small databases underpin many internal tools, staging environments, or lightweight services. Because they often run continuously (“always-on”), tendencies toward over-provisioning and inefficient resource use sneak in unnoticed. Let’s unpack a few reasons why this is a common source of cloud waste:
- Always-on nature masks cost inefficiencies: Unlike batch jobs or ephemeral compute, these databases run 24/7, quietly accruing costs even when underutilized. Shared CPU variability: Providers have very different definitions of “shared CPU,” leading to inconsistent performance and confusing cost-performance tradeoffs. Latency and IO constraints: Databases are sensitive to latency spikes and IO bottlenecks, often exacerbated by so-called “noisy neighbors.” Poor observability around peaks: Relying solely on average CPU utilization or short observation windows misses critical performance bottlenecks triggered by brief, high-impact spikes.
Shared CPU Definitions Differ Across Cloud Providers
One of the most common misconceptions involves treating vCPU counts as uniform performance guarantees across clouds or even across instance types within a single cloud. This is particularly deceptive for shared CPU instances.
Cloud Provider Shared CPU Model Performance Characteristics Common Pitfalls AWS (e.g., T3, T4g Instances) CPU credits with burst capability Baseline CPU allocation with ability to burst using credits accrued during idle time Assuming baseline means sustained performance; credit depletion causes throttling and latency spikes Azure (B-Series VMs) CPU credits with burst model Accrual of credits allows burst up to full core; baseline config varies by instance size Ignoring credit behavior leads to unexpected throttling and IO latency during sustained load Google Cloud (E2 Shared-Core) Fractional vCPUs mapped to physical cores among multiple tenants Co-scheduling with noisy neighbor throttling mitigations but less predictable performance spikes Treating fractional vCPU as fixed performance metric leads to unpredictable latency and throughputUnderstanding these differences guides realistic expectations around database latency and IO constraints. Treating a shared vCPU as “half a CPU” rather than “burstable, noisy, and variable” is where many builders get burned.
Database Latency & IO Constraints: Why Noise Matters
At the core of the problem is the unpredictable latency introduced by shared CPUs, often referred to as the noisy neighbor problem. Because the physical CPU resources are shared among multiple tenants, any burst in activity from adjacent tenants can degrade your database’s latency and IO throughput.
- Latency spikes: Even short-lived CPU credit exhaustion or neighbor spikes can cause your database queries to slow down well beyond acceptable limits for latency-sensitive applications. IO wait times: When CPU is throttled or overloaded, IO requests queue up, increasing read/write waits and resulting in cascading bottlenecks. Impact on SLAs: Service-level agreements or internal SLIs often get compromised, leading to frustrating throttling, slowdowns, or even errors during peak periods.
Ignoring these constraints based on average CPU utilization — a single-number summary that obfuscates behavior — leads engineers down the wrong optimization paths.
Measure Peaks With the Right Observation Window
It’s tempting to make capacity decisions based on CPU or IO metrics averaged over 1 or 5-minute windows. However, small databases, especially on shared CPUs, often suffer the most from short but frequent spikes in load.
To truly understand their behavior, you need to:
Use high-resolution monitoring data: Collect metrics at least at 1-second granularity where possible. Consider percentiles, not sums: Look beyond means — focus on the 95th, 99th percentiles (P95, P99) to capture tail latency and CPU peaks. Track spike duration: A 10-second CPU spike can be more damaging than a 5-minute plateau. Measuring spike duration helps identify whether bursts are brief or sustained.Tools to Help: AWS Compute Optimizer & Azure Advisor
Both AWS and Azure provide cloud-native tools designed to illuminate cost and performance inefficiencies https://bizzmarkblog.com/are-bots-and-internal-services-good-on-shared-cpu-if-concurrency-is-low/ — but it’s critical to know how best to use them for small, shared-CPU database workloads.
AWS Compute Optimizer
- Analyzes historical utilization, including CPU, memory, and disk I/O metrics. Provides rightsizing recommendations often based on aggregate and peak utilization. Pro tip: Review P95 and P99 CPU usage breakdowns rather than just average utilization to avoid undersizing. Beware the Compute Optimizer may recommend downsizing based on average post-migration data; pre-migration, ensure latency metrics and burst behaviors have been analyzed.
Azure Advisor
- Delivers personalized best practices and right-sizing guidance based on telemetry. Flags potential CPU over-provisioning or under-utilization with suggested VM size adjustments. Pro tip: Use Advisor recommendations in conjunction with long-term latency trends, not single snapshots. Azure’s burstable VM credit behavior should be explicitly considered; Advisor doesn’t always flag credit exhaustion impacts.
Beyond CPU: Incorporate Full Stack Observability
CPU utilization is a necessary but insufficient proxy for database health and cost efficiency. Don't ignore:
- IO throughput and wait times: Tools like Amazon CloudWatch EBS metrics or Azure Monitor Disk IO help diagnose bottlenecks. Database-specific metrics: For example, PostgreSQL's pg_stat_statements or MySQL’s performance schema for query latency profiling. Application-level SLIs: End-to-end latency, error rates, and backlog sizes.
With holistic data, you can differentiate between compute saturation, noisy neighbor issues, and inefficient database queries.
Don’t Touch Instance Types Before You Understand P95 and P99
It’s an engineer’s cardinal rule to always ask:
“What do the P95 and P99 metrics look like for CPU, latency, and IO before touching instance types?”This helps avoid the trap of reacting to nominal average utilization figures that disguise important tail behaviors.
For example, a database averaging 15% CPU utilization but with 10% of the time spiking above 80% will likely see performance degradation on a shared CPU instance sooner than expected.

Writing Rollback Criteria Before Running a Pilot
Any migration or instance size change for small databases should be treated as a pilot with explicit rollback criteria. Define upfront:
- Maximum allowable P99 latency increase — e.g., no more than 10% increase in endpoint response time Acceptable CPU credit depletion thresholds and recovery times Monitoring alerts for spike duration or sustained CPU throttling Observed error rates or IO timeouts
Having objective rollback criteria makes the migration a controlled experiment and avoids costly downtime.
Summary: What Could Go Wrong (And How to Avoid It)
Potential Issue Root Cause How to Detect Mitigation Strategies Unexpected latency spikes Noisy neighbor CPU throttling or credit exhaustion P95/P99 latency metrics rising during bursts; CPU credit metrics Monitor credit usage, upgrade to dedicated CPUs, or use instance types with guaranteed baseline Poor IO throughput Throttled CPU leads to delayed IO processing Increased IO wait times, queue lengths, and database timeouts Use better instance types, tune queries, optimize IO patterns Wasteful resource allocation Relying on average metrics leads to oversizing Compute Optimizer or Azure Advisor signaling overprovisioning without tail metric checks Analyze P99 utilization, run pilot with rollback criteria before resizing Unnoticed cost accumulation Always-on small services accruing cost without performance gains Billing reports with no corresponding capacity improvements Regular cost and performance reviews, terminate unused instances or consolidateFinal Words
Small databases running on shared CPU instances are deceptively simple but harbor many fragile edges and hidden costs. Approaching them with respect for variance in cloud p95 cpu utilization sizing provider definitions, granular measurement of peak behavior, and endpoint-aware latency observation helps you uncover and fix inefficiencies before they hit your SLAs or budgets hard.

By leveraging tools like AWS Compute Optimizer and Azure Advisor thoughtfully — supplementing their recommendations with percentile and spike-duration analyses — you can strike the right balance between cost-efficiency and reliable performance. And remember: always write rollback criteria before tinkering with instance types. That discipline pays off when unexpected noisy neighbors remind you who’s boss.