I recently installed Arch Linux on an older laptop with 4 GB of RAM because Windows and Chrome were using too much memory. The system is somewhat better now, but I still experienced three out-of-memory events while using Firefox today. I need to use a browser along with programming tools such as VS Code and the Arduino IDE, and I would also like to work with Word and PowerPoint files. Swap is already enabled. What browsers, desktop environments, applications, or configuration changes would help keep memory usage manageable?
3 Answers
The desktop environment matters, but the exact hardware and current memory usage should be checked first. GNOME can work, though a lighter option such as XFCE will leave more RAM available. A minimal window manager such as i3 or Sway can use even less, sometimes leaving well under 1 GB idle, but it requires more manual setup and may be frustrating if you are new to Linux. Also consider enabling zram, which compresses some memory and can reduce the chance of out-of-memory failures at the cost of some CPU usage.
Microsoft Office is not a good fit for this laptop if you need the full desktop applications. LibreOffice Writer and Impress can handle most Word and PowerPoint documents, while an Office 365 web subscription can be used in the browser when compatibility is important. A virtual machine would consume too much additional RAM to be a sensible solution here. Also provide the laptop model, processor, storage type, desktop environment, and output from a memory monitor when asking for more specific troubleshooting.
With only 4 GB, changing how you use the browser will make a noticeable difference. Keep the number of tabs and extensions low, close pages you are not actively using, and avoid leaving Firefox, VS Code, the Arduino IDE, and other large applications open simultaneously. Chromium-based browsers are not automatically light, so it is worth comparing actual memory usage on your machine rather than relying on the browser name alone.

A lightweight desktop is probably a better starting point than jumping straight to a bare window manager. XFCE is easier to configure while still using considerably less memory than a full modern desktop.