OpenVZ Forum


Home » General » Support » *SOLVED* Set available memory
*SOLVED* Set available memory [message #13850] Wed, 06 June 2007 15:44 Go to next message
mdekkers is currently offline  mdekkers
Messages: 8
Registered: June 2007
Junior Member
Hi all,

I'm a bit confused - I would like to set a VE to have roughly 1.5GB memory and about 5000 processes available. I cant for the life of me work out what values to use.

Any help would be greatly appreciated.

Thanks

Martijn

[Updated on: Wed, 13 June 2007 13:02] by Moderator

Report message to a moderator

Re: Set available memory [message #13852 is a reply to message #13850] Wed, 06 June 2007 15:49 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
-Is this the only VE on the server?
-How much memory does your node have?
-do you want the VE to have max 1.5GB or guaranteed 1.5GB?

I can help you with your config. There are many memory metrics which can be confusing but also vastly increase efficiency (assuming more then 1 VE) vs. vmware virtualization style of "1.5GB".



-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: Set available memory [message #13855 is a reply to message #13852] Wed, 06 June 2007 15:58 Go to previous messageGo to next message
mdekkers is currently offline  mdekkers
Messages: 8
Registered: June 2007
Junior Member
Hi Rick,

Thanks for getting back - appreciated.

- This is the "main" ve on the server. There will be 1 or 2 more, but they can all be tiny, memory-wise as they will run minimal stuff, and none are important.

- The HN has 2048Mb of RAM

- I am not sure if I understand the difference.

heh - yes, I come from a VMWare background, mainly, so a lot of this is more or less new to me.

Thanks

Martijn
Re: Set available memory [message #13947 is a reply to message #13855] Fri, 08 June 2007 11:20 Go to previous messageGo to next message
mdekkers is currently offline  mdekkers
Messages: 8
Registered: June 2007
Junior Member
can anyone give me some pointers on how to quickly set the available memory size? I read the beancounter document, but cant seem to get a valid config up and running.

Thanks a lot

Martijn
Re: Set available memory [message #13950 is a reply to message #13947] Fri, 08 June 2007 11:29 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
Hi. I would set your privvmpages to 4GB, oomguarpags to 1.5GB, vmguarpags to 1.5GB, numproc to 5000. Add at least 2GB swap on your node just for safety.

remember the UBCs are in pages. 1 page = 4096 byte on 32bit.

This will give your VE the memory capabilities you are looking for.



-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters

[Updated on: Fri, 08 June 2007 12:37]

Report message to a moderator

Re: Set available memory [message #13952 is a reply to message #13950] Fri, 08 June 2007 11:53 Go to previous messageGo to next message
mdekkers is currently offline  mdekkers
Messages: 8
Registered: June 2007
Junior Member
Thanks for asnwering - sorry to be a total numpty here, but I am now thoroughly confused about setting these values

output from cat /proc/user_beancounters:
cat /proc/user_beancounters
Version: 2.5
       uid  resource           held    maxheld    barrier      limit    failcnt
     1001:  kmemsize        1178082    2609126    2752512    2936012          0
            lockedpages           0          0         32         32          0
            privvmpages        7077      43511      49152      53575        252
            shmpages            181        837       8192       8192          0
            dummy                 0          0          0          0          0
            numproc              20         51         65         65          0
            physpages          3705      14743          0 2147483647          0
            vmguarpages           0          0       6144 2147483647          0
            oomguarpages       3705      14743       6144 2147483647          0
            numtcpsock            2          6         80         80          0
            numflock              1         10        100        110          0
            numpty                1          4         16         16          0
            numsiginfo            0         11        256        256          0
            tcpsndbuf             0      60448     319488     524288          0
            tcprcvbuf             0     676296     629488    1024288       3224
            othersockbuf       2232      17304     132096     336896          0
            dgramrcvbuf           0       8376     132096     132096          0
            numothersock          1          9         80         80          0
            dcachesize            0          0    1048576    1097728          0
            numfile             426        979       2048       2048          0
            dummy                 0          0          0          0          0
            dummy                 0          0          0          0          0
            dummy                 0          0          0          0          0
            numiptent            14         14        128        128          0

Is this listed in pagesizes, or in KB? also, from my conffile:
cat 1001.conf | grep -i privv
PRIVVMPAGES="49152:53575"


I am trying to work out how to get the right value to feed to privvmpages, but none of the numbers that come up seem right.
Re: Set available memory [message #13954 is a reply to message #13952] Fri, 08 June 2007 12:39 Go to previous message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
all of the metrics that end in pages, are in pages.

PRIVVMPAGES="49152:53575"

49152 pages = ~200MB

So, this VE can allocate at most a little over 200MB. this is very low and will cause many problems if you want to run a LAMP deployment or anything other then a basic service.



-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters

[Updated on: Fri, 08 June 2007 16:00]

Report message to a moderator

Previous Topic: *KNOWN ISSUE* VZquota and Shared VEs with NFS
Next Topic: *SOLVED* Searching for OpenVZ kernel 2.6.9-42
Goto Forum:
  


Current Time: Sun Jul 28 23:17:20 GMT 2024

Total time taken to generate the page: 0.02720 seconds