A Surprisingly Hard Question: How Much Memory Does My...
summary
Linux distinguishes free versus available memory (32 GB machine showing 262 MB free but ~half available), and the most useful per-process metric is PSS (read from /proc/[pid]/smaps) because RSS double-counts shared pages. Kernel allocations live in slab pools (inspect slabinfo), CMA reserves remove memory at boot, and zone watermarks trigger the OOM killer even if global free looks high. Use cgroup memory.current, smem or collectd and systemd-cgroup-top to get accurate per-service and system totals.
AI-written summary · about
chapters (21)
- 0:00Introduction and setup
- 1:09Memory on embedded systems
- 3:46Free command and available memory
- 6:19Memory metrics in proc files
- 7:26Memory mapping basics
- 9:36Shared vs private mappings
- 13:25Resident size and virtual size
- 16:35Proportional set size explained
- 19:34Kernel memory zones
- 21:37Buddy allocator and fragmentation
- 22:41Slab allocator overview
- 25:40CMA and reserved memory
- 27:09Linux memory reclaim
- 28:3932-bit vs 64-bit address space
- 29:45Reading PSS from smaps
- 30:38Kernel memory in user space
- 31:20Control groups and memory
- 35:22Global memory usage metrics
- 37:30Tools for memory analysis
- 37:52Summary and recommendations
- 39:14Q&A session
