1 |
I am afraid this is an ".. it depends" question. |
2 |
|
3 |
If you work with large images or data sets, swap can be really handy. |
4 |
If you are doing a little programming, web browsing, reading email you |
5 |
will *probably* be ok, but why risk it? |
6 |
|
7 |
I have a 32gb ram in a master server for an mfs filesystem - it normally |
8 |
sits at about 5GB of ram - however it can go well over 32Gb into swap at |
9 |
times - the first machine I tried it with only had 4gb ram and crashed |
10 |
when it filled the ram, and 8g swap taking the test file system with it |
11 |
- its now production so I am not going to risk it by underprovisioning |
12 |
swap. My 32Gb desktop is not using any swap at the moment ... but it |
13 |
has used it at times. |
14 |
|
15 |
So, yes its quite likely you wont use swap - but if you do something |
16 |
that needs it, it can help avoid a very messy crash. |
17 |
|
18 |
Swap is slow, but if you actually need it - its probably critical that |
19 |
you have it! Unless you are really short of disk space, treat it as |
20 |
insurance :) |
21 |
|
22 |
Look into using swapfiles instead of partitions for flexibility, and the |
23 |
sysctl values of "vm.swappiness" and "vm.vfs_cache_pressure" to manage |
24 |
swap usage (you can set to not use swap until it really has to - some |
25 |
have seen the kernel being too eager to swap out causing slowdowns, |
26 |
though you can make it go in the other direction and "thrash" when it |
27 |
actually needs to use swap if you go to far. The default kernel swap |
28 |
mechanism isn't really that bad! |
29 |
|
30 |
So yes, most of my machines don't need swap *right now* and swap looks |
31 |
like its not being used so it could be removed, but I cant guarantee |
32 |
that they never will, and having years of experience using swap I |
33 |
recommend that its better to be cautious and survive :) |
34 |
|
35 |
BillK |
36 |
|
37 |
|
38 |
On 2/5/20 3:50 am, Raphael MD wrote: |
39 |
> Hello! |
40 |
> |
41 |
> Could I turn my Linux swap off. |
42 |
> I have 32 GB of RAM memory, I suppose my system don’t need swap, |
43 |
> because I’vea lot of RAM, is this true? |
44 |
> |
45 |
> Thanks |
46 |
> -- |
47 |
> M.S. Raphael Mejias Dias |
48 |
> Nuclear Engineer | Reactors |
49 |
> |
50 |
> Secure e-mail: raphael.mejias.dias@××××××××××.com |
51 |
> <mailto:raphael.mejias.dias@××××××××××.com> |
52 |
> PGP Key for raphaxx@×××××.com <mailto:raphaxx@×××××.com>: |
53 |
> https://pgp.mit.edu/pks/lookup?op=get&search=0x87BC5A746072F951 |