Ai Assisted Capacity Planning
Overview
You're the infrastructure manager for a SaaS company. Your database server's CPU usage has trended from 40% (January) to 62% (March) to 78% (April). You need to predict when you'll hit 90% capacity. You know you can't run above 85% safely (operational headroom for peaks). You have six months before your fiscal year budget meeting. Should you provision new hardware now? Wait? How long do you have?
This is capacity planning. It's critical but tedious. You manually export CSV files, create spreadsheets, plot trendlines, and write narratives about what the numbers mean. Then you present to leadership. They ask questions about edge cases you didn't consider. You don't have answers.
AI can compress the routine parts of capacity planning, trend analysis, projection, report writing, freeing you to focus on what AI can't do: understanding business context (planned migrations, product launches, seasonal patterns) and making strategic decisions about infrastructure investment.
This lesson teaches you how to use AI for capacity analysis and forecasting, what AI gets right, and critically, what it gets spectacularly wrong.
Purpose
Capacity planning serves three purposes:
- Operational safety: Ensure systems don't hit limits that cause outages (CPU throttle, disk full, connection pool exhaustion)
- Cost optimization: Provision infrastructure to meet demand without over-building
- Strategic planning: Forecast infrastructure needs years ahead for capital budgeting and growth planning
Manual capacity planning is labor-intensive and often inaccurate because humans struggle with trend extrapolation and miss edge cases. AI can:
- Analyze multi-dimensional metrics (CPU, memory, disk, network)
- Spot inflection points in trends (sudden jumps vs. gradual creep)
- Generate multiple forecasting scenarios
- Draft capacity reports with numbers and narratives
- Identify outliers and anomalies in utilization patterns
Why This Matters
Operational incidents are expensive: Running out of capacity (CPU, disk, connections) causes outages. AI-assisted forecasting moves out-of-capacity events from "tomorrow's crisis" to "planned upgrade next quarter."
Budget planning has long lead times: Capital approvals often take 6-12 months. Forecasting infrastructure needs 12-24 months in advance is necessary for timely procurement. Understating growth projections means emergency purchases at premium prices.
Seasonal and cyclical patterns are predictable: Most SaaS workloads have weekly, seasonal, and event-driven patterns (Black Friday traffic spikes, New Year resolutions, summer slowdowns). AI can identify these patterns if you feed the right data.
Growth acceleration surprises you if you're not watching: A feature launch, viral moment, or new market segment can double workload overnight. AI can flag historical points where this happened and help you scenario-plan.
Headroom is essential: Running database at 85% CPU capacity requires 15% headroom for traffic spikes. Running at 95% means any spike causes outage. AI helps you define and forecast toward safe operating ranges.
Core Concepts
Key insight: Forecasting requires understanding what changed, not just extrapolating the line
Historical data shows this trend:
Jan: 40% CPU
Feb: 42%
Mar: 45%
Apr: 78%
A naive AI forecasting model might predict: "Trend is increasing ~13% per month. In 5 months, you'll hit 113% (impossible, unsustainable)."
But the real story is: "Gradual increase January-March (normal growth). Huge jump March-April (something changed)."
You know what: "A major feature launched March 28, doubling active users."
Without that context, AI produces garbage forecasts. With it, AI can model two scenarios: "If growth continues at post-feature pace (78% in April), you hit 90% in August" or "If growth moderates back to pre-feature trend, you hit 90% in November."
Key insight: Utilization patterns vary by component and time
Raw metrics without context mislead:
Average CPU: 60% (sounds safe)
Peak CPU: 92% (crisis during peak hours)
Forecasting "average" misses that peaks hit 92% now and will hit unsafe levels before average reaches 90%. You need to forecast peaks, not averages.
Similarly:
- Disk usage: Steady 75%, but grows 2% per month (safe) or 10% per month (urgent)?
- Network: Average 40%, but peak 89% during 6 PM (normal traffic hour), will it exceed link capacity soon?
- Database connections: Average 200 of 500 max, but brief spikes to 480 during peak hours
Forecasting must account for variability, not just central tendency.
Key insight: Seasonal and event-driven patterns flatten after a few weeks
A viral moment drives 5x traffic. You panic. Two weeks later, it normalizes. If you forecast from the spike peak, you'll over-provision massively.
Conversely, New Year's resolution users sign up January 1-15 (temporary spike) and churn 50% by March. Forecasting from January peaks overestimates March-June capacity needs.
AI needs historical context: "Viral events have baseline of X, spike to Y, and return to X in ~14 days. New Year effect peaks mid-January and decays linearly. Black Friday is a 3-day event."
Without this, AI treats all peaks as permanent.
Key insight: AI can't know your business constraints
AI might forecast: "You'll hit 90% capacity in August. Upgrade then."
But you know:
- Your fiscal year budget was allocated in April; you're out of CapEx until next year
- A planned migration to a new platform is scheduled for June; it will reduce load by 30%
- Your top customer contract renews in July; they might not renew (removing 40% of load)
AI doesn't know any of this. It optimizes for infrastructure. You optimize for business.
Key insight: Confidence intervals matter more than point estimates
AI forecasting might say: "You'll hit 90% CPU in August."
But what's the confidence interval? Is it August ±2 weeks (high confidence, based on stable growth) or August ±2 months (low confidence, due to unpredictable customer behavior)?
A low-confidence forecast should trigger more frequent monitoring and scenario planning, not confident decisions.
Key insight: Extrapolation breaks at regime changes
Historical data from Q1-Q3 shows smooth growth. New market segment launches in Q4, doubling workload. Historical forecasting models break catastrophically because they assume continuity.
AI can identify when historical patterns are invalidated, but only if you tell it: "Something changed starting [date]. Should we reforecast from this point?"
Practical Use Cases
Use Case 1: Monthly Capacity Report (Before/After)
Before AI:
- Extract metrics from monitoring system (CPU, memory, disk, network) for past 12 months: 5 hours
- Create spreadsheets, plot graphs: 3 hours
- Write narrative: "CPU increased from 40% in January to 78% in April. Trend appears to be accelerating. Recommend monitoring closely and provisioning for additional capacity within 6 months.", 2 hours
- Review with team, incorporate feedback: 1 hour
- Total: ~11 hours per month
- Reports are often late, inconsistent in depth, and lack scenario analysis
After AI:
- Export metrics as CSV (automated or manual, 30 min)
- Prompt: "Analyze CPU, memory, and disk trends over the past 12 months. Identify inflection points, seasonal patterns, and anomalies. Project when each metric will hit 85% safe capacity level. Provide three scenarios: continuation of current trend, moderate growth slowdown, significant growth acceleration. Format as a one-page exec summary with charts suggestion."
- AI generates: Trend analysis, inflection point identification (March 28 feature launch), three scenarios with projected dates, risk assessment
- Review AI output, validate numbers against your knowledge, add business context: "Scenario 2 (growth slowdown) is most likely given contract negotiations. Scenario 1 is possible if the feature gains adoption. Scenario 3 is unlikely given market saturation."
- AI report with human validation: 2 hours total
- Reports are consistent, timely, include scenarios and risk assessment
- Leadership has better information for budgeting decisions
Use Case 2: Scenario Planning for Growth Event (Before/After)
Before AI:
- Major customer contract has 2x growth in next quarter (verified)
- Manually estimate: How many additional database connections needed? Disk space? Cache hit ratio impact?
- Estimate often wrong, requires follow-up modeling
- Procurement process is slow; you'll miss the lead time if estimates are off
After AI:
- Prompt: "This database currently handles 15,000 concurrent connections at 65% pool utilization. Average query latency is 50ms. Disk growth is 5% per month. In Q2, active users will increase 2x due to a major customer contract. Given this growth, project: (1) Peak concurrent connections and pool utilization, (2) New peak query latency with connection pool pressure, (3) Disk capacity timeline, (4) What infrastructure upgrades are required?"
- AI generates: Detailed scaling analysis with assumptions stated, upgrade recommendations with lead times
- You review: "Query latency projection assumes no query optimization. We're optimizing queries in parallel. Reduce projected latency impact by 30%."
- You validate against vendor scaling docs (MySQL can handle 10,000 connections on [hardware]; PostgreSQL scaling curves are [data])
- Final answer: "Add 2 database nodes (increases pool capacity to 30,000 connections, reduces per-node load, provides failover). Implement connection pooling (reduce connection overhead). Optimize slowest queries (further reduce latency impact). Forecast: Handle 2x growth comfortably, additional headroom for further growth."
- Procurement started 2 months in advance; no emergency purchases
Use Case 3: Capacity Dashboard Interpretation (Before/After)
Before AI:
- Monitoring system shows dozens of metrics
- You review them manually during capacity reviews: "CPU is 62%, memory is 71%, disk is 42%, network is 55%, database connections are 60%..."
- Each metric is reviewed in isolation
- You're missing correlations: "CPU spike is always accompanied by connection pool surge"
- Trend analysis is manual and error-prone
After AI:
- Export 30 days of metrics (CPU, memory, disk, network, connections, query latency) at daily granularity
- Prompt: "What is the relationship between CPU utilization and database connections? Are they strongly correlated or independent? Does connection count predict CPU spikes? Identify the top 3 capacity constraints (which metrics will hit 85% first) and in what timeframe."
- AI identifies: "CPU and connections are strongly correlated (R=0.92). Connection count surges during 6-8 PM business hours and correlates with 15-minute lag to CPU spike. If current trends continue, connections hit 85% max in ~6 weeks. CPU follows 2 weeks later. Disk and network are non-constraining for next 12 months."
- You now know: "Connections are the bottleneck. Before upgrading database hardware, try connection pooling (usually 10x improvement). If that doesn't help, add read replicas or shard the database."
- Targeted upgrade instead of shotgun provisioning; probably 50% cheaper and faster
Examples
Example 1: Trend Analysis with Inflection Detection
Raw data (monthly database storage):
Jan: 100 GB
Feb: 102 GB
Mar: 104 GB
Apr: 106 GB
May: 113 GB
Jun: 125 GB
Jul: 142 GB
Naive AI forecast: Trend is growing ~6% per month. In 12 months, you'll reach ~240 GB. If capacity is 300 GB, you're safe.
Better prompt:
Analyze this monthly database storage trend. Identify inflection points (where growth rate changed).
April data: We launched a new analytics feature that stores 30-day rolling data.
May-July data shows storage growth acceleration.
Question: Will the growth stabilize at a new level, or continue accelerating?
When will 300 GB capacity be reached?
Better AI response:
Inflection Point Analysis:
- Jan-Apr: ~2% monthly growth (normal). Projection at this rate: 12 months → 130 GB (safe).
- May onward: ~10% monthly growth (4x acceleration). Inflection triggered by analytics feature.
Root Cause Hypothesis:
Analytics feature stores 30-day rolling data. If data grows linearly with user base, growth should eventually stabilize once all users have 30 days of history.
Scenario 1 (Growth stabilizes at 150 GB):
If growth slows in September (after 4 months of 30-day rollover), you'll have 150 GB by Sep.
Hit 300 GB capacity in ~18 months. Upgrade now or in 12 months (comfortable lead time).
Scenario 2 (Growth continues at 10% monthly):
Hit 300 GB capacity in ~5 months (December). Urgent upgrade required.
Scenario 3 (Growth accelerates further if feature adoption increases):
Hit 300 GB in 3-4 months. Emergency response.
Recommendation:
Monitor May-September data. If Sep-Oct growth returns to ~2%, Scenario 1 is correct (plan for 12-month window).
If growth stays at 10%, trigger Scenario 2 (plan for upgrade in 3 months).
If growth >10%, escalate to Scenario 3 (urgent procurement).
(Now you have a decision tree, not a single forecast)
Example 2: Multi-Metric Correlation Analysis
Raw data (CPU, connections, query latency):
Date CPU Connections Latency
2026-04-01 45% 180 45ms
2026-04-02 48% 195 50ms
2026-04-03 52% 220 58ms
2026-04-04 78% 485 350ms
2026-04-05 82% 510 420ms
2026-04-06 69% 380 200ms
2026-04-07 55% 250 75ms
[...14 more days...]
Weak prompt: "What's the relationship between these metrics?"
Better prompt:
Analyze the relationship between CPU, database connections, and query latency across April.
I observed:
- CPU and connections both spiked April 4-5
- Latency increased dramatically (45ms → 420ms)
- All three metrics normalized by April 7
Questions:
1. Are CPU and connections causally related, or are they both effects of a third cause?
2. Did the latency increase cause the connection spike, or vice versa?
3. Is this pattern repeating? (Check all 30 days of data for similar events)
4. If this pattern repeats, how often? When will the next spike occur?
AI response:
Correlation Analysis:
- CPU and connections: Strongly correlated (April 4-5 both spike, both decline). Causality unclear from logs alone.
- Latency is a lagged response: Latency spikes ~6 hours after CPU/connection surge peaks.
Causal Hypothesis:
Surge in database connections → Database connection pool exhaustion → Queries queue → CPU spikes from lock contention → Latency increases.
Pattern Detection:
Reviewing all 30 days: This spike pattern repeats April 4-5, April 11-12, April 18-19, April 25-26.
Pattern: Weekly, every Thursday-Friday. Timing suggests recurring batch job or weekly user activity pattern.
Forecasting:
Next spike: ~May 2-3 (following weekly pattern).
Capacity risk: Connection pool is 500. Peak reached 510 (oversubscribed). Next week may exceed pool capacity entirely.
Recommendations:
1. Identify the Thursday-Friday traffic spike source (batch job? weekly report generation? user behavior?)
2. Increase connection pool size to 750 (buffer above peak).
3. Implement connection pooling (reduce raw connection overhead).
4. If spike source is batch job, reschedule to off-peak or lower priority.
(Now you know what's happening and can fix it)
Example 3: Capacity Report with Scenarios
AI-generated report (after you input 12 months of metrics):
CAPACITY FORECAST REPORT - Q2 2026
Current State (April 2026):
- Database CPU: 78% (peak 85%)
- Database Memory: 72% (stable)
- Disk: 42% (growth: 2% per month)
- Network bandwidth: 55% (peak 78% during business hours)
Key Findings:
1. CPU is the primary constraint. Current trend: 10% monthly increase (post-feature-launch March 28).
2. Memory is well-provisioned; no near-term concerns.
3. Network peaks during 6-8 PM. Peak utilization hitting 78% is concerning if traffic grows.
Scenarios:
SCENARIO A (Most Likely - Moderate Growth):
Assumption: Feature adoption moderates post-launch surge. Growth returns to pre-launch trend (2-3% monthly).
Forecast:
- CPU hits 85% (safe limit) in August 2026 (4 months)
- CPU hits 95% (unsafe limit) in October 2026 (6 months)
Recommendation: Plan for capacity upgrade in July 2026. Lead time for hardware: 8 weeks. Start procurement now.
SCENARIO B (Optimistic - Growth Stabilizes):
Assumption: Feature adoption completes. Growth stabilizes at current 78%.
Forecast:
- CPU remains below 85% for 8+ months (through end of year)
Recommendation: Monitor monthly. No urgent action needed. Re-evaluate in August.
SCENARIO C (Pessimistic - Growth Accelerates):
Assumption: Feature gains viral adoption or major customer onboarding. Growth remains at 10% monthly.
Forecast:
- CPU hits 85% in May 2026 (next month)
- CPU hits 95% in June 2026
Recommendation: Emergency procurement. Risk of outages within weeks. Escalate to leadership immediately.
Recommendation:
Implement Scenario A plan (procurement starts now).
Monitor May metrics weekly. If CPU reaches 82%+, shift to Scenario C response.
If CPU growth moderates in May, confirm Scenario A. If CPU growth continues 8%+, escalate to Scenario C.
Network Consideration:
Peak network utilization (78%) is also concerning. As traffic grows, peaks will exceed 100% (link saturation).
Secondary recommendation: Evaluate network upgrade in parallel with database upgrade.
(Leadership now has clear decision points, not vague forecasting)
Anti-Patterns
Anti-Pattern 1: Forecasting without understanding regime changes
What happens:
Historical data shows smooth growth (5% monthly).
Forecast projects X capacity needed by December.
October: Major feature launches (customer demand +300%).
November: Forecast is wildly wrong.
Why it fails: Forecasting assumes historical patterns continue. Major changes (product launches, market shifts, new customer segments) break models.
Fix: Maintain a timeline of significant business events (feature launches, customer onboarding, marketing campaigns). Tell AI about these when forecasting. Use scenarios for high-uncertainty periods.
Anti-Pattern 2: Averaging away important variation
What happens:
Database is 60% utilized on average (sounds safe).
You forecast based on average.
In reality, peaks are 92% (unsafe during traffic spikes).
Why it fails: Capacity constraints are hit at peak usage, not average. Forecasting peak incorrectly leads to underprovisioning.
Fix: Forecast peaks, not averages. "Average CPU is 60%, but peaks hit 92%. Peak growth is 8% monthly. When do peaks hit 95%?"
Anti-Pattern 3: Trusting AI's confidence interval without skepticism
What happens:
AI forecasts: "You'll hit 90% capacity in August, with 95% confidence."
You trust this, plan for August upgrade.
September: You're only at 78%. Forecast was badly off.
Or alternately: You're at 95% in June. Forecast severely underestimated.
Why it fails: AI bases confidence on data fit, not your actual business knowledge. High model fit doesn't mean accurate future predictions if the business is changing.
Fix: Ask AI to explain its confidence interval. "This assumes growth continues at current rate. But you know [X change] might accelerate/decelerate growth. How would that affect the forecast?" Widen confidence intervals to account for known unknowns.
Anti-Pattern 4: Single-point forecasting instead of scenarios
What happens:
AI says: "You need 2 additional servers by August."
You provision exactly 2 servers.
If growth exceeds forecast: Insufficient.
If growth is slower: Wasted investment.
Why it fails: Single-point forecasts are almost always wrong. Scenarios (best case, likely case, worst case) are more honest and actionable.
Fix: Always request scenario analysis. "What if growth is 50% faster? 50% slower? What's the 20th percentile case? 80th percentile case?" Plan based on confidence levels and risk tolerance, not a single magic number.
Anti-Pattern 5: Ignoring data quality issues
What happens:
You feed AI 12 months of metrics.
Monitoring system crashed July 10-12. Data is missing for that period.
August 1-15: Monitoring system was misconfigured, reporting double the actual utilization.
AI doesn't know this.
Forecast includes these artifacts as if they were real.
Why it fails: Bad data produces bad forecasts. AI can't distinguish between real signals and measurement errors.
Fix: Before feeding data to AI, validate it. Remove or annotate known bad periods. Tell AI: "Data is missing July 10-12. August 1-15 is doubled (monitoring bug). Treat these periods with lower confidence." AI can then ignore these artifacts or interpolate carefully.
Human Judgment Checkpoints
Before acting on AI-generated capacity forecasts:
Regime change awareness: Since the start of this historical data, what major business events occurred (product launches, customer wins, market changes)? Has the forecasting model accounted for these? If not, how should they affect projections?
Data quality: Are there data gaps, sensor errors, or known miscalibrations in the metrics? Did the monitoring system change during the period being analyzed? If so, how should this be adjusted?
Scenario realism: Do the AI-generated scenarios match your business knowledge? Is Scenario A (the "likely case") actually likely given what you know? Adjust scenario probabilities based on your judgment.
Peak vs. average: Is the forecast based on peak usage (correct) or average (incorrect)? If average, re-run the analysis with peak metrics.
Business constraints: Are there business factors that would change the forecast (planned migrations, contract renewals, market changes, platform shifts)? If so, how should they be incorporated into the scenarios?
Confidence interval reality: AI reports a confidence interval based on statistical fit. What's the confidence interval that accounts for business uncertainty? Wider it appropriately.
Key Takeaways
Forecasting without context is guessing. Tell AI about major business events (feature launches, customer wins, planned migrations). Forecasts without context are extrapolation with no understanding.
Forecast peaks, not averages. Capacity constraints hit at peak usage. "Average 60%, peak 92%" needs different analysis than "average 60%." Forecast peaks.
Use scenarios, not point estimates. A single forecast is almost always wrong. Three scenarios (best, likely, worst case) are more honest and help you plan for uncertainty.
Validate business assumptions. AI models assume historical patterns continue. You know what changes that assumption. Reconcile AI forecasts against your business knowledge before trusting them.
Monitor inflection points. When growth patterns change (regime shifts), historical forecasts break. Identify inflection points and flag them as forecast invalidation points. Re-forecast from new baselines.
Account for data quality. Bad data produces bad forecasts. Validate and annotate data before analysis. Tell AI about known gaps or measurement errors.
Link forecasts to action. "You'll hit 90% in August" is useless without: "You'll hit 90% in August, and procurement lead time is 10 weeks, so start ordering now." Forecasts should trigger specific actions.
Plan for headroom. Define safe operating limits (e.g., 85% capacity max), not hard limits (e.g., 100%). Forecast when you'll hit safe limits, not when you'll hit catastrophic limits. Better to upgrade early than late.
Skill.re