Re: Swap Usage [message #3880 is a reply to message #3879] |
Thu, 22 June 2006 13:26 |
|
Quote: | That's not entirely correct. It is indeed teh machine that crashes. It is killing off my application.
|
Most probably your application is not killed, but just crashes because it can not cope well with the out-of-memory situation. In some cases, though, it's indeed the kernel which kills your application in order for your VE to stay within the boundaries specified by User Beancounters limits.
Quote: | I contacted my provider, and spoke to them, but they said that per vps swap is not possible, and that swap is global.
|
That's correct.
Quote: | My question is: If so, how can we ensure quality of service. A provider can use large amount of swap and sell it as memory. If you don't distinguish between RAM and Swap, how can a company make sure that the Service Levels Agreements are met?
|
Quality of service is implemented via User Beancounters. A physical box is divided into multiple partitions (VEs), that are granted a subset of its resources. There are some explicit guarantees (see *guar* parameters in /proc/user_beancounters) and some implicit guarantees (if the physical resources are not oversold you'll be able to use resources up to the limits specified in /proc/user_beancounters).
What your provider can do is to use vzmemcheck and vzcpucheck utilities to check if they are overselling or not, and vzcfgvalidate utility to check if a set of User Beancounters for a VE is consistent.
What you can do in this situation is to check /proc/user_beancounters output, and see if you have some non-zero values in failcnt column (as described in wiki: Resource management). If there are some, then you require more than the current hosting plan offers you -- and in that case you either tune your apps to ask for less resources, or ask your provider to give more resources to you (probably by switching to a better hosting plan, or tuning the individual resources).
So, at the end, this is a question of money, not the technology. Believe me, the technology (OpenVZ and it's User Beancounters) is doing its best both for you as a VE owner, and for other VEs on the same box (by not letting you to abuse the physical server resources).
Hope that helps.
Kir Kolyshkin
|
|
|