Inspecting and Optimizing Memory Usage in Linux
summary
Examines real measurements on an i.MX93 EVK with 2 GB RAM, showing Linux page structs cost ~64 bytes each (about 32 MB overhead) and using /proc/buddyinfo, /proc/meminfo and smaps to find fragmentation and allocations. Uses smem (PSS/USS), ps, free and valgrind/vmchecker to locate leaks and shows zram and swap tradeoffs plus OOM-killer behavior and oom_score_adj tuning. Demonstrates kernel build pruning that reduced kernel from 32MB to 11MB and recommends targeted config and compiler size flags rather than vague optimizations.
AI-written summary · about
chapters (11)
- 0:00Memory optimization intro
- 1:05Virtual memory basics
- 5:47NUMA and memory zones
- 11:30Kernel memory analysis
- 17:11User space memory metrics
- 22:18System memory with free
- 24:29Kernel binary optimization
- 26:21Memory leak detection
- 30:21Swap and zram
- 33:14OOM killer tuning
- 35:20Q&A
related talks
51mDemystifying Memory: A Practical Tutorial on Managing & Optimizing Memory in Zephyr
51mDemystifying Memory: A Practical Tutorial on Managing & Optimizing Memory in Zephyr
29mModernizing Resource Management in Embedded Systems Using eBPF
49mEmbedded Linux Size Reduction Techniques
21mMemory Efficient Java
47mExploring Linux Memory Usage and IO Performance in Cloud Native Applications
48mOptimizing Linux Servers
53mMemory on Android, Leaks and OOM
