How to Speed Up a Slow Linux System (10 Real Fixes) — LinuxDistroFinder
Home › Guides › Speed Up Slow Linux
Intermediate

How to Speed Up a Slow Linux System (10 Real Fixes)

📖 12 min read🗓 Updated October 2026✍️ LinuxDistroFinder Team

Disclosure: some links on this page are affiliate links. If you sign up through them we may earn a commission at no extra cost to you. It helps keep LinuxDistroFinder free.

Linux has a reputation for being fast — and it deserves it. But even a well-configured system can slow down over time due to bloated startup services, a misconfigured swap, a filesystem that's never been checked, or a runaway background process quietly eating your RAM. This guide cuts through the generic advice and gives you 10 specific, actionable fixes tested on real machines running Ubuntu 22.04/24.04, Fedora 40, Debian 12, and Arch.

Work through these in order. The first few take under two minutes each and fix the most common culprits. The later ones go deeper into kernel parameters and filesystem tuning — worth doing if you're still not satisfied after the quick wins.

First: Diagnose Before You Fix

Don't guess. Spend 60 seconds finding out what's actually slow before changing anything. The two commands below give you a clear snapshot.

# See what's using CPU and RAM right now (press q to quit)
top -o %CPU

# More readable alternative — install if missing
htop

# Check how long the system has been running and load averages
uptime

# See which services take the longest to start
systemd-analyze blame | head -20

The load average from uptime is key. On a 4-core machine, a 1-minute load average above 4.0 means you're genuinely CPU-bound. Below that, slowness is usually RAM, I/O, or startup bloat — all fixable without new hardware.

Fix 1 — Kill the Startup Bloat

This is the single most impactful fix for most desktop systems. Every distro ships with services enabled that you'll never use: Bluetooth daemons on desktops with no Bluetooth dongle, printer services on machines that never print, ModemManager on laptops with no SIM card, and so on.

# List all enabled services and their startup times
systemd-analyze blame

# Disable a service you don't need (example: ModemManager)
sudo systemctl disable --now ModemManager

# Other common candidates to evaluate:
sudo systemctl disable --now bluetooth        # if you don't use Bluetooth
sudo systemctl disable --now cups             # printing service
sudo systemctl disable --now avahi-daemon     # mDNS/Bonjour — rarely needed
sudo systemctl disable --now snapd            # on Ubuntu, if you don't use snaps
Tip: Use --now to stop the service immediately in addition to disabling it at boot. You can always re-enable with sudo systemctl enable --now if you need it later.

On a fresh Ubuntu 24.04 install, disabling just ModemManager, avahi-daemon, and snapd can shave 4–8 seconds off boot time and free 40–80 MB of RAM.

Fix 2 — Tune Your Swappiness

Swappiness controls how aggressively the kernel moves RAM contents to the swap partition or swap file. The default on most distros is 60 — meaning the kernel starts swapping when RAM is still 40% free. That's far too aggressive for desktop use and causes noticeable sluggishness because disk I/O is orders of magnitude slower than RAM.

# Check current swappiness
cat /proc/sys/vm/swappiness

# Set it to 10 for the current session (no reboot needed)
sudo sysctl vm.swappiness=10

# Make it permanent across reboots
echo "vm.swappiness=10" | sudo tee /etc/sysctl.d/99-swappiness.conf

