# Adjusting swappiness a openvz vps?



## Wambo (Mar 24, 2015)

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:



When I run: 


sysctl vm.swappiness

it says that swappiness is set to zero...



[email protected]:~# sysctl vm.swappiness
vm.swappiness = 0
and if I try to set the swappiness I get this error.... 



[email protected]:~# 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.


----------



## rds100 (Mar 24, 2015)

You can't set swappiness from inside a VPS, it's set on the node.


----------



## Wambo (Mar 24, 2015)

rds100 said:


> 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 (Mar 24, 2015)

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 (Mar 24, 2015)

Swap = RAM for OpenVZ, it's not actually using swap on the hard drive so you're good.


----------



## weloveservers (Mar 30, 2015)

Wambo said:


> 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:
> 
> 
> 
> ...


SWAP cannot be changed as an end user, it is set by your provider.


----------

