Diagnosing Swap Usage with smem on Linux

Read the full article: Diagnosing Swap Usage with smem on Linux

If you’ve ever looked at your server and wondered why it’s using swap even though plenty of RAM is available, you’re not alone. This is a common scenario on Linux systems, and it can impact performance if not addressed. One of the most useful tools for digging into this issue is smem, a memory reporting… continue reading.

So here are a few other tools, similar to smem, that I make use of often. They all report per-process memory usage with varying levels of detail, and some also help identify swap-heavy processes:

procps-ng tools (top, htop)

  • htop shows RES, VIRT, and SWAP columns interactively.
  • You can sort by swap in htop by enabling the SWAP column (F2 > Columns > Add SWAP).

atop

  • Like top but logs system resource usage over time.
  • Press m to see memory metrics per process.
  • Tracks SWAP, RES, and virtual memory over time.
  • Great for historical memory bottleneck analysis.
dnf install atop  # or apt install atop

glances

  • Cross-platform, real-time system monitoring tool.
  • Shows per-process memory and swap usage, similar to smem.
  • Can run in server mode and be queried remotely.
dnf install glances  # or apt install glances

Let me know if you’re interested in GUI tools or logging-capable daemons for long-term memory profiling. Ironically one of the best alternatives to top is bottom. :laughing:

There’s also…

1 Like