OpenVZ Forum


Home » General » Support » Adding Swap space to VE
Adding Swap space to VE [message #24432] Wed, 05 December 2007 07:55 Go to next message
oliver is currently offline  oliver
Messages: 5
Registered: November 2007
Junior Member
hi,

when i look in the VE for memory/swap space i get XXX kb Memory ( like i defined it in the config ) and 0 kb in swap space.

Now i guess when i run out of XXX kb Memory the applications on ve will get a memory error.

I couldn't find any hint how to add common swap space to a ve.

Is this any possible ?

I want to be sure that the applications will work, also when the physically assigned memory ran out.


Greetings
Oliver
Re: Adding Swap space to VE [message #24436 is a reply to message #24432] Wed, 05 December 2007 09:11 Go to previous message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hi,

Recently Vasily Averin very clearly explained the reason but it was in Russian part of OpenVZ forum. Smile
I'll try to reproduce his idea very precisely.
The fact is that you can restrict the userspace memory via privmpages but inside VE we cannot divide it among the SWAP and RAM. In theory all VE's userspace memory can be swapped that is why
we have to represent the swap size inside VE like privmpages.
But also VE's userspace can stay in RAM so we have to take into account privmpages in RAM accounting. So we have take into account privvmpages in RAM and in SWAP accounting. That is why inside VE swap is shown like zero.
But if your application uses the top/free output you can switch off /proc/meminfo virtualization by using vzctl's --meminfo parameter. And get the same /proc/meminfo like on host system.

Thank You!
Previous Topic: Fuse(sshfs) instead of NFS
Next Topic: CentOS/RHEL-Kernel: Error 13: Invalid or unsupported executable format
Goto Forum:
  


Current Time: Tue Nov 05 21:24:31 GMT 2024

Total time taken to generate the page: 0.05662 seconds