Swap and Memory Management Print

  • 0

When memory runs short.

WHAT SWAP IS

Disk space used as an overflow for memory.

WHY IT IS SLOW

Disk is orders of magnitude slower than memory.

WHAT LIGHT SWAP USE MEANS

Normal: inactive pages moved out.

WHAT SUSTAINED SWAPPING MEANS

Genuine pressure, and severe slowness.

HOW TO SEE ACTIVITY RATHER THAN USAGE

The swap in and out columns in vmstat.

WHY THE DISTINCTION MATTERS

Swap being used is not a problem; swap being actively read and written is.

HOW MUCH TO CONFIGURE

Enough to absorb spikes, not enough to let a leaking process run indefinitely.

WHAT SWAPPINESS CONTROLS

How readily the system moves pages to swap.

WHAT TO SET IT LOWER FOR

Servers, where responsiveness matters.

WHAT THE OUT-OF-MEMORY KILLER IS

The kernel terminating a process when memory is exhausted.

HOW TO TELL IT ACTED

Messages in the system log naming the process.

WHY THAT MATTERS IN DIAGNOSIS

A database that vanished with no explanation was usually killed this way.

WHAT TO DO ABOUT IT

Find what consumed the memory, rather than only adding more.

WHAT COMMONLY CONSUMES IT ON WEB SERVERS

Too many worker processes configured A single application leaking

WHAT TO CHECK

Process counts against available memory.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot