Algorithms of Linux Memory
Manager (Simplified)
L J GOKUL VASAN
Watermark Working In Linux
Detriment:
•Statically defined.
•Almost, whole memory needs to be filled to start reclamation.
•Could cause I/O pressure.
•Reclamation could cause false positives, leading to thrashing.
• Trigger’s page replacement.
• Defines aggression of the
replacement policy.
• Are per zone free list's waypoint.
• Represented as count of free
pages.
Swappiness variable in Linux scan rate
• Detriment:
❑Ambiguity in semantics of variable.
❑Global variable that effects the whole node.
OOM in Linux
• Kills the process with highest
OOM badness.
• Detriment:
❑oom_score_adj :
❑Admin or system developer has little
or no clue on tuning this variable per
process.
❑Might kill a process that’s of
importance to system.
❑Does not provide right statistics for
developer’s debugging.
RMAP [Reverse Mapping]
• Opposite to Memory Mapping.
• Traverses the PTE of a page and cumulates hardware
reference count.

Algorithms of linux memory management (simplified) - 1

  • 1.
    Algorithms of LinuxMemory Manager (Simplified) L J GOKUL VASAN
  • 2.
    Watermark Working InLinux Detriment: •Statically defined. •Almost, whole memory needs to be filled to start reclamation. •Could cause I/O pressure. •Reclamation could cause false positives, leading to thrashing. • Trigger’s page replacement. • Defines aggression of the replacement policy. • Are per zone free list's waypoint. • Represented as count of free pages.
  • 3.
    Swappiness variable inLinux scan rate • Detriment: ❑Ambiguity in semantics of variable. ❑Global variable that effects the whole node.
  • 4.
    OOM in Linux •Kills the process with highest OOM badness. • Detriment: ❑oom_score_adj : ❑Admin or system developer has little or no clue on tuning this variable per process. ❑Might kill a process that’s of importance to system. ❑Does not provide right statistics for developer’s debugging.
  • 5.
    RMAP [Reverse Mapping] •Opposite to Memory Mapping. • Traverses the PTE of a page and cumulates hardware reference count.