OpenVZ Forum


Home » General » Support » OPENVZ 7: swap is full in CT. How to release swap in openvz ct?
OPENVZ 7: swap is full in CT. How to release swap in openvz ct? [message #52834] Mon, 15 May 2017 10:11 Go to next message
scriptracer is currently offline  scriptracer
Messages: 3
Registered: April 2017
Junior Member
From: *bb.netbynet.ru
#free -h
total used free shared buff/cache available
Mem: 8,0G 3,0G 4,8G 177M 282M 4,7G
Swap: 4,0G 4,0G 0B

How to release the swap?

"swapoff -a && swapon -a" - is not possible:

#whoami
root
#swapoff -a && swapon -a
swapoff: Not superuser.

[Updated on: Mon, 15 May 2017 10:12]

Report message to a moderator

Re: OPENVZ 7: swap is full in CT. How to release swap in openvz ct? [message #52837 is a reply to message #52834] Tue, 16 May 2017 08:44 Go to previous messageGo to next message
khorenko is currently offline  khorenko
Messages: 479
Registered: January 2006
Location: Moscow, Russia
Senior Member
From: *virtuozzo.com
Container's swap is configured from the host, you cannot add or remove it from inside a Container.

You can ask your hosting provider to disable vSwap for your Container.

But why do you want to disable swap?
If there is enough free memory in the Hardware Node, vSwap pages from Container won't get into real physical swap on the Hardware Node,
but will stay in memory, thus vSwap will work very fast unlike usual physical swap.


If you problem is solved - please, report it!
It's even more important than reporting the problem itself...
Re: OPENVZ 7: swap is full in CT. How to release swap in openvz ct? [message #52840 is a reply to message #52834] Tue, 16 May 2017 13:30 Go to previous message
scriptracer is currently offline  scriptracer
Messages: 3
Registered: April 2017
Junior Member
From: *bb.netbynet.ru
Why swap is full if RAM is FREE:
total used free shared buff/cache available
Mem: 8,0G 3,0G 4,8G 177M 282M 4,7G
Swap: 4,0G 4,0G 0B

And i can't empty swap. Only reboot CT helped.
Previous Topic: Slow network speed inside CT
Next Topic: No network after instalation
Goto Forum:
  


Current Time: Wed Dec 13 01:24:00 GMT 2017