When managing cloud infrastructure, especially for internal bots and low-concurrency internal services, one common question is whether they are suitable on shared CPU instance types. This question is not trivial. It touches on performance expectations, cost optimization, and overall resource efficiency. To answer it well, you must go beyond simple averages and embrace robust observation intervals, percentile-based metrics, and an understanding of how different cloud providers define “shared CPU.”

This post draws from practical experiences running internal bots and always-on tools on AWS and Azure, referencing tools like AWS Compute Optimizer and Azure Advisor. We’ll examine why your assumptions about shared CPU may be misleading if you don’t measure the right dimensions, why always-on small services can hide cloud waste, and how to make informed choices based on P95 and P99 metrics rather than averages.

Understanding Shared CPU and Its Variations by Cloud Provider

First, let’s define shared CPU:

  • Shared CPU: Instance types where CPU resources are not dedicated or reserved exclusively for your workloads. Instead, CPU capacity is rented in fractions from a physical core or totaled from burst credits.

But “shared CPU” doesn’t look the same on every cloud platform:

Cloud Provider Shared CPU Definition Key Mechanism for CPU Access AWS Shared vCPU on burstable instance types (T2/T3/T4g) where baseline performance with CPU credits allows bursting above baseline. CPU Credits that accumulate when under baseline usage and spend on bursts. Azure B-series burstable VM sizes, similar CPU credit model but different credit accumulation and spend rates. CPU credits for burst, with a baseline at fractional cores. Google Cloud Shared-core machine types designed for low-intensity workloads. No credits but fractional CPU allocation below one full shared core. Fractional vCPUs with fair scheduling.

Understanding these definitions helps clarify what “shared CPU” means for your internal bots and services. The burstable credits allow brief CPU-intensive work, but sustained loads degrade performance or cause throttling.

Why Always-On Small Services Can Hide Cloud Waste

Many internal tools, bots, and microservices run 24/7 on small instance types. Their concurrency is often low, and their average CPU utilization can hover in single digits. This looks perfect for shared CPU instances — low cost and enough performance, right?

Not always. Here’s what you need to watch out for:

  • Baseline CPU Allocation vs. Peak Needs: Continuous low average CPU can hide infrequent but critical CPU spikes.
  • Impact of Latency-Sensitive Operations: Bots often perform tasks where acceptable delays vary, but on shared CPU, even occasional CPU waits can cascade downstream—think webhook retries or state convergences.
  • Storage and Network I/O Costs: Focusing on CPU alone ignores egress bandwidth spikes and storage IOPS, which influence overall cost and performance.

Simply picking the smallest shared CPU instance because concurrency is low risks hidden waste from latency penalties and performance throttling. You might save money on paper but pay in reliability.

Measuring Peaks With the Right Observation Window

Averages don’t tell the full story. Especially for internal bots and tools with occasional bursts that trigger work pipelines, you want to:

https://computingforgeeks.com/shared-cpu-cloud-waste-migration-guide/

  • Use Percentiles to Understand Peak Demand: Instead of average 5% CPU, look at 95th and 99th percentile CPU utilization over a meaningful window.
  • Observe Spike Duration: Are your CPU bursts seconds, minutes, or hours? A 10-second spike above baseline might be fine on a shared CPU, but a 10-minute sustained spike likely causes throttling.
  • Adjust Observation Windows to Your Workload Pattern: A bot that kicks off jobs hourly requires different measurement horizons than a microservice handling user events is steady over seconds or minutes.
  • Example: Monitoring AWS T3.nano over 1-hour windows might show:

    Metric Value Interpretation Average CPU Utilization 8% Low baseline usage P95 CPU Utilization 60% Regular mid-level bursts P99 CPU Utilization 95% Short, high-intensity CPU spikes Spike Duration at >80% Approximately 3 minutes per hour Could lead to credit depletion over time

    In this example, relying on an average of 8% CPU usage to select a shared CPU instance likely ignores important performance considerations that may impact your bot’s responsiveness.

    Focus on Percentiles and Spike Durations, Not Averages

    Here’s why this is important:

    • Average CPU Usage Can Mask Problems: A bot that mostly idles but sometimes spikes to max CPU makes an average CPU of 5%–10%, but those spikes could saturate the shared CPU allocation.
    • Throttling Effects Are Nonlinear: If your CPU credit pool or fractional core scheduling can’t keep up, your service latency degrades disproportionately.
    • Internal Services May Have Tolerances for Acceptable Delays but Should Be Quantified: How long can a bot accept CPU throttling without impacting SLAs, retries, or downstream processes?

    Before deciding that “low concurrency” means “go shared CPU”, it’s good practice to:

  • Gather P95 and P99 CPU metrics from your cloud provider’s monitoring tool or your APM.
  • Correlate CPU usage spikes to actual performance impact (e.g., queue lengths, task latencies).
  • Define rollback criteria for your pilot — e.g., if 99th percentile latency exceeds acceptable delays by X%, revert to dedicated vCPU types.
  • Leveraging AWS Compute Optimizer and Azure Advisor

    Two key cloud-native tools can help you optimize CPU resources for internal bots and always-on services:

    • AWS Compute Optimizer: This tool analyzes your CPU utilization and other metrics over time and recommends instance type changes, including for burstable types like T3/T4g. It helps you see whether your shared CPU instances are sufficient given your workload’s CPU credit consumption.
    • Azure Advisor: Azure Advisor provides VM right-sizing recommendations including for B-series burstable VMs. It highlights when you risk under- or over-provisioning CPUs based on actual usage.

    These tools emphasize sustained CPU usage, credit consumption trends, and offer actionable insights. But keep in mind:

    • They use average and peak CPU metrics over predefined intervals, so augment their recommendations with your percentiles and spike duration analysis.
    • Always check accompanying metrics like CPU credit balance on AWS or throttling events on Azure to interpret recommendations effectively.
    • Use these tools as a starting point, not the final verdict — always pilot and measure before finalizing.

    Conclusion: Are Bots and Internal Services Good on Shared CPU if Concurrency Is Low?

    The short answer: Sometimes, yes, but with critical caveats.

    If your internal bots and always-on, low-concurrency services have:

    • Short-lived CPU spikes that stay within burst credit budgets (AWS) or fractional core fair shares (Azure, GCP),
    • Carefully measured and understood latency or delay tolerances, and
    • Persistent monitoring of P95/P99 CPU usage and spike durations, not just averages,

    then using shared CPU instances can save meaningful costs without undiagnosed reliability risks.

    But if measurement shows frequent, sustained CPU saturations or throttling bursts that push latency beyond acceptable limits, it’s best to switch to dedicated CPU instance families. Always write rollback criteria based on P99 latency or CPU credit depletion metrics before running your pilot.

    Summary Checklist Before Choosing Shared CPU for Internal Bots

  • Understand your cloud provider’s shared CPU mechanism and CPU credit model.
  • Monitor P95 and P99 CPU utilization over relevant observation windows that reflect your workload’s burst patterns.
  • Analyze CPU credit balance or throttling event trends (AWS T-series, Azure B-series).
  • Assess spike duration and correlate with task latency to evaluate whether delays remain acceptable.
  • Use AWS Compute Optimizer or Azure Advisor recommendations as a baseline.
  • Define rollback criteria before deployment based on latency, error rates, or CPU credit depletion.
  • Perform a pilot deployment with active monitoring and alerting.
  • With this disciplined approach, you can confidently decide when your internal bots and services are “good” on shared CPU—and avoid hidden cost overruns and service slowdowns that plague many always-on internal tools.

    Happy optimizing!

    Posted by L. Derek Eldridge