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.

Illustrative mockup for ubuntu-24-04-lts — post-181-2
Illustrative mockup – Progressive Robot — Illustrative mockup — Progressive Robot

Environment & Reproduction

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

Illustrative mockup for ubuntu-24-04-lts — post-181-2
Illustrative mockup – Progressive Robot — Illustrative mockup — Progressive Robot

Root Cause Analysis

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

Illustrative mockup for ubuntu-24-04-lts — post-181-2
Illustrative mockup – Progressive Robot — Illustrative mockup — Progressive Robot

Quick Triage

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

Illustrative mockup for ubuntu-24-04-lts — post-181-2
Illustrative mockup – Progressive Robot — Illustrative mockup — Progressive Robot

Step-by-Step Diagnosis

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

Illustrative mockup for ubuntu-24-04-lts — post-181-1
Illustrative mockup – Progressive Robot — Illustrative mockup — Progressive Robot

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.

Illustrative mockup for ubuntu-24-04-lts — post-181-2
Illustrative mockup – Progressive Robot — Illustrative mockup — Progressive Robot

Solution – Alternative Approaches

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

Illustrative mockup for ubuntu-24-04-lts — post-181-2
Illustrative mockup – Progressive Robot — Illustrative mockup — Progressive Robot

Verification & Acceptance Criteria

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

Illustrative mockup for ubuntu-24-04-lts — post-181-2
Illustrative mockup – Progressive Robot — Illustrative mockup — Progressive Robot

Rollback Plan

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

Illustrative mockup for ubuntu-24-04-lts — post-181-2
Illustrative mockup – Progressive Robot — Illustrative mockup — Progressive Robot

Prevention & Hardening

Monitor memory trends and keep browser tab count manageable.

Illustrative mockup for ubuntu-24-04-lts — post-181-2
Illustrative mockup – Progressive Robot — Illustrative mockup — Progressive Robot

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.

Illustrative mockup for ubuntu-24-04-lts — post-181-2
Illustrative mockup – Progressive Robot — Illustrative mockup — Progressive Robot

References & Further Reading

Linux vm.swappiness docs and Ubuntu performance tuning notes.

Illustrative mockup for ubuntu-24-04-lts — post-181-2
Illustrative mockup – Progressive Robot — Illustrative mockup — Progressive Robot

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.