Capacity & Growth

Status: Reviewed (deep-dive v1)
Stack: PowerShell (volume/mount free space) → SQL file-size history/procs → Blazor Server UI
Depends on: SQL-01 Inventory (instances); complements SQL-02 (backup targets need disk too)
Goal: See data/log growth early, keep volumes from surprising you, and forecast before “disk full” pages you at 2am.


Why this next

Backups and jobs fail hard when disks fill. Capacity is the bridge between “healthy today” and “still healthy next quarter.”


What “good” looks like


Starting thresholds (confirm with Rick)

Signal Yellow Red
Volume free space < 20% < 10% (or < fixed GB floor for small disks)
Log file / data ratio unusual Log > 50% of data without reason Log runaway / repeated growth
Days-to-full (linear forecast) < 30 days < 14 days
Autogrowth storms Many growth events / day Growth during peak + user impact

Tune floors for tiny system volumes vs large data LUNs.


Checklist — collect (PowerShell + T-SQL)

T-SQL (per instance):

PowerShell (per host):

Read-only. Don’t shrink in collectors.


Checklist — store (SQL + stored procedures)

Table Purpose
dbo.SqlDataFile Latest file inventory per DB
dbo.SqlDataFileHistory Size samples over time
dbo.HostVolume Volume free/total per host
dbo.HostVolumeHistory Volume samples
dbo.CapacityForecast Optional cached days-to-full

Procs:

Forecast (simple v1): linear regression or (latest − size_30d_ago) / 30 → days until volume free < Red floor. Label as estimate.


Checklist — present (Blazor Server)


Operator runbook (short)

  1. Open Tight volumes → Red first
  2. Identify which SQL files live on that volume (detail blade)
  3. Check growth settings: tiny percent growth on huge files = fragmentation storms; huge fixed growth = long stalls
  4. Free space options (change control): add disk, move data file, archive/purge, fix runaway log (open transactions, AG redo, missing log backups — see SQL-02)
  5. Avoid routine SHRINKFILE as a lifestyle — use for one-time reclaim after cleanup, then set sane growth
  6. After change: confirm next collect shows improved free % / slowed growth

Common failure patterns

Symptom Likely cause
Log full Missing log backup; long tran; replication/AG lag
Data autogrowth during peak Poor initial size; percent growth; unexpected load
Volume Red but DBs small Non-SQL consumers; leftover backups on data disk
Forecast flaps Sparse history; restore inflated size; one-time load
Mount point missed PS only checked drive letters

Tie-ins to other topics


Permissions notes


Done definition for this topic


Next candidates (when Rick directs)

Performance health · Patching & build currency · HA/DR awareness · Alerting & runbooks


SQL Dude — SQL-06 Capacity & Growth v1