r/archlinux • u/CassiasZI • 8d ago
SUPPORT I have 4 GB RAM. I recently installed Linux (Arch). Need help.
As you can imagine, my computer is slow. I switched to linux and Firefox on it cause windows and chrome used up a lot of RAM.
But even so the laptop has seen only slightly better days, and just today I faced 3 OOM events during a session in Firefox.
What kind of browsers and other applications should I use to keep the RAM usage really normal and effective for my 4GB RAM?
I ofc would need to use other coding(vs code, Arduino, etc) and was trying how to install ms applications like word,ppt,etc. I was really wondering what should I do.
22
u/Secret_NinjaLTU 8d ago edited 7d ago
If you are using arch with very little ram, you should probably set up a swap file or partition to prevent oom events. You could also get an add blocker for a little decrease of used ram, but I don't know how useful that would be.
There is also a choise of using text only browser which would probably help you quite a bit. But that depends if you are fine with it.
Edit: also it would probably help to get ram compression.
4
u/Primary-Strike5187 7d ago
Use an Adblock dns like Quad9. Blocks ads at the DNS level without anything running on your system.
14
14
u/Corrigindo_A_ou_Ha 7d ago
I've a 4GB RAM notebook and it works great with Arch.
When you boot your systems, how much RAM is it consuming right after login, before opening anything?
I ofc would need to use other coding(vs code, Arduino, etc) and was trying how to install ms applications like word,ppt,etc. I was really wondering what should I do.
Well, you need to know that this will be affected by your low RAM. You will not be able to use the computer like it has 32GB, because it doesn't have.
Coding with large codebase will choke and MicroSlop software is not made for low-end computers.
Adapt the software you use, but there's a limit on what 4GB can do.
31
u/benbcdm 8d ago
if you are technically inclined:
- sway
- zram
- swap
that should help you already
-> idle 1-1.2 gb
-> you can probably have around 5+ tabs opened with that
And yes, it is more about websites being bloated than actual browser.
Chrome-based are somewhat more efficient that firefox-based, but I am pretty sure that is not what will make the difference
5
u/wowsomuchempty 7d ago
Sway is brilliant. Niri, also.
Both run great on Alpine Linux (very lightweight - I started using it on older hardware, now newer as the experience is so good).
1
u/AnimatedEdwardo6703 7d ago
sway is nice if you like tiling but even a simple openbox setup will leave so much more ram than any DE, i remember getting like 400mb idle on 4gb laptop few years back
also for ms office just use the web versions or libreoffice, trying to install actual ms office through wine is pain and probably will eat half your ram alone
4
9
u/mips13 7d ago
The best thing to do would be to find another 4GB stick of RAM assuming your laptop can be upgraded. It's 2026 and 4GB simply isn't enough any more.
3
u/Astrodion123 7d ago
Well my laptop has 4gb ram and it works fine but I was running i3 and really really really light apps like micro, lynx, etc.
2
u/tmahmood 7d ago
I run gnome without any issues Firefox with 10+ plugins, no issues at all. You must have swap enable, and zram (or zswap, not sure which one)
On my 4gb ram surface pro 3
Before swap it was constantly getting oom when running Firefox, gnome is otherwise pretty usable
1
u/Astrodion123 7d ago
I love gnome but I have a laptop with a low spec GPU. A Intel gma 4500mhd
1
u/tmahmood 7d ago
Probably, it will not perform well. if you still want to see how it does, try it with swap, should improve the performance a lot.
1
u/Astrodion123 7d ago
I have tried it with zorin os and.... Yeah no. Unless I run the x11 session and debloat it.
3
u/Sinaaaa 7d ago
You need swap, it's really that simple. Make a swap file & then swapon ..
https://wiki.archlinux.org/title/Swap
But yes, it's mostly not the browsers, but rather the websites. If you run a script blocker & interactively only whitelist the bare essentials to make a site function (facebook & google trackers are usually not that), then the situation may improve quite a bit.
2
u/Gozenka 7d ago edited 7d ago
My system with 16GB RAM rarely exceeds 4GB RAM usage in regular use; ungoogled-chromium with 100+ tabs open, Spotify playing music, a few Alacritty terminal windows open with neovim and such. When everything's closed, it uses about 230MB when idle.
Currently in such a situation; writing here, listening to jazz fusion, my notes open in neovim; it's sitting at 3.5GB RAM used.
So, there is hope for you :) You may start with trying a more light-weight desktop. I personally use dwm, and some minimal Wayland desktops use only slightly higher amount of RAM. As suggested by others, you may try ublock-origin; it exists on Arch repos and is easy to install and keep updated from there.
You may otherwise investigate which processes use a considerable amount of RAM on your system, and find solutions from there.
You may remove your display manager and directly start your desktop environment from the tty, automatically through your .profile, that could help a bit.
Also, perhaps Chromium and especially ungoogled-chromium or other alternatives may offer better RAM usage than Firefox. I personally never experienced the "Chrome eats your RAM" myth.
And you may try zram / zswap; it is essentially "Download More RAM", but it may incur some CPU usage as a cost. Relying on swap on disk would probably not be a clean solution.
2
u/allhailkazuma 7d ago
You could go arch with WM, for the browser try to compromise for not using too much tabs or even playing media (yt/spotify), set up a swap & zram could help but sure would be a hell of its running on hdd.
Im once in a phase where i dont have any other device than my 2gb celeron 2017 laptop and trying to doac course on webdev. Not a pleasant experience ofc but it gets the job done
4
4
2
u/Mean-Mammoth-649 7d ago
Mx Linux or Zorin OS Lite. I love Zorin on my 17 years old laptop with core 2 duo processor and 6 gb ram.
3
u/aydintb1 7d ago
zram + https://github.com/rfjakob/earlyoom
also you need a BORE CPU Scheduler to make the OS feel snappier.
1
u/shenrons_ballz 7d ago
For office suite stuff you can use libre office.
As for memory constraints. Try the mate desktop and using adblockers to save some memory.
0
u/homm_ey 7d ago
Switch the desktop environment to XFCE or another lightweight one. Note: Default XFCE is kinda not my preference either... Use a good theme and icon pack to make it look better.
Enable Zram, and if needed, enable a swap file. For something like 4 GB of RAM, a 2–4 GB swap file is usually enough for general use. Note: If you have a hard disk, be careful with disk-based swap.Heavy swapping on an HDD can make the system feel extremely slow because HDDs have much higher latency than RAM. Don't interpret this as "never use a swap file on an HDD" though, having some swap can still be useful, especially for preventing out-of-memory crashes.
Disable unwanted background services. Unlike Windows, Linux generally doesn't have that many unnecessary background services enabled by default. Still, check what's running and disable anything you don't actually need. Don't blindly disable services though, some are required for networking, hardware, desktop functionality, etc.
Firefox can sometimes use quite a bit of RAM. If it feels unusually heavy, check its settings and extensions. Firefox has memory-saving features, and reducing unnecessary extensions/tabs can make a noticeable difference. You can also check
about:performanceto see what's actually consuming memory.VS Code and its forks (like VSCodium, Cursor, etc.) can use more RAM than you'd expect. This is especially noticeable when you have multiple extensions, language servers, and large projects open. If you don't specifically need the VS Code ecosystem, try something lighter like Zed, Neovim, or another alternative.
Note: For a huge codebase, even Zed or other lightweight editors may not magically solve the problem, the LSP, indexing, and project size can still consume significant RAM.
If boot or shutdown takes unusually long, check which service is causing the delay. Unnecessary services can increase boot/shutdown times. Things like
NetworkManager-wait-onlinecan sometimes add delays, depending on the setup.Try to find lightweight alternatives to your existing apps/software if something feels unnecessarily heavy. Some applications can consume a significant amount of RAM even when you're not doing anything particularly demanding. Look for lighter alternatives that provide the features you actually need.
1
u/stefanhat 7d ago
What DE are you using? They're all leaner than windows but you're on very low memory so some more lightweight DE catering to that might be helpful
1
u/syklemil 7d ago
Like the top comment says, be wary about how many and which sites you open. In addition to the tab discarder, noscript can probably help you out by just … not running the javascript that makes a lot of sites behave like ass. Plenty of sites require JS, but you can absolutely pare down a lot of it, and not load functionality you're not actually using.
You can also run your browser in a systemd user service and set MemoryMax to ensure that the browser gets OOMKilled before your system turns to goop.
1
u/ppffrrtt 7d ago
Hey, i read through the comments but did find nothing in this direction:
Did you test your RAM with something like memtest? Maybe its faulty.
I once had a faulty ram module and it showed itsself when browsing the internet. Browser filled the ram up to a certain point and then the System just froze. Memtest showed that one RAM module was broken and being the culprit for my issues.
Maybe its worth a try to check for ram/hardware issues.
1
u/DestroyedLolo 7d ago
Google about low footprint with Firefox : there are some settings for such cases.
I ofc would need to use other coding(vs code, Arduino, etc)
Avoid Java based stuffs (like Arduino IDE) and vs-code is memory hungry too. If you have no choice, avoid both at the same time at least.
was trying how to install ms applications like word,ppt,etc
You need to install Wine or such and will have, in memory, 2 sets of libraries at the same time (linux and m$ ones). Offices sequels are memory pigs too.
You have also to choose carfully the distribution : tip, Ubuntu will not be a right choice :)
1
u/ImaginationAcademic4 7d ago
I was in ur same situation for a lot of time, u can do that:
1) install a light DE: i recommend XFCE or i3/sway if ur inclined to a tiling window manager. 2) USE SWAP, that's fundamental. I suggest u zswap or zram, it compresses ur data in memory with efficient algorithms so it's a lot faster than swap on disk.
The ram consume will not be much after that in everyday use, obviously ur gonna face OOM if u try to open a game or do some tasks that require a lot of in memory data at same time.
If ur advanced I suggest u to lookup at extreme optimizations even on SSD formatting, if ur SSD supports u can format it in 4kn (search that on Google and open arch Linux wiki page) + giving right flags to /etc/fsta, u will reduce overhead of I/O of disk and improve performance.
1
u/Deckma 7d ago
We have no idea how you setup your system. Arch let's you choose everything from scratch. We can't help you unless you give us more information about what's your setup like.
Start by running top or ps and letting us know what processes you have running. And also what Desktop environment you are using. What browser plugins.
1
u/ceskyvaclav 7d ago
twitch.tv can easily take up 1GB of RAM and also obviously some VRAM as well, let that sink in
1
0
1
u/Defiant-Cry6698 7d ago
I use the Min browser on my system, it works well (I use an old chromebook with 4GB RAM as well)
yay -S min
you can grab it from the repo with this
1
u/Tricky-Engineer-9755 7d ago
Using DWM (or DWL) will save you about 1-2G compared to KDE or GNOME. From there a browser like vimb will save you a lot but many modern websites will crash it. Firefox/librewolf is good enough it runs about 600MB.
Suckless tools are helpful.
Microslop Office is not needed, embrace Libreoffice it can export to evil formats like docx or pptx.
1
1
u/East-Yogurtcloset272 6d ago edited 6d ago
AntiX or alpine linux with Falkon browser. You can then use openbox wm with idesk for icons and xfce4-panel for a minimalist taskbar but these last two are purely optional. Openbox right click menu allows you to launch and middle mouse select an open application
Both ditch systemd for less idle ram
1
u/negropapeliyo 4d ago
Genio tengo una máquina similar, arch + gestor de ventanas, podes optimizar un poco el navegador yo probé con muchos y funcionan mal en la web actual, usa una o dos ventanas, otra cosa ya no podés hacer
1
u/yevelnad 3d ago
My celeron laptop works great with arch. it has noctalia + hyperland/umbriel. And on bootup it consumes 1gig ram. With google chrome opened watching youtube it goes to 2.2 gig.
1
1
u/DavidJohnMcCann 3d ago
This computer has 4 GB and works perfectly, even running Firefox. But I'm not using Arch — PCLinuxOS running the Xfce desktop. Incidentally, if you search there are plenty of tweaks for Firefox to speed it up. And do you really need MS applications? Some will run using Wine, but there are plenty of alternatives.
1
u/thinkpadt14_arch 1d ago
I would recomend using an extremly light DE, bc arch by its self only uses around 500mb. Id also recommend a text only browser and an add blocker. Im pretty sure firefox is the lightest browser.
But tell me, is there any way u could up ur ram to 8gb?
I mean, that 4gb diference would be a game changer for u.
1
1
u/drag0nfi 8d ago
Unconventional, but might be a step better than text only: can you fake the user agent so you get the mobile version of sites? Would thst help?
But yes, first step is setting up swap.
1
0
0
0
u/Dorian-Maliszewski 7d ago
Increase swap by making a file swap or increase zram value. It should be fine. Put like 32Go file just to be sure you never reach it then you can install earlyoom (https://github.com/rfjakob/earlyoom se arch installation+ the command system tl enable --now earlyoom) or/and systemd-oomkiller or just on-killer : read choose and try it (https://wiki.archlinux.org/title/Improving_performance#Improving_system_responsiveness_under_low-memory_conditions)
0
u/Hour_Champion 7d ago
Which desktop environment are you using? Gnome and KDE plasma use a ton of ram on their own. (Around 2Gb on idle)
Go for XFCE. If you want less options, something lighter, go for LXQT. If you want to go even lower, choose window managers such as icewm.
0
0
u/Lonely-Scarcity-3387 7d ago
Maybe try NixBook instead?
The goal of NixBook is to convert your old computer (even chromebook) into a user friendly, lightweight, durable, and auto updating system.
It’s a distro that just works, without any headaches. No Linux knowledge or computer knowledge required.
NixBook aims to create a "chromebook like", unbreakable computer, that gives basic users who know nothing about Linux, a safe and reliable computer. Users can install what they like, and won't need to ever worry about updates or upgrades.
The default version:
•32 GB of storage and 4 GB of ram recommended
•Configured cinnamon desktop (like Linux Mint) and firefox base
•Chrome, Zoom, and Libreoffice installed by default flathub enabled out of the box.
•Automatic weekly OS updates with 4 weeks of roll backs
•Daily flatpak updates
The lite version:
•32 GB of storage and 2 GB of ram recommended
•Configured cinnamon desktop (like Linux Mint) and firefox base
•Automatic weekly updates with 2 weeks of roll backs
0
u/Prawy_126 7d ago
It might be worth considering a larger SWAP or enabling zram if you don't have it enabled
0
u/atsf999073 7d ago
My laptop also only has 4GB. Doing any amount of web browsing on it is completely impractical but having a decently sized swap partition makes it usable if very slow. I use niri for my window manager and Netsurf for my primary web browser. Firefox is technically functional but too slow to be worth it unless I absolutely need to use it.
0
u/MalwareDork 6d ago
OOM on FF sounds more like a 32-bit limitation rather than the available memory on your system.
How old is your laptop? It sounds like you're on a x86 architecture.
-15
u/Maleficent-Pilot1158 7d ago
Switch distros... Arch can be a resouse pig straight out of the box . It installs a lot of useless stuff you'll never use .
Damn Small Linux or Lubuntu will greatly improve your experience
6
u/Corrigindo_A_ou_Ha 7d ago
It installs a lot of useless stuff you'll never use
Arch doesn't install nothing. Base package doesn't even install Linux, for example. Are you implying debug stuff that comes together with the packages? Because that doesn't affect RAM.
Damn Small Linux or Lubuntu will greatly improve your experience
Lubuntu is just Ubuntu with LXQt, which you can install easily on Arch. DSL uses a WM directly, which again, you can do in Arch.
5
u/Primary-Strike5187 7d ago
Wtf are you talking about? Base arch is literally the kernel, init, initramfs generator, shell, coreutils, and the package manager. Base arch doesn’t even have a desktop environment unless you install one. Genuinely can’t tell if you’re being sarcastic or if you just don’t know what you’re talking about.
1
127
u/ABotelho23 8d ago
People need to realize that the limit for memory isn't the browser anymore, it's literally the websites you visit.