(Gentoo)Help me reduce my boot up memory usage
-
Just download more RAM lol
-
It’s apparently jumped by almost a third of all of their available RAM. That’s pretty significant.
-
I’m pretty sure only the yellow bar on the right of that indicator is cache. Green is actually being used by processes.
-
When you want to turn it on, instead unplug it and go start a farm. Problem solved, requires zero ram
-
We joke but zram swap works wonders on low resource systems sometimes
-
I meant like in general..
I do agree it's worth investigating if it happens again. My best guess so far would be some kind of data written to a tmpfs. That'd explain it not being associated with a particular process, yet counting towards actual used RAM.
-
You can also drop cache for debugging by running something like
echo 3 | sudo tee /proc/sys/vm/drop-caches
But remember that the kernel knows best --- this RAM will be automatically be freed up when needed and you should never run this except for debugging (or maybe benchmarking).
-
Are you having performance problems? If not, what do you care?
-
Time for the classic https://www.linuxatemyram.com/
-
Although you may eventually want a ram
-
The buff/cache will free automatically when an application needs ram, until then it's useful for speeding up the system.
-
It just fucks your CPU usage
-
I don't see anything wrong here. Ram is supposed to be always as full as possible.
What is not needed by running programs should be full of disk pages cached. A system with lots of free ram is oversized or abnormal.
Also, today's kernels require swap space. On disk is a must for a server, and maybe consider even zram.
Having swap will allow the kernel to organize it's memory usage even better.
Don't over think ram as that is a field in which you will be wrong and the kernel will be right 99%.
-
Not as badly as you'd expect, modern compression is pretty quick using the lz*'s and you're only expending cycles when you're hitting swap
-
Yea, this kind of blows me away. Maybe I'm out of the loop, but 3-4 processes each eating away that much memory? Just to deal with the network stuff? Holy fuck.
-
Well I wasn't thinking about memory (and maybe that's the reason some people downvoted that comment...) but because in my experience NetworkManager takes time starting at boot and with months/years it was taking more and more time. I reset it once and kept doing the same thing.
As you said you're planning on a home server kind of thing I'd think setting up a static ip is a good idea and NetworkManager is just an overkill for that - you could very well go along with Gentoo's netifrc.
-
Uh, memory metrics in Linux are a pain. The only tool that reports most cached as available is htop. free, top and a lot of other software (like node_exporter) will report that a lot of cached memory is not available.
To OP: don’t worry, a lot of Linux tools are smart enough to give back memory if memory pressure rises.
-
MEM% for each NetworkManager process is 0.4 % of 3.28 G ≈ 13.1 M. Additionally, almost certainly most of this will be shared between these process, as well as other processes, so you cannot just add them together.
The virtual size (350M) is the allocated virtual memory. quite clearly only 13.1 M of this are actually in use. The rest will only start getting backed by real physical memory if it is being written to.
The way this works is that the process will get interrupted if it writes to a non-physical memory location (by the memory management unit (MMU); this is known as a page fault), and executions jumps to the kernel which will allocate physical memory and alter the virtual memory table, and then proceed with the execution of the write operation.
Many programs or library functions like to get way larger virtual memory buffers than they will actually use in practice, because that way the kernel does all this in the background if more memory is needed, and the program doesn't need to do anything. I.e. it simplifies the code.
-
Remove Modemmanager if you don't use it, replace Network-manager and wpa_supplicant with connman or iwd, maybe look if you can remove elogind since you already use seatd.
-
The memory is available if applications need it
That's not true, since it's reserved memory.