Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


set memory for a openvz container from command line
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

set memory for a openvz container from command line

niceboyniceboy Veteran

Hi friends,

I dont use a vps control panel and dont want to use one(not even free one) as I need to manage only 3 vps on my dedi.

the issue is..

I have created a vps with 1gb ram/512mb vswap/10gb space and it works fine..

But, it hits memory limit even when I use yum install command..

cat /proc/user_beancounters shows that the privvmpages is hitting limits.

How can I set/increase this limit from command line?

thanks for your time..

nb

Comments

  • vzctl set {ctid} --ram {ram} --swap {swap} --save

    Thanked by 1niceboy
  • I have already did this and the vps shows the memory correctly..

    # free -m total used free shared buffers cached Mem: 1024 232 791 0 0 200 -/+ buffers/cache: 31 992 Swap: 512 0 512

    Problem is, even though it shows free ram/vswap, It hits privvmpages limit and yum install fails.

  • vzctl set {ctid} --privvmpages 1024m

  • @forthcloud It worked.. thanks a lot bro..

  • @forthcloud said:
    vzctl set {ctid} --privvmpages 1024m using this am getting below output

    sudheekar@sudheekar-VirtualBox:~$ vzctl set {a1c58a59b7b7} --privvmpages 1024m
    Bad CT ID {a1c58a59b7b7}
    how could i resolve this "a1c58a59b7b7" is container id

  • can i get any example for the above query

  • KuJoeKuJoe Member, Host Rep

    Why are you running CentOS 5 in 2018? This is why bumping 4 year old threads is bad.

  • @sudheekar said:
    can i get any example for the above query

    Try without "{}"
    And CTID always is numeric ID of node, like vzctl set 101 ...

  • All the suggested commands are correct you should use latest OS.

Sign In or Register to comment.