This is on my Framework Laptop:
free -h total used free shared buff/cache available Mem: 58Gi 3,3Gi 47Gi 82Mi 8,6Gi 55Gi
Here is my Proxmox server:
free -h total used free shared buff/cache available Mem: 125Gi 66Gi 33Gi 24Mi 26Gi 58Gi Swap: 8,0Gi 0B 8,0Gi
Meanwhile the electron app you’re trying to run
The other day my laptop was sluggish as hell, checked top and turns out Discord and Orca Slicer were maxing out my cores
Is Orca that resource intensive? I’m running it in a container with KasmVNC and have never really checked out the resource usage. Admittedly it’s on one of my local servers in another room. I guess it’s how large your projects are too.
Edit: maybe it’s just my small projects
And your browser with 300 open tabs doesn’t even fit into the room
Firefox unloads old tabs when restarting the browser, so most of those are more like temporary bookmarks.
Don’t think I’ve ever seen someone open 300 tabs in one session or on Chromium…
Firefox is my tab-hoarding enabler 😍
i think i have over 200 tabs open in Zen (firefox fork)
you just need more things to run on it
I’ve seen builds of the Linux kernel that comfortably fits in my on-die CPU caches.
So it would just be a picture of an empty sofa.
There are mid range CPUs with 128MB of L3 cache now. A Linux distro like Tiny Core could fit entirely in cache.
Tiny Core Linux is a minimal Linux kernel based operating system focusing on providing a base system using BusyBox and FLTK. It was developed by Robert Shingledecker, who was previously the lead developer of Damn Small Linux.
Ah, that explains a lot! Didn’t know about TCL.
% free -h total used free shared buff/cache available Mem: 125Gi 15Gi 90Gi 523Mi 22Gi 110Gi Swap: 63Gi 0B 63Gi
I’ll use it eventually. Just gotta let the disk cache warm up.
63GiB swap, really…?
I have enough disk space.
Plus my
/tmp
is a ramdisk and sometimes I compile large things in there (Firefox) so it is nice to let it be flushed out to disk if there are more important uses for that RAM than holding a file that most likely won’t be read again.I see… but you only use 15GiB… Or are there days you actually use up the memory?
Yes. As this is a workstation the memory use is highly variable, >95% of the time I would probably barely notice having 32GiB. But other times it is a huge performance win to have that capacity available. Sometimes I am compiling lots of stuff and 32 compilers running + ample disk cache is very important. Other times I am processing lots of data and other times I am running a few VMs.
It is a bit of a luxury. I think if I was on a tighter budget I would have gone for 64GiB. However the price difference wasn’t that much and at least a handful of times I have been quite happy to have that capacity available. And worst case I just have everything sitting in disk cache after a warm up which is a small performance win on every small task.
That’s how I got a free netbook. The netbook had 32GB flash with windows and office occupying 27+GB. Then windows wanted to do an update - with an 8+GB file. Spot the problem. And windows can get quite annoying with updates. As the netbook could not be expanded, and attempts to redirect the update to a USB stick did not work, a newer netbook was bought, and I got the old one. Linux plus libreoffice plus a bunch of extras happily sat in 4GB…
One of the cushions is your browser, the other half some IDE you use to write an one-liner.
Gives a lot of Space for running Virtual machines.
Also browsers can chew that up fast if you have a lot of tabs, Firefox has managed to do it a few times. At least until I started limiting its RAM to 8GB (best decision ever)
Limit Firefox to 8GB of RAM .desktop file
[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
(To use it with other apps like Chrome or Electron apps just replace the command at the end, and startup class with the ones from the program you’d like to run. Icon and Name changes are optional but might be desirable so you remember what app it is for).
Alternatively you can open
about:config
and limit memory usage there. For example limit in-memory cache.EDIT: it seems firefox doesn’t allow to set RAM limits yet, only cache sizes
Something I didn’t consider when answering earlier is that even if Firefox did have good RAM usage limiting built-in I probably still wouldn’t use it or recommend it, because one of Firefox’s biggest problems is that it leaks. And memory leaks will not be negated by Firefox’s built-in RAM limiter but they will be by systemd’s (or anything else you might be using instead) Firefox would still crash in the event of a leak but it’s still better than it taking gnome or other apps with it, or freezing your system entirely.
Oh my god thanks but what if someone had a systemd free system
It might be harder for them but there are similar tools that they could use to limit it. One I’ve seen people use is firejail, a tool designed for sandboxing processes and applications.
I’ve personally never tried it myself though so I can’t attest to how well it works, either for this purpose or sandboxing in general.
Oh, I was talking about runit,sysvinit and openrc systems
Does it kill Firefox if it tries to go over the limit? I think I tried this once and if there is a memory leak it just closes itself (which is batter than hogging the whole system, bit still)
No, it just limits the amount of RAM that Firefox (or whatever other application you launch with these parameters) will see.
A few Firefox tabs may crash occasionally as a side effect. And obviously if Firefox eats up all of the 8GB it’s allocated it may crash itself though usually it doesn’t and tabs will crash before the browser crashes.
Thanks I understand now, I’ll have to try it again
Wondering how my 64gb will outlast every other part upgrade my gaming Linux box will get over the years
the rest is electron
I wish I was a cat
I wish you were a cat too
…name checks out
i mean, some games (cough cough factorio cough cough) manage to use up about 25GB of ram on my system, so it’s nice to have a buffer. now, my 64GB may be considered a bit overkill but i call it future proofing
I upgraded to 64 GB a few months ago, also thinking it would be future proof for a while. However, I entirely exhuasted it two weeks ago 😑
tf are you doing
some c++ and android coding on a few projects, plus firefox, plus the other minor stuff like translator, goldendict, …
i think you might be able to run kde plasma with that!
Better add 32 GB Zram to be safe tho
I use Kde plasma so I’m allowed to make fun of it
Fun fact, KDE is very lightweight. More so than a lot of folks give it credit for
plasma wayland just doesn’t work with orca and x11 uses 7× your system resources
Can’t relate, just upgraded my laptop from 32GB to 64GB since VScode would keep closing due to OOM. What? Oh, no, it’s not vscode’s fault…I keep like 5 Firefox windows with 30+ tabs open, like a fucking maniac… Close them? What do you mean “close” them?
Only 30 tabs, you need to bump those numbers up!
I had around 1500 open tabs in Firefox. It was fine. I figured enough was enough and closed them all. Now I close all tabs at the end of the day before shutting down.
What is “shutting down”?
Wait, do people shut down their computers when they’re done using them?
I know I did on the desktop PC we had at home when I was a kid… But now the desktop doubles as a homeserver (and does that more than it does gaming lately) and the laptop just goes to sleep rather than shutting it down.
Ram disks!!