RHEL 7.2 memory use, per `free -m`:

```
              total        used        free      shared  buff/cache   available
Mem:         386564       77941       57186         687      251435      306557
Swap:         13383        2936       16381

```

we see that used swap is 2936M

so we want to decrease it to min by the following 

```
echo 1 > /proc/sys/vm/swappiness

sysctl -w vm.swappiness=1

echo "vm.swappiness = 1" >> /etc/sysctl.conf

```

and after 10 min we check again , but still OS used the swap

`free -m`:

```
              total        used        free      shared  buff/cache   available
Mem:         386564       77941       57186         687      251435      306557
Swap:         13389        2930       16381

```

why the actions that we did not take affect immeditly?

Do we need to restart the OS, in order to get swap used to be 0 ?

**example**

we run `vmstat`:

```
 vmstat
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 3  0  85740 20255872 2238248 183126400    0    0     7   162    0    0  7  1 92  0  0

```

we decrease the vm.swappiness=1

and run vmstat after 10min:

```
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 3  0  85740 20255872 2238248 183126400    0    0     7   162    0    0  7  1 92  0  0

```