A value of 10 tells the kernel to use swap only when RAM is genuinely almost full. On systems with 8 GB or more of RAM, you can even go as low as 5. On systems with 2 GB or less, keep it at 10–15 rather than setting it to 0 (a value of 0 doesn't disable swap entirely but can cause the OOM killer to fire unexpectedly).

Note: If you're on a system using a zram swap (common on Fedora 33+ and recent Ubuntu), the optimal swappiness is actually higher — around 100 — because zram is compressed RAM, not a slow disk. Check with swapon --show to see your swap type before changing this.

Fix 3 — Find and Kill RAM Hogs

Sometimes a single process is eating hundreds of megabytes it should have released. Web browsers and Electron apps (VS Code, Slack, Discord) are habitual offenders.

# List top 10 processes by memory usage
ps aux --sort=-%mem | head -11

# See memory in a more human-readable format
ps aux --sort=-%mem | awk 'NR<=11{printf "%-10s %-6s %-6s %s\n",$1,$2,$3,$11}'

# Kill a process by name (e.g., a frozen browser tab renderer)
pkill -f "chrome --type=renderer"

# Or kill by PID
kill -9 

If Firefox or Chrome is using more than 1.5 GB total, consider enabling their built-in memory savers. In Firefox: Settings → Performance → uncheck "Use recommended performance settings" and enable "Limit content process count" to 4 or fewer.

Fix 4 — Enable the I/O Scheduler Appropriate for Your Drive

Linux uses different I/O schedulers depending on storage type. The wrong scheduler for your hardware can cause unnecessary latency. Here's what you should use:

Storage TypeRecommended SchedulerWhy
NVMe SSDnoneNVMe has its own internal queue; a scheduler adds overhead
SATA SSDmq-deadlineLow latency, handles mixed read/write well
Traditional HDDbfqBudget Fair Queuing reduces seek time, great for desktop
eMMC (laptops)mq-deadlineSimilar characteristics to SATA SSD
# Check your current scheduler for each block device
cat /sys/block/sda/queue/scheduler
cat /sys/block/nvme0n1/queue/scheduler

# Set temporarily (replace sda and bfq with your device and scheduler)
echo bfq | sudo tee /sys/block/sda/queue/scheduler

# Make permanent via udev rule
sudo nano /etc/udev/rules.d/60-scheduler.rules

Paste the following into that udev rules file, then save:

ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="mq-deadline"
ACTION=="add|change", KERNEL=="nvme[0-9]n[0-9]", ATTR{queue/scheduler}="none"

Fix 5 — Clean Up Old Kernels and Package Cache

On Ubuntu/Debian systems that have been running for a year or more, it's common to find 4–6 old kernel versions occupying 1–3 GB of /boot. A nearly-full /boot partition (or root partition) causes significant I/O slowdowns.

# Ubuntu/Debian: remove unused kernels automatically
sudo apt autoremove --purge

# Clean the apt package cache
sudo apt clean

# Fedora/RHEL: keep only the 2 most recent kernels
sudo dnf remove $(dnf repoquery --installonly --latest-limit=-2 -q)
sudo dnf clean all

# Arch: remove all cached packages except the latest 3 versions
sudo paccache -rk3

# Check disk usage after cleanup
df -h /
Tip: On Arch Linux, install pacman-contrib to get the paccache tool. You can also set up a systemd timer to run it weekly: sudo systemctl enable --now paccache.timer

Fix 6 — Trim Your SSD (If You Have One)

SSDs need TRIM to maintain performance over time. Most modern distros enable periodic TRIM via a weekly systemd timer, but it's worth verifying — and running manually if it hasn't been done recently.

# Check if fstrim timer is active
sudo systemctl status fstrim.timer

# Enable it if it's not running
sudo systemctl enable --now fstrim.timer

# Run TRIM manually right now (safe to do)
sudo fstrim -av

If fstrim -av shows your partition and reports bytes discarded, TRIM is working. If it says "the discard operation is not supported," your SSD controller or driver may not support it — less common but worth knowing.

Fix 7 — Reduce journald Log Size

systemd's journal can grow surprisingly large on busy systems. We've seen /var/log/journal directories consuming 4–8 GB on machines that have been running for a year without a cap set. The journal itself doesn't slow the system dramatically, but reading logs (and by extension services that parse them) does.

# Check current journal disk usage
journalctl --disk-usage

# Vacuum logs older than 2 weeks
sudo journalctl --vacuum-time=2weeks

# Or cap it to 500MB total
sudo journalctl --vacuum-size=500M

# Make the cap permanent
sudo nano /etc/systemd/journald.conf

In that file, find or add these lines under [Journal]:

SystemMaxUse=500M
SystemKeepFree=1G
MaxRetentionSec=2weeks

Then restart journald: sudo systemctl restart systemd-journald

Fix 8 — Switch to a Lighter Desktop or Compositor

This is the most dramatic fix available if you're running a heavy desktop environment on modest hardware. Desktop environments vary enormously in their RAM footprint:

Desktop EnvironmentIdle RAM (approx.)Best For
GNOME 46~900 MB – 1.2 GBModern hardware, 8 GB+ RAM
KDE Plasma 6~600 – 800 MBFeature-rich, 4 GB+ RAM
Xfce 4.18~280 – 380 MBOlder hardware, 2 GB+ RAM
LXQt 1.4~200 – 280 MBVery old hardware, 1 GB+ RAM
Openbox (standalone)~80 – 130 MBMinimal setups, power users

You don't have to reinstall your OS. On Ubuntu, you can install Xfce alongside GNOME and choose it at the login screen:

# Install Xfce on Ubuntu (minimal, no extras)
sudo apt install xfce4 xfce4-goodies --no-install-recommends

# Or LXQt for even lighter
sudo apt install lxqt sddm --no-install-recommends

Log out, click the gear/session icon on the login screen, and select the new environment. You can always switch back.

Note: If switching DEs feels like too much, try disabling desktop compositing first. In Xfce: Settings → Window Manager Tweaks → Compositor → uncheck "Enable display compositing." On GNOME, compositing is baked in and can't easily be disabled, but switching to Xorg instead of Wayland can sometimes help on older GPUs.

Fix 9 — Preload Frequently Used Apps with preload

preload is a daemon that runs in the background, learns which applications you open most often, and preloads them into RAM so they launch faster. It's adaptive — it doesn't just blindly fill RAM, it learns your usage patterns over days and weeks.

# Install preload (Ubuntu/Debian)
sudo apt install preload

# It starts automatically — verify it's running
sudo systemctl status preload

# Check its config (generally defaults are fine)
cat /etc/preload.conf

You won't notice results immediately. Give it 2–3 days of normal use and app launch times will measurably improve. Particularly effective for LibreOffice, GIMP, and IDEs like VS Code that normally have slow cold-start times.

Tip: preload is most useful when you have 4 GB or more of RAM. On a 2 GB machine, it can paradoxically slow things down by competing with active processes for RAM. Skip it if you're memory-constrained.

Fix 10 — Tune vm.dirty_ratio for Better I/O Performance

The kernel's vm.dirty_ratio and vm.dirty_background_ratio control how much RAM can hold "dirty" (modified but not yet written to disk) data before the kernel forces a flush. The defaults (20% and 10% respectively) are calibrated for servers. On a desktop with a mechanical HDD, lowering these values means the kernel writes to disk more frequently in smaller batches — reducing the long "freeze" you sometimes feel when the system decides to flush a huge buffer all at once.

# Check current values
cat /proc/sys/vm/dirty_ratio
cat /proc/sys/vm/dirty_background_ratio

# Better values for a desktop with HDD
sudo sysctl vm.dirty_ratio=10
sudo sysctl vm.dirty_background_ratio=5

# For SSD systems, slightly higher is fine since flushes are fast
sudo sysctl vm.dirty_ratio=15
sudo sysctl vm.dirty_background_ratio=8

# Make permanent
echo "vm.dirty_ratio=10" | sudo tee -a /etc/sysctl.d/99-performance.conf
echo "vm.dirty_background_ratio=5" | sudo tee -a /etc/sysctl.d/99-performance.conf
sudo sysctl -p /etc/sysctl.d/99-performance.conf

Quick Reference: Impact vs. Effort

FixEffortImpactBest For
Disable startup servicesLowHighAll systems
Tune swappinessLowHighSystems with ≥4 GB RAM
Kill RAM hogsLowMedium–HighAll systems
I/O schedulerMediumMediumHDD systems especially
Clean kernels/cacheLowMediumSystems >1 year old
SSD TRIMLowMediumSSD systems
Journal cleanupLowLow–MediumAll systems
Lighter desktopHighVery HighSystems with <4 GB RAM
preloadLowMediumSystems with ≥4 GB RAM
vm.dirty_ratio tuningLowMediumHDD systems
BONUS Consider a Lighter Distro If All Else Fails Nuclear Option

If you've applied all 10 fixes and your system is still painfully slow, the issue may be that your distro's base overhead is simply too high for your hardware. Ubuntu with GNOME idles at roughly 900 MB–1.2 GB. If your machine only has 2 GB total, you're already at 50–60% utilisation before opening a single app. In that case, consider switching to Linux Lite (Xfce-based, ~350 MB idle), MX Linux (~400 MB idle), or antiX (~180 MB idle). Check out our Best Lightweight Linux for Old Hardware guide for detailed recommendations.

Running Linux on a VPS? Squeeze More Performance From the Cloud

The same principles apply to cloud servers — misconfigured swap, wrong I/O scheduler, and bloated services kill VPS performance just as much as on desktops. If you're evaluating VPS providers, Vultr offers fast NVMe-backed instances starting at $6/month, and new accounts get $100 in free credit to experiment with.

Claim $100 Free Credit on Vultr →

Prefer cPanel hosting or a beginner-friendly panel? Hostinger VPS starts at under $5/month with a full KVM environment and easy Linux setup.

Frequently Asked Questions

Why is my Linux system slow even though I have 16 GB of RAM?

RAM quantity isn't always the bottleneck. A slow NVMe driver, a runaway process consuming 100% CPU on one core, a failing HDD, or excessive disk I/O from log writing can all cause sluggishness regardless of how much RAM you have. Run top -o %CPU and iostat -x 1 (install sysstat if needed) to identify whether CPU or I/O is the actual constraint.

Will lowering swappiness to 10 cause problems?

Rarely. The only scenario where it can cause issues is on a machine with very little RAM (under 1 GB) where you're running memory-intensive workloads — in that case, the OOM killer may terminate processes instead of swapping them out. On any modern desktop with 4 GB+, swappiness 10 is a well-proven, safe default used by many popular distros including Fedora's spin configurations.

Is preload safe? Will it slow down boot?

Preload is very safe — it only reads files into memory; it can't modify or corrupt them. It does run at startup, but it's low priority and the daemon itself uses minimal CPU. Boot time impact is negligible (typically under 0.1 seconds added). The main risk is on low-RAM machines where it competes for memory — we recommend skipping it if you have less than 4 GB.

My laptop feels slow only on battery. What's happening?

Power management. On battery, most systems switch to a conservative CPU governor that caps clock speed. Check with cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor. If you see powersave, install cpufrequtils and set it to ondemand or schedutil for a balance between battery life and responsiveness. Avoid setting it to performance on battery — it drains quickly.

How do I tell if my hard drive is failing and causing slowness?

Install smartmontools and run a short SMART self-test:

sudo apt install smartmontools    # Debian/Ubuntu
sudo smartctl -t short /dev/sda   # Start a short test
sudo smartctl -a /dev/sda         # View results (wait ~2 minutes)

Look for non-zero values in the "Reallocated_Sector_Ct," "Pending_Sector," or "Offline_Uncorrectable" rows. Any non-zero value there means the drive is likely failing and should be replaced — no amount of software tuning will fix a dying HDD.

Does this guide apply to Ubuntu, Fedora, and Arch equally?

Most fixes (Fixes 2, 3, 4, 6, 7, 8, 9, 10) apply universally to any systemd-based Linux distro. Fix 1 uses systemctl which works everywhere. Fix 5 uses distro-specific package managers — the guide covers apt (Ubuntu/Debian), dnf (Fedora/RHEL), and pacman (Arch) separately. Fix 9 (preload) is available via most package managers but may need to be compiled from AUR on Arch.

🐧
Chippy
Your Linux distro assistant