After a deploy, a process uses far more memory than before, with high `VSZ` but normal `RSS`. Should you worry?
BeginnerTroubleshootingProcesses, memory and OOM
Answer
Likely causes → VSZ counts reserved virtual address space (thread stacks, mmap'd files, allocator arenas), not real memory use.
Diagnose →
ps -o pid,vsz,rss,cmd -p <PID>
sudo pmap -x <PID> | tail -5
grep -E 'VmRSS|RssAnon|RssFile' /proc/<PID>/status
Fix → Nothing, if RSS and PSS are stable. glibc arenas can inflate VSZ; MALLOC_ARENA_MAX=2 reduces it for many-threaded apps if needed.
Prevent → Monitor RSS/PSS and cgroup memory.current, not VSZ.
More on Processes, memory and OOM
A Java service disappears without an error in its own log. `dmesg` shows `Out of memory: Killed process 4121 (java) total-vm:... anon-rss:...`.BeginnerA service gets killed with `Memory cgroup out of memory: Killed process ...` but the host has 20 GB free.Intermediate`ps` shows dozens of processes in state `Z` with `<defunct>`.BeginnerZombie count keeps climbing into the thousands and new processes fail with `fork: Resource temporarily unavailable`.AdvancedAn app crashes under load with `java.io.IOException: Too many open files` (or `EMFILE`).BeginnerYou raised `nofile` in `/etc/security/limits.conf` to 65536, but the service still shows `Max open files 1024`.Intermediate