0

Hi all

I want to change the swappiness of my linux server.Its running nginx as front alongside with cpanel
Based from tutorials i added vm.swappiness=90(to change default value from 60 to 90) in sysctl.conf and i reboot the server

However when after reboot is done i did cat /proc/sys/vm/swappinessand the value is STILL 60

My server is a VPS

Need urgent help

2
Contributors
4
Replies
6
Views
5 Years
Discussion Span
Last Post by Khav
0

Besides sysctl.conf you have to edit /proc/sys/vm/swappiness, just replace with 90. Then you can use sudo swapoff -a and sudo swapon -a to load the new value without rebooting.

Edited by cereal

0

Thanks cereal bro

But i get permission denied when i tried to edit /proc/sys/vm/swappiness

I am login as root user , i tried both by ssh and ftp

0

That can happen if you run a command like this one:

sudo echo "90" > /proc/sys/vm/swappiness

So, try this:

echo "90" | sudo tee /proc/sys/vm/swappiness

If you still get an error then check file permission, user and group:

ls -l /proc/sys/vm/swappiness

and post back here, maybe someone else will give you a better support. Bye!

Edited by cereal

0

Permission
-rw-r--r-- 1 root root 0 Jul 31 18:07 /proc/sys/vm/swappiness

Hope someone will be able to help me out

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.