What a Server Actually Runs Out Of

1. A Server Is a Bundle of Finite Resources
Every request quietly spends CPU, memory, disk, and network
  • CPU - compute cycles per second
  • Memory - working space for data & connections
  • Disk - both space AND read/write speed
  • None of these are infinite - plan for the ceiling
2. CPU Exhaustion
When cores are maxed, work doesn't fail - it queues
  • 100% CPU ≠ crash - it means queueing
  • Latency rises even though nothing "broke"
  • More waiting threads = more context-switch overhead
  • Symptom: response times climb, errors stay low
3. The Other Ways to Run Dry
OOM Kill
Process asks for memory it can't get. Kernel kills it outright - fast, loud, obvious.
Swapping
Memory exists - on disk. Every access is 1000x slower. Looks like a hang, not a crash.
Disk Space
Disk hits 100% full. Writes start failing outright, even with CPU/RAM to spare.
Disk I/O
Space is fine, but reads/writes can't keep up. Everything queues on disk instead.
4. Network & File Descriptors
Two limits people forget until they hit them
  • Bandwidth - NIC saturates, packets queue or drop
  • File descriptors - every socket & open file uses one
  • Hit the cap → "Too many open files," even with CPU/RAM free
  • Connection pools are an app-level ceiling below the OS one
5. How You Actually Check
  • CPUtop / htop - sustained near 100%?
  • Memoryfree -m - is swap climbing, not just RAM?
  • Disk spacedf -h - any volume near 100%?
  • Disk I/Oiostat -x - high %util or await?
  • File descriptorsulimit -n vs lsof | wc -l
🔎 The dashboard tells you which resource. It never tells you why - that's still on you.
6. How You'll Recognize It
CPU Pegged
Swapping / Thrashing
Disk Full
Dropped Packets
Too Many Open Files
Every ceiling has its own alarm - learn to read them
None of these mean the server is broken. Each just means one specific resource hit its ceiling - the fix depends entirely on which one.
7. What To Do About It
Quick fix (vertical):
✔ Add RAM
✔ Add CPU cores
✔ Bigger / faster disk
✔ Faster NIC
Every Resource Is Finite - Which One Runs Out First?
Real fix (architectural):
✔ Caching to cut repeat work
✔ Connection pooling
✔ Backpressure / rate limiting
✔ Spread load across servers
💡 You can only add so much to one box. That ceiling is exactly why Vertical vs Horizontal Scaling is next.