amuck-landowner

Adjusting swappiness a openvz vps?

Wambo

New Member
Hi I hope you can help! I have a server that seems to be running a little slow and when I checked the memory I see this:

Screenshot from 2015-03-24 09:27:28.png

When I run: 


sysctl vm.swappiness

it says that swappiness is set to zero...



root@srv1:~# sysctl vm.swappiness
vm.swappiness = 0
and if I try to set the swappiness I get this error.... :(



root@srv1:~# sysctl -w vm.swappiness=10
sysctl: permission denied on key 'vm.swappiness'
I want to disable swapping or limit it extremley. It is too high now and I have free ram for things to use and I don't know why things are swapping.

 
 

Wambo

New Member
You can't set swappiness from inside a VPS, it's set on the node.
How then can I figure out how to stop things from swapping when there is memory available? Only 88MB of memory / RAM is being used with 53MB going to swap / drives.
 

Munzy

Active Member
I have a feeling that your server being slow isn't due to the swap.... run top and see what you WA value is.
 

KuJoe

Well-Known Member
Verified Provider
Swap = RAM for OpenVZ, it's not actually using swap on the hard drive so you're good.
 

weloveservers

New Member
Verified Provider
Hi I hope you can help! I have a server that seems to be running a little slow and when I checked the memory I see this:

attachicon.gif
Screenshot from 2015-03-24 09:27:28.png

When I run: 


sysctl vm.swappiness

it says that swappiness is set to zero...



root@srv1:~# sysctl vm.swappiness
vm.swappiness = 0
and if I try to set the swappiness I get this error.... :(



root@srv1:~# sysctl -w vm.swappiness=10
sysctl: permission denied on key 'vm.swappiness'
I want to disable swapping or limit it extremley. It is too high now and I have free ram for things to use and I don't know why things are swapping.
SWAP cannot be changed as an end user, it is set by your provider.
 
Last edited by a moderator:
Top
amuck-landowner