Openvz container help re memory allocation?
Register

We are the best invite forum on the internet! Here you will find free invites, free seedboxes, free bonuses, and much more. Our members know the true meaning of sharing and have created a truly global bittorent community! Our site has the most up to date information on all private trackers and our members will guide you and introduce you to this truly secretive and enlightened club. Ready to get started? Register now!


Results 1 to 4 of 4
Like Tree2Likes
  • 2 Post By Copper

Thread: Openvz container help re memory allocation?

  1. #1

    Join Date
    Mar 2011
    Location
    Sheffield, England
    Posts
    583

    Default Openvz container help re memory allocation?

    Hi I hope someone can help me please..

    I recently made a vps using openvz. All went well and I thought I had got it all set up but I am just failing at increasing the memory allocated to it

    This is what I have tried:-
    root@server:/var/lib/vz/template/cache# vzctl set 102 --physpages 1024 --save
    UB limits were set successfully
    Saved parameters for CT 102
    root@server:/var/lib/vz/template/cache# vzctl restart 102
    Restarting container
    Stopping container ...
    Container was stopped
    Container is unmounted
    Starting container ...
    Container is mounted
    Adding IP address(es): 184.82.xxx.xx
    Setting CPU units: 1000
    Set hostname: seed.mytest.org
    File resolv.conf was modified
    Container start in progress...
    root@server:/var/lib/vz/template/cache# vzctl exec 102 free -m
    total used free shared buffers cached
    Mem: 256 81 174 0 0 0
    -/+ buffers/cache: 81 174
    Swap: 0 0 0
    root@server:/var/lib/vz/template/cache#
    As you can see the memory is still allocated as 256mb but I think there are other parameters I need to set regarding system resources?

    I think if anyone who is reading this has a working knowledge of OpenVZ they will know what to do? Or maye even have a config file I can adapt?



    Just so you know I installed a new user and ftpd on the container and assigned an ip no problem and I have tested this so its just the resources bit I am struggling with!

    I have checked all the OpenVZ wiki but I find it very difficult to understand, I hope someone can help me
    Last edited by Kitkatra; November 24th, 2011 at 09:57 AM.


  2. To remove ads become VIP. Inquire about advertising here.
  3. #2

    Join Date
    Jun 2011
    Posts
    5,584
    Blog Entries
    1

    Default



    Not my area of expertise, but you should be able to allocate openVZ memory like so..
    E.g. say you want to configure the first VE instance with 512 MB available for applications:

    # RAM is 4k pages, so 131072*4k = 512M
    vzctl set 1 --save --vmguarpages 131072
    vzctl set 1 --save --oomguarpages 131072
    vzctl set 1 --save --privvmpages 131072:196608


    Or some releases, you may be able to use M or G (for MB or GB, respectively)

    #to set privvmpages/oomguarpages/vmguarpages.
    vzctl set $veid
    --vmguarpages 512M:768M

    This represents 512 MB available to apps (barrier) and 768 MB as a hard limit. Remember to not allocate 100% of your physical memory as available to VE resources or you will run into file paging, which isn't fun for anyone.


    Kitkatra and UltraSbox like this.
    Fortune and love favour the brave .-. Ovid ....

  4. #3

    Join Date
    Mar 2011
    Location
    Sheffield, England
    Posts
    583

    Default

    Wow thanks a lot Copper!

    I don't know know you did it! Managing to understand all that lol! I really don't get why the developers of OpenVZ have to make it so complicated!

    Well I did this:-
    root@server:/var/lib/vz/template/cache# vzctl set 102 --save --vmguarpages 26214 4
    UB limits were set successfully
    Saved parameters for CT 102
    root@server:/var/lib/vz/template/cache# vzctl set 102 --save --oomguarpages 2621 44
    UB limits were set successfully
    Saved parameters for CT 102
    root@server:/var/lib/vz/template/cache# vzctl set 102 --save --privvmpages 26214 4:327680
    UB limits were set successfully
    Saved parameters for CT 102
    root@server:/var/lib/vz/template/cache# vzctl restart 102 Restarting container
    Stopping container ...
    Container was stopped
    Container is unmounted
    Starting container ...
    Container is mounted
    Adding IP address(es): 184.82.xxx.xx
    Setting CPU units: 1000
    Set hostname: seed.mytest.org
    File resolv.conf was modified
    Container start in progress...
    root@server:/var/lib/vz/template/cache# vzctl exec 102 free -m
    total used free shared buffers cached
    Mem: 1024 82 941 0 0 0
    -/+ buffers/cache: 82 941
    Swap: 0 0 0
    I did this ^ ! And as you can see has done me proud! It truly is bizzarre that they wish you to allocate the memory is multiples of 4k's lol! But this seems to have worked perfectly, hehe :)

    There looks like there is no paging file set but hopefully I won't run into it..
    Last edited by Kitkatra; November 24th, 2011 at 09:57 AM.

  5. #4

    Join Date
    Jun 2011
    Posts
    5,584
    Blog Entries
    1

    Default



    Glad you got it working Kitkatra!

    The 4K memory size is a historical artifact, but remains that default page size for most systems, particularly for x86 and x86-64 hardware. I'm sure that there are a lot of other options that can also be set, but you'd probably do better to find someone with more openVZ experience than me. Cheers



    Fortune and love favour the brave .-. Ovid ....

Similar Threads

  1. Replies: 13
    Last Post: October 26th, 2011, 10:53 PM
  2. Replies: 8
    Last Post: March 7th, 2011, 04:00 AM
  3. Memory Allocation error on T-I!
    By sTuDD in forum Help
    Replies: 16
    Last Post: December 1st, 2010, 02:36 AM
  4. Waffles help
    By FoxHound in forum BitTorrent Discussion
    Replies: 6
    Last Post: December 19th, 2007, 10:02 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •