I'm using Pop!_OS on a desktop with an Intel i5-10400 and only 4 GB of physical RAM. I already created an 8 GB swapfile, enabled ZRAM, lowered swappiness, disabled animations and visual effects, closed unnecessary background apps, and moved the system to an SSD. I also tried clearing caches, using Brave with hardware acceleration disabled, and monitoring processes with htop.
The system reaches more than 3 GB of memory usage when I run a browser alongside a lightweight game such as Team Fortress 2 or Cry of Fear. I understand that adding more RAM is the proper long-term solution, and I'm saving for an additional 8 GB DDR4 stick. For now, though, are there any worthwhile free changes that could make the system more responsive under memory pressure?
Would switching to XFCE, LXQt, Openbox, IceWM, or another lightweight desktop make a noticeable difference? Are there kernel, browser, or ZRAM settings worth changing, or is running a browser and a game simultaneously simply unrealistic with 4 GB?
4 Answers
The biggest practical improvement would probably come from replacing the full desktop environment with something lighter. XFCE or LXQt is an easy place to start, while Openbox, IceWM, or a minimal Wayland compositor such as Sway can use even less memory. A lightweight Debian-based installation with only the services and applications you need can have a much smaller idle footprint than Pop!_OS's default desktop. You may also be able to disable unused services, but only remove things you recognize and actually do not need.
Be careful about stacking multiple memory-compression systems and changing kernel parameters blindly. Pop!_OS may already provide a reasonable ZRAM setup, and adding separate configuration tools can create conflicting priorities. If you tune it, verify which service is managing ZRAM, use a suitable compression algorithm such as zstd, and make sure compressed swap has higher priority than disk swap. A higher swappiness can be sensible when compressed RAM is preferred, but the best values depend on the actual configuration. ZSWAP with a disk swapfile is another approach, but generally choose one coherent strategy rather than running several layers without measuring the result.
There is no tweak that creates the equivalent of several extra gigabytes of real RAM. ZRAM and swap mainly prevent crashes by trading speed for capacity; they do not make a memory-heavy game run as if the machine had more physical memory. For now, the realistic approach is to use a lighter desktop, minimize browser tabs and Steam's browser-based overlay/windows, and run either the game or the browser when possible. Adding the RAM stick later will make a much larger difference than most kernel tweaks.
Check whether the memory is actually under pressure before chasing the 'used' number. Linux uses otherwise-unused RAM for filesystem cache, so the important value in `free -h` is usually `available`, along with whether the system is freezing or invoking the OOM killer. Swap on an SSD is usable, although much slower than RAM. With only 4 GB, keeping the browser tab count low, suspending old tabs, avoiding Electron apps, and closing the browser while gaming will likely help more than clearing caches. Disabling hardware acceleration is not automatically a memory-saving win and can sometimes make performance worse.

Modern websites, especially video and social sites, can use hundreds of megabytes per tab. Using simpler clients or opening videos in a separate player can reduce browser overhead, but running a browser and a game together may still exceed what 4 GB can comfortably handle.