1045
Anon time travels
(sh.itjust.works)
This is a place to share greentexts and witness the confounding life of Anon. If you're new to the Greentext community, think of it as a sort of zoo with Anon as the main attraction.
Be warned:
If you find yourself getting angry (or god forbid, agreeing) with something Anon has said, you might be doing it wrong.
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.