OpenVZ Forum


Home » Mailing lists » Users » usage of swap on host server
usage of swap on host server [message #28233] Wed, 12 March 2008 06:52 Go to next message
Markus Hardiyanto is currently offline  Markus Hardiyanto
Messages: 27
Registered: April 2007
Junior Member
does openvz can use the swap partition on the host server for the VE inside it? because i have 2GB RAM and 2GB swap on the host server, then setup 2 VE with 1GB guaranteed RAM and 1.5GB burstable RAM for each VE.

it seems that if the 2 VE burst the RAM usage more than 2GB in total, the host didn't use its swap partition to accommodate the burst need as I check the swap partition is always show 0

is it true that i can't use the host swap as RAM for VE? in other word 2GB RAM + 2GB swap != 4GB memory can be allocated for VEs?
 
Best Regards,
Markus



Send instant messages to your online friends http://uk.messenger.yahoo.com
Re: usage of swap on host server [message #28237 is a reply to message #28233] Wed, 12 March 2008 12:14 Go to previous messageGo to next message
lst_hoe01 is currently offline  lst_hoe01
Messages: 15
Registered: February 2007
Junior Member
Zitat von Markus Hardiyanto <markus.hardiyanto@yahoo.com>:

> does openvz can use the swap partition on the host server for the VE  
>  inside it? because i have 2GB RAM and 2GB swap on the host server,   
> then setup 2 VE with 1GB guaranteed RAM and 1.5GB burstable RAM for   
> each VE.
>
> it seems that if the 2 VE burst the RAM usage more than 2GB in   
> total, the host didn't use its swap partition to accommodate the   
> burst need as I check the swap partition is always show 0
>
> is it true that i can't use the host swap as RAM for VE? in other   
> word 2GB RAM + 2GB swap != 4GB memory can be allocated for VEs?
>
> Best Regards,
> Markus

The VE can use the memory supplied by the hardware node. It does not  
matter if the HW node uses RAM or SWAP beside performance. If the HW  
node does not use SWAP you simply have not *used* but maybe only  
reserved more then 2GB in sum (HW-node + VE). You can check  
/proc/meminfo on the HW-node to see how much of your RAM is used.

Regards

Andreas




-- 
All your trash belong to us ;-)  www.spamschlucker.org
To: stephan@spamschlucker.org
Re: usage of swap on host server [message #28246 is a reply to message #28233] Wed, 12 March 2008 14:27 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Markus Hardiyanto wrote:
> does openvz can use the swap partition on the host server for the VE 
> inside it? because i have 2GB RAM and 2GB swap on the host server, 
> then setup 2 VE with 1GB guaranteed RAM and 1.5GB burstable RAM for 
> each VE.
>
> it seems that if the 2 VE burst the RAM usage more than 2GB in total, 
> the host didn't use its swap partition to accommodate the burst need 
> as I check the swap partition is always show 0
>
> is it true that i can't use the host swap as RAM for VE? in other word 
> 2GB RAM + 2GB swap != 4GB memory can be allocated for VEs?
Host system swap is definitely used then needed.

PS in OpenVZ we do not understand terms such as "burstable RAM". Where 
have you got it from?
Re: usage of swap on host server [message #28250 is a reply to message #28246] Wed, 12 March 2008 15:16 Go to previous messageGo to next message
Danny Terweij is currently offline  Danny Terweij
Messages: 4
Registered: November 2007
Junior Member
From: "Kir Kolyshkin" <kir@openvz.org>
> PS in OpenVZ we do not understand terms such as "burstable RAM". Where 
> have you got it from?

As far as i know OpenVZ have garanteed and burstable RAM. (Xen does not have 
burstable RAM).
And we use it fine.
It also should use the HN's SWAP as additional memory for the VE's

Danny.
Re: usage of swap on host server [message #28274 is a reply to message #28233] Thu, 13 March 2008 01:57 Go to previous messageGo to next message
Markus Hardiyanto is currently offline  Markus Hardiyanto
Messages: 27
Registered: April 2007
Junior Member
the problem is i'm starting to get error: fork: cannot allocate memory, and when it happens apache will show 500 internal server error and wont fix if i'm not stopping and starting it manually. any way to prevent this? I want the RAM allocation for the VE remains the same.
 
Best Regards,
Markus

----- Original Message ----
From: Danny Terweij <danny@leto.nettuning.net>
To: users@openvz.org
Sent: Wednesday, March 12, 2008 23:16:24
Subject: Re: [Users] usage of swap on host server

It  also  should  use  the  HN's  SWAP  as  additional  memory  for  the  VE's





Send instant messages to your online friends http://uk.messenger.yahoo.com
Re: usage of swap on host server [message #28278 is a reply to message #28274] Thu, 13 March 2008 02:16 Go to previous messageGo to next message
Jerry Del Rio is currently offline  Jerry Del Rio
Messages: 2
Registered: March 2008
Junior Member
Markus, if you plan to have just a few users you may want to
reduce the number of processes apache will fork by deault.
Take a look at the "StartServers" parameter in
the <IfModule prefork.c> section of the httpd.conf file.

Good luck

-Jerry





Quoting Markus Hardiyanto <markus.hardiyanto@yahoo.com>:

> the problem is i'm starting to get error: fork: cannot allocate   
> memory, and when it happens apache will show 500 internal server   
> error and wont fix if i'm not stopping and starting it manually. any  
>  way to prevent this? I want the RAM allocation for the VE remains   
> the same.
>
> Best Regards,
> Markus
>
> ----- Original Message ----
> From: Danny Terweij <danny@leto.nettuning.net>
> To: users@openvz.org
> Sent: Wednesday, March 12, 2008 23:16:24
> Subject: Re: [Users] usage of swap on host server
>
> It  also  should  use  the  HN's  SWAP  as  additional  memory  for   
>  the  VE's
>
>
>
>
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>






-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Re: usage of swap on host server [message #28279 is a reply to message #28233] Thu, 13 March 2008 02:51 Go to previous messageGo to next message
Markus Hardiyanto is currently offline  Markus Hardiyanto
Messages: 27
Registered: April 2007
Junior Member
Hello Jerry,

thanks for your suggestion, but other process also having the same problem, such as firewall and email server. 
 
Best Regards,
Markus

----- Original Message ----
From: Jerry Del Rio <jdelrio@qunoc.com>
To: users@openvz.org; Markus Hardiyanto <markus.hardiyanto@yahoo.com>
Sent: Thursday, March 13, 2008 10:16:26
Subject: Re: [Users] usage of swap on host server



Markus,  if  you  plan  to  have  just  a  few  users  you  may  want  to
reduce  the  number  of  processes  apache  will  fork  by  deault.
Take  a  look  at  the  "StartServers"  parameter  in
the  <IfModule  prefork.c>  section  of  the  httpd.conf  file.

Good  luck

-Jerry





Quoting  Markus  Hardiyanto  <markus.hardiyanto@yahoo.com>:

>  the  problem  is  i'm  starting  to  get  error:  fork:  cannot  allocate    
>  memory,  and  when  it  happens  apache  will  show  500  internal  server    
>  error  and  wont  fix  if  i'm  not  stopping  and  starting  it  manually.  any  
>   way  to  prevent  this?  I  want  the  RAM  allocation  for  the  VE  remains    
>  the  same.
>
>  Best  Regards,
>  Markus
>
>  -----  Original  Message  ----
>  From:  Danny  Terweij  <danny@leto.nettuning.net>
>  To:  users@openvz.org
>  Sent:  Wednesday,  March  12,  2008  23:16:24
>  Subject:  Re:  [Users]  usage  of  swap  on  host  server
>
>  It   also   should   use   the   HN's   SWAP   as   additional   memory   for    
>   the   VE's
>
>
>
>
>
>  Send  instant  messages  to  your  online  friends  http://uk.messenger.yahoo.com
>
>  _______________________________________________
>  Users  mailing  list
>  Users@openvz.org
>  https://openvz.org/mailman/listinfo/users
>
>  --
>  This  message  has  been  scanned  for  viruses  and
>  dangerous  content  by  MailScanner,  and  is
>  believed  to  be  clean.
>






-- 
This  message  has  been  scanned  for  viruses  and
dangerous  content  by  MailScanner,  and  is
believed  to  be  clean.






Send instant messages to your online friends http://uk.messenger.yahoo.com
Re: usage of swap on host server [message #28282 is a reply to message #28274] Thu, 13 March 2008 07:19 Go to previous message
Benoit Branciard is currently offline  Benoit Branciard
Messages: 8
Registered: January 2008
Junior Member
Markus Hardiyanto a écrit :
> the problem is i'm starting to get error: fork: cannot allocate memory, and when it happens apache will show 500 internal server error and wont fix if i'm not stopping and starting it manually. any way to prevent this? I want the RAM allocation for the VE remains the same.
>  

Just to be sure, don't you have some resource limits hit for your VZ 
(have a look to /proc/user_beancounters)? If so, raising the faulty 
limit should help.

-- 
Ce message a ete verifie par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a ete trouve.
Re: usage of swap on host server [message #28379 is a reply to message #28274] Thu, 13 March 2008 02:28 Go to previous message
Raimund Sacherer is currently offline  Raimund Sacherer
Messages: 2
Registered: March 2008
Junior Member
On 13/03/2008, at 2:57, Markus Hardiyanto wrote:

> the problem is i'm starting to get error: fork: cannot allocate  
> memory, and when it happens apache will show 500 internal server  
> error and wont fix if i'm not stopping and starting it manually. any  
> way to prevent this? I want the RAM allocation for the VE remains  
> the same.
>
try looking in the file /proc/user_beancounters
if there are in the last column (failcnt) positive values (i guess at  
privvmpages) then go to the wiki and there is the behavior of  
privvmpages documented, you should set this higher for your VM's

best
raimund

> Best Regards,
> Markus
>
> ----- Original Message ----
> From: Danny Terweij <danny@leto.nettuning.net>
> To: users@openvz.org
> Sent: Wednesday, March 12, 2008 23:16:24
> Subject: Re: [Users] usage of swap on host server
>
> It  also  should  use  the  HN's  SWAP  as  additional  memory  for   
> the  VE's
>
>
>
>
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
>
Previous Topic: Change date on a VPS
Next Topic: problems with vzctl init logging patch
Goto Forum:
  


Current Time: Sun Feb 05 13:27:42 GMT 2023

Total time taken to generate the page: 0.01164 seconds