I am afraid this is an ".. it depends" question.

If you work with large images or data sets, swap can be really handy. 
If you are doing a little programming, web browsing, reading email you
will *probably* be ok, but why risk it?

I have a 32gb ram in a master server for an mfs filesystem - it normally
sits at about 5GB of ram - however it can go well over 32Gb into swap at
times - the first machine I tried it with only had 4gb ram and crashed
when it filled the ram, and 8g swap taking the test file system with it
- its now production so I am not going to risk it by underprovisioning
swap.  My 32Gb desktop is not using any swap at the moment ... but it
has used it at times. 

So, yes its quite likely you wont use swap - but if you do something
that needs it, it can help avoid a very messy crash.

Swap is slow, but if you actually need it - its probably critical that
you have it!  Unless you are really short of disk space, treat it as
insurance :)

Look into using swapfiles instead of partitions for flexibility, and the
sysctl values of "vm.swappiness" and "vm.vfs_cache_pressure" to manage
swap usage (you can set to not use swap until it really has to - some
have seen the kernel being too eager to swap out causing slowdowns,
though you can make it go in the other direction and "thrash" when it
actually needs to use swap if you go to far.  The default kernel swap
mechanism isn't really that bad!

So yes, most of my machines don't need swap *right now* and swap looks
like its not being used so it could be removed, but I cant guarantee
that they never will, and having years of experience using swap I
recommend that its better to be cautious and survive :)

BillK


On 2/5/20 3:50 am, Raphael MD wrote:
> Hello!
>
> Could I turn my Linux swap off.
> I have 32 GB of RAM memory, I suppose my system don’t need swap,
> because I’vea lot of RAM, is this true?
>
> Thanks
> -- 
> M.S. Raphael Mejias Dias
> ​Nuclear Engineer | Reactors
>
> Secure e-mail: raphael.mejias.d...@protonmail.com
> <mailto:raphael.mejias.d...@protonmail.com>
> PGP Key for raph...@gmail.com <mailto:raph...@gmail.com>:
> https://pgp.mit.edu/pks/lookup?op=get&search=0x87BC5A746072F951

Attachment: pEpkey.asc
Description: application/pgp-keys

Reply via email to