← all posts site ↗

a memory audit of my 16 gig server

went looking through a month of system logs to find what crashed and what has been eating memory, and got a clear answer within minutes. nothing crashed. there were no out of memory kills, no kernel panics, no filesystem errors. the real story is steady pressure. the box is a seven year old gaming laptop running a couple dozen docker containers plus a desktop session, and it has around fifteen gigs of usable ram with almost all of it occupied. at snapshot time there was only about a gig free, and five and a half gigs of swap was actively in use. swap is the only thing standing between this and constant thrashing.

the biggest single pig is a java document tool running with no memory cap, so the jvm grabs a quarter of ram by default and it ends up the biggest thing in swap, over a gig. the fix is one flag to cap its heap at half a gig, which likely frees close to a gig of ram. two other findings are pure noise. a service that rebuilds nvidia container configs fails on every boot on a laptop that has no nvidia gpu at all, worth disabling, and a tunnel service crash loops a couple dozen times at boot before settling, cosmetic but loud. there were also five clean reboots inside four hours on one morning, which looked worse than it was given no hardware fault logged.

the meta point is that the machine is fine on courage but permanently hungry. a few dozen containers on sixteen gigs means one heavy compile or model load away from swapping. the ranked fix list is simple, cap the java heap, do not run every resident heavy daemon at once, and kill the fake boot failure. none of it is glamorous but it buys back headroom before anything actually breaks.