OpenVZ Forum


Home » General » Support » easy RAM allocation
easy RAM allocation [message #47365] Fri, 03 August 2012 08:49 Go to next message
votsalo is currently offline  votsalo
Messages: 26
Registered: December 2011
Location: Greece
Junior Member
I've been using openvz with Proxmox for several months now but I still don't know how to increase the RAM of a container using only command-line tools (preferrably openvz tools). When I had to increase the memory from the command line, I resorted to making a template of the container, destroying the old container and then relaunching it from its template with new memory parameters using pvectl create -memory.

The wiki points out to the Setting_UBC_parameters page, but I find it too complicated. Why do I need to know about kmemsize, privvmpages, physpages, vmgarpages, oomgarpages? That's at least 5 parameters and each one has barrier and limit. When I want to install more RAM in a standalone linux system I just shut it down, plug in a RAM module and start it up again. That's it. The OS simply detects how much RAM is available on the machine and just uses it. I never had to specify any parameters. Why can't it be as simple as this with openvz? Proxmox does it through the UI, but I don't always have the UI available. On my production machine I've disabled the root password and therefore the UI, so I do everything from the command line.

There must be a good reason why these parameters are there, but could there be a vzctl set option that takes just a desired ram size and sets reasonable ubc parameters from it?
Re: easy RAM allocation [message #47369 is a reply to message #47365] Fri, 03 August 2012 14:14 Go to previous messageGo to next message
Ales is currently offline  Ales
Messages: 330
Registered: May 2009
Senior Member
You didn't say which version of Proxmox, but anyway, what you're looking for is 'man vzctl'. It's all there.

If you have a recent enough version of openvz kernel, the setting is as simple as you'd like it to be - just set '--ram' and '--swap' for the container.

How this will affect Proxmox frontend is beyond me... My guess is that you'll have different settings visible in your control panel than set for your VMs in reality.
Re: easy RAM allocation [message #47370 is a reply to message #47369] Fri, 03 August 2012 15:20 Go to previous message
votsalo is currently offline  votsalo
Messages: 26
Registered: December 2011
Location: Greece
Junior Member
Great, thank you.
The vzctl --ram option is what I was looking for.
I'm using Proxmox 2.1.
Previous Topic: [issue] VPS : Cannot allocate memory
Next Topic: detailed guide for custom template
Goto Forum:
  


Current Time: Mon Oct 07 06:17:46 GMT 2024

Total time taken to generate the page: 0.04999 seconds