Comment on Anon time travels
echodot@feddit.uk 2 days agoI’m really quite annoyed because I had the opportunity to buy about a terabyte worth of RAM a couple of months back and I didn’t take it because I didn’t need a terabyte of RAM at that particular moment in time (or indeed ever). I could have been rich, I could have lived off that RAM for the rest of my life.
mlg@lemmy.world 2 days ago
Same man. Got an old R730 with like 16 slots that I could fill to the brim, but I was like “nah it’s not like I need that much”.
Then I realized how much Linux caching was doing when I did fill it up with only a handful of contsiners and VMs.
captcha_incorrect@lemmy.world 2 days ago
I have an R710 collecting dust in the basement. When it was alive, I used to have one VM for each service I used. While having multiple VMs is useful, containers has greatly reduced the amount of RAM I need.
jj4211@lemmy.world 1 day ago
In hopes of making you feel better, the cache amount consumed hardly matters. It’s evictable. So if you read a gigabyte in once that you’ll never ever need again, it’ll probably just float in cache because, well, why not? It’s not like an application needs it right now.
If you really want to feel better about your reported memory usage, sync; echo 3 > /proc/sys/vm/drop_caches. You’ll slow things down a bit as it rereads the stuff it actually needs to reuse, but particularly if your system has a lot of I/O at bootup that never happens again, a single pass can make the accounting look better.
You could at least do it once to see how much cache can be dropped so you can feel good about the actual amount of memory if an application really needs it.
Though the memory usage of VMs gets tricky, especially double-caching, since inside the VM it is evictable, but the host has no idea that it is evictable, so memory pressure won’t reclaim stuff in a guest or peer VM.