Control Web Panel

WebPanel => CentOS 7 Problems => Topic started by: sobayyal on August 14, 2020, 07:30:34 PM

Title: Very High swap memory usage
Post by: sobayyal on August 14, 2020, 07:30:34 PM
Hi there Can you please tell me how to solve it that i have installed CWP on my vps and after few days its using 100% of swap memory and also have 103 process in running state i dont knw what happening and my site also workin slowly

please guide me what to do

1 vCore 2.4 GHz
RAM (with cache) :  1.59GB / 2GB
RAM (Without Cache) : 1.42GB / 2GB
Swap : 0.25GB / 0.25GB (100%)
Space : 08GB / 20GB SSD
Title: Re: Very High swap memory usage
Post by: Igor S. on August 16, 2020, 07:22:24 PM
Hi.

You have too low memory. That is the okay OS used many SWAP, I would recommend to add 2Gb RAM and delete the swap.
Title: Re: Very High swap memory usage
Post by: cinique on August 16, 2020, 09:55:11 PM
Yup, through money at it (more RAM), rather than fix the root cause. /sarcasm
I'll bet that no system tuning has been done.
I run a few instances of CWP on 2GB RAM and even some on 1GB, without excessive swapping.
CWP can make running a server easier but is no substitute from learning how to be a sysadmin.
Title: Re: Very High swap memory usage
Post by: Igor S. on August 18, 2020, 08:26:46 AM
You can configure the swap in your OS.
Try to read more detailed about swap config by the link: https://access.redhat.com/solutions/103833
Title: Re: Very High swap memory usage
Post by: PiotrE on January 15, 2021, 10:35:28 AM
For future reference - to set swapiness to 1 (use only whan much needed)

To check what parameter is set now:
# sysctl vm.swappiness
vm.swappiness = 30

Temporaly set
# sysctl -w vm.swappiness=1

Permamently (need reboot) - edit file:
# nano /etc/sysctl.conf

and put:
vm.swappiness = 1

and reboot.

Title: Re: Very High swap memory usage
Post by: Sandeep on January 15, 2021, 03:11:14 PM
if you increase physical ram swap memory usage will be lowered that means you need more RAM sooner or later.