|
|
Re: Disabling all limits [message #35642 is a reply to message #35624] |
Thu, 09 April 2009 22:21 |
divB
Messages: 79 Registered: April 2009
|
Member |
|
|
Thank you very much, I decided do not remove the limits but rather adapt the needed values manually.
But, please help me a little bit: What is the best (i.e. empiric) way to adopt the limits according to the "failcnt" value? It seems that just adding this value to the soft/hardlimit isn't enough...
What I do: I have written a small awk-script which monitors the sum of the failcnt-column in /proc/user_beancounters and if this value is >= 0 (i.e. some hosts have insufficient resources) send the output via cron.
I have a VE with the following content:
privvmpages 68769 90280 67536 71632 97
(and PRIVVMPAGES="87536:91632" in the config).
This means that this value is just ~100 too low; what to I do? vzctl set 201 --privvmpages 87536:91632 --save and restarting the VE. As you can see, I add 10000 (!) although only 97 are needed. But some time after restarting: same result. I adjusted the limit a few times now but failcnt becomes always nonzero for this specific limit after some time. So, what I am doing wrong?
There are other values in other VEs where I have the same problem, e.g.:
kmemsize 5122700 11059046 11055923 11377049 1434
And, one other thing. If I stop a VE, the entries in /proc/user_beancounters are not removed (only after some time). Why? This is especially problematic when I want to correct the limits, do "vzctl 201 restart" and check if the problems have gone.
I hope you can follow me
Regards,
divB
|
|
|
|
Re: Disabling all limits [message #35654 is a reply to message #35648] |
Fri, 10 April 2009 09:57 |
divB
Messages: 79 Registered: April 2009
|
Member |
|
|
maratrus wrote on Fri, 10 April 2009 02:50 | Hi,
Quote: |
What I do: I have written a small awk-script which monitors the sum of the failcnt-column in /proc/user_beancounters and if this value is >= 0
|
This approach is not correct. You should monitor if faicnt are increasing not if they are just >0.
Quote: |
... and restarting the VE.
|
after you've adjusted ubc-parameter you don't have to restart VE.
|
I think we have a misunderstanding here. In my case, the goal is to find out how much ressources are needed by my servers. So I just want to do a short "learning phase" (i.e. 1 week) and observe the "failcnt" field. If it is > 0 then my VE need more ressources. I adjust the parameters, restart and hope that the VEs work now normal.
There are at least two use cases for OpenVZ:
1.) Maybe the most popular: vServer hosting. In this case it's good to strictly apply ressource barriers.
2.) Virtualize private servers. This is my case. In normal conditions there should not be any malicous software; it's better to be sure that all my own services run reliably. So in this case I want each VE to give as much ressources as they need.
Quote: |
This means that this value is just ~100 too low; what to I do?
vzctl set 201 --privvmpages 87536:91632 --save
and restarting the VE. As you can see, I add 10000 (!) although only 97 are needed. But some time after restarting: same result. I adjusted the limit a few times now but failcnt becomes always nonzero for this specific limit after some time. So, what I am doing wrong?
|
Sorry, I didn't catch you at all. What are 100 and 10000? What kind of parameters do you measure?
[/quote]
This is my key question: What to do if the ressources are too low? Just adding the "failcnt" value? Adding 10? Adding 100? Multiplying with 2? Multiplying with 5?
For example, I have privvmpages 57536:71632. Then, after some time failcnt=100. Adjusting to $((57536+100)):$((71632+100)) seems not to help, so I did $((57536+10000)):$((71632+10000)) = 67536:61632.
I hope you can follow me now. The key question is: How to change the limit values for a given "failcnt" in order to ensure reliable VEs?
Thank you. I will wait the 5 minutes after rebooting the VE As said, I just want to do this in my "learning phase".
divB
|
|
|
|
Re: Disabling all limits [message #35660 is a reply to message #35622] |
Fri, 10 April 2009 15:33 |
divB
Messages: 79 Registered: April 2009
|
Member |
|
|
Hi again,
And thank you for this hint, I think I will do that.
The "desaster" happened the first time today: The VE with the vital LDAP server had (obviously) too few ressources causing the slapd to be killed. And all other services including logins were unavailable.
But this brings me back to the original question: How to turn them off completely? I guess I could just take the values of VE0; is this a good idea?
|
|
|