-4

VPS: Operating system: Ubuntu Guaranteed RAM: 10g Burst or Dynamic RAM: 20g

When exactly a VPS ( Virtual Private Server) kills the process when dedicated memory limit exceeds? And which process gets killed and on what basis processes are filtered for killing ???

To make my question even more precise, I have certain scenarios. It would be helpful if you could tell me my understanding is right.

I can see privvmpages is set to around 20g and vmguard set to 10g. So that means, I can confirm 10g guaranteed and 20g burst memory is available.

Now let's take this scenario where out of 10g dedicated ram, 8g is occupied by some processes and I am going to allocate 3g to java jvm. In this case, 2g is allocated from dedicated ram and 1 g from burst ram ???. If so, in tight memory situation, container choose which process to kill?? In my understanding, since 1g allocated from burst ram, java jvm process gets killed ???

Processes that are allocated memory from dedicated ram always safe and never gets killed??? Its the process that occupies burst ram gets killed always??? Because when I allocate memory to java, though I choose xms and xmx to set initial and maximum memory, actual consumption happens when memory is needed. So if memory is allocated from dedicated ram, is jvm safe from being killed???

How can I make sure that I am allocating memory from dedicated ram???

When enough memory is available in dedicated ram, allocation always happens from dedicated ram???

If my above understanding is wrong and doesn't make sense, could you explain under what circumstances and which process are eligible to get killed under tight memory situations???

The reason why I am raising this question is, I can see its always the jvm getting killed when memory exceeds around 15g. Its always always the jvm. When I set initial and max memory, allocation is always successful. But when it really starts consuming memory, its this process that always getting killed.. and not touching other process... So I want to make jvm process safe and stop from being killed all the time.

If I change the memory allocation order, ie jvm memory first and rest of the allocation, will it work??? Or do i have to set priority for process???

closed as off-topic by EEAA Sep 19 '16 at 12:08

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

locked by Sven Sep 19 '16 at 18:44

This post has been locked due to the high amount of off-topic comments generated. For extended discussions, please use chat.

Read more about locked posts here.

  • This is a question for your provider. How they implement their resource limits and what they would deem acceptable is entirely between you and them. – yoonix Sep 19 '16 at 4:43
  • Many people have tried this before you. It is the reason why nobody runs Java apps on OpenVZ. It is not about "don't know answer". That's ridiculous. – Michael Hampton Sep 19 '16 at 5:00
  • I'm voting to close this question as off-topic because it should be directed to you provider. Or just cut your losses and switch to a real VPS, not a container like you're currently using. – EEAA Sep 19 '16 at 12:08

Browse other questions tagged or ask your own question.