Affected versions: 24.04

📖 ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

System feels slow while RAM is available and swap usage stays high.

Environment & Reproduction

Observed on desktop workloads with browsers and IDEs running for long sessions.

Root Cause Analysis

Default vm.swappiness and pressure handling can keep inactive pages in swap.

Quick Triage

Run free -h, vmstat 1 5, and cat /proc/sys/vm/swappiness.

Step-by-Step Diagnosis

Identify high consumers with ps aux –sort=-%mem | head and inspect memory pressure via cat /proc/pressure/memory.

Solution – Primary Fix

Set swappiness lower using echo ‘vm.swappiness=10’ | sudo tee /etc/sysctl.d/99-swappiness.conf and apply with sudo sysctl –system.

Still having issues? Our Managed IT Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Solution – Alternative Approaches

Add RAM or reduce heavy startup applications if swap thrashing continues.

Verification & Acceptance Criteria

Interactive latency improves and swap growth remains stable under normal workload.

Rollback Plan

Delete custom sysctl file and reload defaults with sudo sysctl –system.

Prevention & Hardening

Monitor memory trends and keep browser tab count manageable.

Related: desktop freezes during high IO and OOM kills.

Related tutorial: View the step-by-step tutorial for Ubuntu 24.04 LTS.

View all Ubuntu 24.04 LTS tutorials on the Tutorials Hub →

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

Linux vm.swappiness docs and Ubuntu performance tuning notes.

Need Expert Help?

If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.