this post was submitted on 26 Nov 2024
765 points (97.5% liked)

196

16724 readers
2276 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 12 points 3 weeks ago* (last edited 3 weeks ago)

Most browsers these days have issues with high RAM usage, and memory leaks to. I'd recommend trying to limit the RAM of the browser, it stops it from eating up so much.

Here's how I did it on linux. I'm sure there's a way to do it if you're on Windows though (might not be as good though).

Desktop file to limit Firefox to 8GB of RAM

[Desktop Entry]
Version=1.0
Name=Firefox RAM limit 8GB
GenericName=Firefox Ram limit 8GB
Comment=Limit RAM for Firefox to 8GB;
Exec=systemd-run --user --scope -p MemoryLimit=8G firefox
Icon=firefox
Type=Application
Terminal=false
Categories=Utility;Development;
StartupWMClass=Firefox

This is a script to limit Firefox to 8 gigabytes of RAM, you may change it lower or higher depending on what your needs are by changing the number from 8 to whatever else you'd like. Fair warning though setting it too low will cause Firefox to lag very badly, and will crash chromium browsers outright (Ask me how I found out).