Sunday, February 2, 2014

Approaches to deal with Memory Hogs


Memory hogs can be dealt in two approaches:

 

  • Gracefully handle and effectively troubleshoot after they manifest: All memory hogs can't be avoided proactively. Static analysis and code reviews can't be comprehensive due to diminishing returns rule. So, memory hogs creep into the code during initial stages of development as well as in later stages.
 
This creates the need to detect memory hogs, gracefully deal with the memory hogs/OOMs and have debugging tools/skill to troubleshoot memory hogs effectively.
 
Primarily, this involves checking for out of memory symptoms & identifying a kernel module or a user space application that is hogging the memory.  
 
In the following posts, I discussed about various features/tools available in linux for identifying memory hogs and determining the component(s) causing the memory hog. Knowledge of memory accounting tools is the key to troubleshoot memory hogs.
        Memory Hog Debugging: Check system level memory accounting in linux  
        Memory Hog debugging: Check kernel memory accounting in linux
        Memory Hog debugging: Check user space memory accounting in linux  
        OOM (Out of Memory) Killer in Linux


Hope this helps.

No comments:

UA-48797665-1