Memory at 94%? Read the Right Column
Easy

Problem

PagerDuty just woke you: "web-cache-1 memory 94% used". The dashboard shows memory pegged near the top and trending up over the last week. The on-call runbook someone wrote says "restart the app to free memory", and a teammate is suggesting you resize the box to 16 GB.

Before you do anything: decide whether this is actually a memory problem. Read the right numbers, and name the correct action — which may be no destructive action at all.

Initial setup

  • Host: web-cache-1, Debian 12, 8 GiB RAM, 2 GiB swap.
  • A postgres DB, a gunicorn web app behind nginx, the usual system
procs. The box has been up 9 days and the alert just fired.

Acceptance

You've solved it when:

  • free (try free -h) shows available is most of RAM (~6.4 GiB / 82%)
while free is small — the alert is reading free/used, not available. The large buff/cache (~6.2 GiB) is reclaimable page cache, not consumed memory.
  • You've confirmed there is no pressure: swap is 100% free (nothing
is being paged out) and top shows %wa ~0 and no process dominating RES (postgres at ~7.5% MEM is the biggest, and it's the thing that warmed the cache — it is not "the memory").
  • You've named the correct action: this is a false alarm — do NOT drop
caches, do NOT add RAM, do NOT restart the app, and do NOT hunt a leak. Fix the alert to watch available (MemAvailable), not used/free.
Live session
Code
SavedNo commands yet