RAM and Swap misconfigured? :S [message #27082] |
Fri, 08 February 2008 14:08 |
|
silentninja
Messages: 37 Registered: September 2007
|
Member |
|
|
I've noticed that on our VPS server which has 2gb of ram and 4gb of swap memory, it seems to give unlimited ram memory to all vps.. or maybe I am wrong.
Here's the 97.conf file options (where 97 is the ID from a vps):
VERSION="2"
ONBOOT="yes"
NUMPROC="400"
NUMTCPSOCK="500"
NUMOTHERSOCK="500"
VMGUARPAGES="102400"
KMEMSIZE="16384000:18022400"
TCPSNDBUF="5365760:10485760"
TCPRCVBUF="5365760:10485760"
OTHERSOCKBUF="1503232:4063232"
DGRAMRCVBUF="262144"
OOMGUARPAGES="102400"
LOCKEDPAGES="4096"
SHMPAGES="131072"
PRIVVMPAGES="262144:292912"
NUMFILE="8192"
NUMFLOCK="200:220"
NUMPTY="64"
NUMSIGINFO="512"
DCACHESIZE="4194304:4317184"
PHYSPAGES="9223372036854775807"
NUMIPTENT="300"
DISKSPACE="20000000:25000000"
DISKINODES="7000000:7200000"
QUOTATIME="0"
OFFLINE_MANAGEMENT="yes"
VE_ROOT="/vz/root/$VEID"
VE_PRIVATE="/vz/private/$VEID"
OSTEMPLATE="centos-4-i386-default"
ORIGIN_SAMPLE="vps.basic"
IP_ADDRESS="xxx.xxx.xxx.xxx"
CPULIMIT="21"
QUOTAUGIDLIMIT="1000"
HOSTNAME="xxx.xxxxxxxx.xxx"
(I've edited the HOSTNAME and IP_ADDRESS for privacy, all other stuff has been copypasted).
My Idea is that the VPS has about 256mb of total RAM and some Swap too (ideally 512mb, but i don't know if it's ok on the conf).
Although if you enter the vps and execute a "top" command, it still shows you 2gb of ram and 4gb of swap.. it's like it's not being limited properly, although if I give the vps less memory it shows me a fork issue, so it seems to work.. mostly.
Is there any way to fix this so the TOP shows me only the ram and swap assigned, and also, is my conf file ok to limit my server to 256mb ram and 512mb swap?
[Updated on: Fri, 08 February 2008 14:11] Report message to a moderator
|
|
|
|
|
|
|
|
Re: RAM and Swap misconfigured? :S [message #27170 is a reply to message #27159] |
Mon, 11 February 2008 16:22 |
|
silentninja
Messages: 37 Registered: September 2007
|
Member |
|
|
maratrus wrote on Mon, 11 February 2008 10:59 | Hi,
vzctl <CT_ID> set --meminfo privvmpages:1 --save
|
The command is wrong, I've done:
vzctl set 97 --meminfo privvmpages:1 --save
And now the top shows me 0k of swap and 1024mb ram. Could it be that the swap pages has been set up for 768mb ?
[Updated on: Mon, 11 February 2008 16:40] Report message to a moderator
|
|
|
|
|
Re: RAM and Swap misconfigured? :S [message #27338 is a reply to message #27177] |
Fri, 15 February 2008 09:09 |
xemul
Messages: 248 Registered: November 2005
|
Senior Member |
|
|
Quote: | the server will have 250mb of user memory with that privvmpages on set, is there any reason about it
|
privvmpages limit is smth like "beancounter will not block you mmap and brk calls till you hit this limit with your private mappings lengths". In other words - these limits do not
1. provide any guarantee for memory allocation
2. provide a strong limit for the memory consumption of your VE
|
|
|