I have my Ubuntu 20.04 server with many cryptocurrencies daemons, I only have this kind of load in this server. Sometimes the server is running out of memory for these daemons, even if I have enough memory in swap partitions, this is an example:
I guess the server is running out the memory because the RAM is almost full, I would like to reduce the load in the memory RAM, changing something to the swap partition, is this possible? Or there is another best way to do something to help the server not run out of memory?
Thanks.
Edit:
free -h
output:
total used free shared buff/cache available
Mem: 62Gi 60Gi 318Mi 0.0Ki 2.1Gi 1.7Gi
Swap: 381Gi 121Gi 260Gi
sudo sysctl vm.swappiness
output:
vm.swappiness = 70
I'm not sure what utility this is a snapshot of, but analysing memory usage is tricky. For example, Linux will cache stuff in memory because... hey why not. So if I run:
When it's finished, you might find all the memory is "used" because it is caching your whole file system. However it isn't really used, because its caching stuff you'll never need again. So you tend to want to analyse not how much memory is used, but how hard your swap partition is getting hammered. If its not getting hit hard, then you may have plenty of memory. You could try disabling your swap. Does the server run fine without it? Maybe you have plenty of memory. I'd still enable swap though because it can get rid of rarely used things. As far as controlling swap, for the most part you can't control what's put there, the kernel does that for you. Which it generally does a good job of.