I’m currently not in a situation where swap is being used so I think my system is doing fine right now. I’m not against swap, I get it’s better to have it than not but my intention was to figure out how close is my system getting to using swap. If it went from not using swap at all to using it constantly, I’d probably want to upgrade my ram, right? If nothing else just to avoid system slow downs and unneeded wear on my SSD
a_fancy_kiwi
From what I can tell, my system isn’t currently using swap at all but it does have 8GB of available swap if needed.
To make sure I’m following what you are saying, if I upgraded my system to 64GB and changed nothing else, and let’s assume ZFS didn’t trying caching more stuff, would there still be a potential for my system to use swap just because the system wanted to even if it wasn’t memory constrained?
Came across some more info that you might find interesting. If true, htop is ignoring the cache used by ZFS but accounting for everything else.
Assuming the info in this link is correct, ZFS is using ~20GB for caching which makes htop's ~8GB of in use memory make sense when compared with the results from cat /proc/meminfo. This is great news.
My results after running cat /proc/spl/kstat/zfs/arcstats:
c 4 19268150979
c_min 4 1026222848
c_max 4 31765389312
size 4 19251112856
Thank you for the detailed explanation
You're an angel. ~~I don't know what the fuck htop is doing showing 8GB in use~~ ~~Based on another user comment in this thread, htop is showing a misleading number~~. For anyone else who comes across this, this is what I have. ~~This makes the situation seem a little more grim.~~ I have ~2GB free, ~28GB in use ~~, and of that ~28GB only ~3GB is cache that can be closed~~. For reference, I'm using ZFS and roughly 27 docker containers. ~~It doesn't seem like there is much room for future services to selfhost.~~
MemTotal: 30.5838 GB
MemFree: 1.85291 GB
MemAvailable: 4.63831 GB
Buffers: 0.00760269 GB
Cached: 3.05407 GB
That's pretty much where I'm at on this. As far as I'm concerned, if my system touches SWAP at all, it's run out of memory. At this point, I'm hoping to figure out what percent of the memory in use is unimportant cache that can be closed vs important files that process need to function.
Is there a good way to tell what percent of RAM in use is used by less important caching of files that could be closed without any adverse effects vs files that if closed, the whole app stops functioning?
Basically, I'm hoping htop isn't broken and is reporting I have 8GB of important showstopping files open and everything else is cache that is unimportant/closable without the need to touch SWAP.
This is why I'd like to know what tool shows the most useful number. If I only have 4GB out of 30GB left, is that 26GB difference mostly important processes or mostly closable cache? Like, is htop borked and not showing me useful info or is it saying 8GB of the 26GB used is important showstopping stuff?
Fuck. This is a bad time to be running low on memory
I didn’t realize it was that old. Whoever is maintaining it is doing a good job making it look modern
TIL. Thanks for the information