OpenVZ Forum


Home » Mailing lists » Users » swap space?
swap space? [message #16105] Tue, 21 August 2007 23:18 Go to next message
Steve Wray is currently offline  Steve Wray
Messages: 18
Registered: August 2007
Junior Member
From: openvz.org
Hi there,
I'm noticing that 'free' shows no swap space in a VE.

I had a good dig through the wiki and man pages and I can't find any 
references to being able to configure a VE to have swap (of its own).

Is this something thats abstracted away (ie the VE gets to use the hosts 
swap as needed) or is there a way to configure swap availability for 
each VE?

Thanks!
Re: swap space? [message #16106 is a reply to message #16105] Tue, 21 August 2007 23:56 Go to previous messageGo to next message
efball is currently offline  efball
Messages: 41
Registered: September 2006
Location: Santa Rosa, California
Member
From: openvz.org
On Wed, Aug 22, 2007 at 11:18:53AM +1200, Steve Wray wrote:
 > Hi there,
 > I'm noticing that 'free' shows no swap space in a VE.
 
 > Is this something thats abstracted away (ie the VE gets to use the hosts 
 > swap as needed) or is there a way to configure swap availability for 
 > each VE?


kernel 2.6.18-ovz028stab039.1-smp:  no swap, RAM = PRIVVMPAGES*256

kernel 2.6.18-8.el5.028stab031.1:  swap = host swap, RAM = host RAM
This does not seem right.

I haven't done much with the el5 kernel yet, my server is still using
2.6.18-ovz028stab039.1-smp.


-- 

   E Frank Ball                efball@efball.com
Re: swap space? [message #16107 is a reply to message #16105] Wed, 22 August 2007 07:30 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

From: openvz.org
Steve Wray wrote:
> Hi there,
> I'm noticing that 'free' shows no swap space in a VE.
> 
> I had a good dig through the wiki and man pages and I can't find any 
> references to being able to configure a VE to have swap (of its own).

That's correct. You can't control VE swap space directly.
Kernel decides itself what should be preempted to swap in the system
and which data is most rarely used.
This is more efficient from overall performance point of view then having
a separate swap space assigned to each VE and used when VE goes higher some limit.

> Is this something thats abstracted away (ie the VE gets to use the hosts 
> swap as needed) or is there a way to configure swap availability for 
> each VE?

"the VE gets to use the hosts swap as needed"

You get it right. In future versions we likely will have real RAM and SWAP limits
and VE will behave like a real std server, but as I said I still wouldn't recommend
to configure it like that cause disk I/O bandwidth which is used for swapping
is a scare resource and it's not worth swapping out something when there is global
RAM available still.

Thanks,
Kirill
Re: swap space? [message #16108 is a reply to message #16106] Wed, 22 August 2007 09:20 Go to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

From: openvz.org
E Frank Ball III wrote:
> On Wed, Aug 22, 2007 at 11:18:53AM +1200, Steve Wray wrote:
>  > Hi there,
>  > I'm noticing that 'free' shows no swap space in a VE.
>  
>  > Is this something thats abstracted away (ie the VE gets to use the hosts 
>  > swap as needed) or is there a way to configure swap availability for 
>  > each VE?
>
>
> kernel 2.6.18-ovz028stab039.1-smp:  no swap, RAM = PRIVVMPAGES*256
>
> kernel 2.6.18-8.el5.028stab031.1:  swap = host swap, RAM = host RAM
> This does not seem right.
>   
This is not the kernel, this is just meminfo virtualization plus newer
vzctl which has --meminfo privvmages:1 by default.
> I haven't done much with the el5 kernel yet, my server is still using
> 2.6.18-ovz028stab039.1-smp.
>
>
>
Previous Topic: openvz naming conventions; numeric vs symbolic
Next Topic: Trouble compiling ovz028stab039.1-combined
Goto Forum:
  


Current Time: Thu Jul 16 15:59:39 GMT 2020