π ~1 min read
Table of contents
Symptom & Impact
Processes are killed by OOM despite moderate average workload.
Environment & Reproduction
Often appears on small VMs where swap was removed or never configured.
Root Cause Analysis
No swap capacity exists to absorb memory spikes and reclaim pressure.
Quick Triage
Confirm OOM events and current virtual memory tuning.
Step-by-Step Diagnosis
Measure memory pressure and identify top consumers.

Solution – Primary Fix
Create swapfile, secure permissions, enable it, and persist in fstab.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Solution – Alternative Approaches
Resize RAM or tune application memory limits if swap is not permitted.
Verification & Acceptance Criteria
Swap is active and OOM kill events stop under normal peaks.
Rollback Plan
Disable and remove swapfile if workload requires swapless policy.
Prevention & Hardening
Set baseline swap for all server classes and alert on memory pressure.
Related Errors & Cross-Refs
Related to Out of memory Kill process and cgroup memory limit events.
Related tutorial: View the step-by-step tutorial for Ubuntu 22.04 LTS.
View all Ubuntu 22.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Ubuntu 22.04 swapfile configuration and memory management docs.
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.