Go Back   SolidHost Forums Support Forums Operating System Questions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old May 17th, 2007, 13:07   #1
SH-John
Customer
 
Join Date: Jan 2007
Posts: 51
Default VPS memory explanation

Hello All,

We noticed that some customers are somewhat confused about the way memory is allocated. A linux VPS allocates RAM the same way as any other linux environment, however Virtuozzo's parameters (in the Power Panel) just look a little different. The biggest confusion previously was related to allocated(reserved) memory and assigned(used) memory.

Login to your Virtuozzo Power Panel and follow these steps.

Click on "Resources", then click on "Extended". Click on "Secondary UBC Parameters" and "Auxiliary UBC Parameters"

Privvmpages
  • Soft limit
    This limit defines the maximum amount of memory that your VPS can allocate. This limit is usually set to 262,144 pages. 1 page is 4kb, so this limit is set to 1,048,576kb which is equal to 1024Mb (or 1Gb).

  • Hard limit
    This limit is typically just slightly higher than the soft limit, to make sure that your VPS wouldn’t die in case the soft limit is reached.

  • Current use
    This is the amount of memory that your VPS has currently allocated (note: allocated ram basically means “reserved” ram – it is not all actually being used).

Oomguarpages
  • Soft limit
    Despite what the name of this parameter implies, this number isn’t a limit, but a guarantee. This number is the guaranteed ram that’ll always be available to your VPS, no matter what happens.

  • Hard limit
    This parameter is always set to 2,147,483,647 – which basically means “indefinite”. In other words: this parameter isn’t being used by anything and can be disregarded.

  • Current use
    This is the amount of memory that your VPS is currently using.

RAM pages
In a 32bit environment, ram is always used by 4kb pages. A page is basically a "block". In order to convert something from pages to megabytes, you multiply by 4, then devide by 1024 (to go from kilobytes to megabytes). For example:

65536 * 4 / 1024 = 256

In other words: 65536 (4kb) pages equals 256mb. So if your oomguarpages soft limit is set to 65536, that means you have 256mb guaranteed RAM.


Current use: allocation vs. actual usage
As you can see in the above description, the current use of the privvmpages represents how much RAM your VPS has allocated, and the current use of the oomguarpgaes represents how much RAM is actually being used.

Now you might wonder; what's the difference between allocation and actual usage? Allocation basically means "reservation". For instance when you run a webserver, it might allocate 50mb ram but only use 20mb of that allocation.

Your RAM guarantee applies to the actual usage. For instance if you have 256mb guaranteed RAM, your VPS can safely allocate 400mb if the actual usage is less than 256mb, since the guarantee applies to the actual usage (e.g. it simply doesn't matter how much ram is allocated).


Burstable RAM
By now it should probably be clear what guaranteed RAM is. But what is burstable RAM? Burstable RAM is the memory that's available beyond the guaranteed ram. For instance your VPS might have 256mb guaranteed ram, and 1024mb burstable ram. This means that after you have used up your guaranteed ram, there's still 768mb burstable ram available for burst usage - IF there's enough free memory on the host server.

We always leave some extra memory available in each host server as burstable ram. Additionally extra burstable ram is available if another VPS on the same server doesn't use up all of its guaranteed RAM.

Please do keep in mind that in the event a VPS suddenly needs its guaranteed RAM, that VPS will always get it. As a result, that may also mean that a VPS which is using burstable RAM, may get some processes killed in order to reduce its burstable RAM usage. As such, it is highly recommend to not rely on burstable ram except for peak usage. As a rule of thumb, you should always make sure that your guaranteed RAM covers your typical ram usage. For instance if you typically use 350mb ram, you shouldn't get a VPS with 256mb guaranteed ram, since you'd be using almost 100mb ram which may get killed off. Surely it may work just fine - but your processes are at risk that way.

If you are looking to order a new VPS and you aren't sure how high your memory usage will be, then please contact our sales department and we'll setup an evaluation environment for you, which will allow us to make a recommendation as to how much guaranteed RAM you should get as a minimum.


I hope this was helpful. If you have any questions or if you feel like you need something explained in more details, please let us know and we will provide you with a full explanation.

-----------------
Best Regards,
John Strong
SolidHost Chief Operational Officer
SH-John is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +2. The time now is 09:30.