Swap usage problem


(Federico Ballarini) #1

NethServer Version: 7
Module: System

I have a question… is it advantageous to reboot every night the server with a cron setting or I have to leave the server up?

Thanks.
Federico Ballarini


(Stefano Zamboni) #2

there’s no reason to reboot a server (but for kernel update or other kind of updates)

moreover, reboot is the most critical status for your hw from many points of view


(Alessio Fattorini) #3

What kind of problem are you trying to resolve?


(Federico Ballarini) #4

My server use about 10% of swap… is it normal?
I have 8GB of RAM…


(Stéphane de Labrusse) #5
[root@ns7dev9 ~]# cat /proc/sys/vm/swappiness
30

when you use about 70% of your ram then you start to play with your swap


(Federico Ballarini) #6

On my server the response is “60” when I launch the command cat /proc/sys/vm/swappiness


(Stéphane de Labrusse) #7

then when you have used 40% of your ram you start to use the swap memory. It is a standard usage of swappiness. You can also look after with google how to change it, one example https://www.hostingstuff.net/tweak-swap-centos-7/

may I ask you to adjust your topic to something relevant on swap settings


(Federico Ballarini) #8

But, in your idea… to which number I have to set this value?


(Stéphane de Labrusse) #9

You can start by a setting to 30-40