is it possible to decrease swap partition space in centos7

203 Views Asked by At

Some of my friends told me that larger swap partition is very bad like thousands of web hits/min should be possible on my server,

The swap space is 16 GB, and i installed centos7 with "CWP" -> Control web panel

with enable csf, should i consider decrease swap partition space if it possible without formatting the server and how? or there is a solution to maintain this space not to harm the server,,



    [root@server ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on 
devtmpfs 16G 0 16G 0% /dev
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 16G 201M 16G 2% /run
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/sda2 1.8T 256G 1.5T 15% /
/dev/sdb1 1.8T 275G 1.5T 16% /backup
/dev/sda5 16G 83M 15G 1% /tmp
/dev/sda1 969M 187M 716M 21% /boot
tmpfs 3.2G 0 3.2G 0% /run/user/0
tmpfs 3.2G 0 3.2G 0% /run/user/1075
[root@server ~]#
1

There are 1 best solutions below

0
On

I found that swap file i more effective and easier to do in my case, so i disabled the swap partition and created a swapfile instead..

Here how you do it exactly.

enter image description here