OpenVZ Forum


Home » General » Support » Bug (?): vzcfgvalidate not working
Bug (?): vzcfgvalidate not working [message #37257] Sat, 29 August 2009 16:18 Go to next message
divB is currently offline  divB
Messages: 79
Registered: April 2009
Member
Hi,

I want to validate the configuration of my VEs and apply all recommended changes. But this does not seem to work (almost with all my VEs):

# vzcfgvalidate -r /etc/vz/conf/400.conf
Warning: too large value for TCPSNDBUF=2720320:2150201408 was truncated
Warning: too large value for TCPRCVBUF=1720320:2149201408 was truncated
Warning: too large value for OTHERSOCKBUF=2147483647:2148405247 was truncated
Error: tcpsndbuf.lim-tcpsndbuf.bar should be > 2147481088 (currently, 2144763327)
set to 2720320:2150201408
Error: othersockbuf.lim-othersockbuf.bar should be > 921600 (currently, 0)
set to 2147483647:2148405247
Warning: tcprcvbuf.lim-tcprcvbuf.bar should be > 2147481088 (currently, 2145763327)
set to 1720320:2149201408
Warning: too large value for TCPSNDBUF=2720320:2150201408 was truncated
Warning: too large value for TCPRCVBUF=1720320:2149201408 was truncated
Warning: too large value for OTHERSOCKBUF=2147483647:2148405247 was truncated
Validation completed: success
# vzcfgvalidate -r /etc/vz/conf/400.conf
Warning: too large value for TCPSNDBUF=2720320:2150201408 was truncated
Warning: too large value for TCPRCVBUF=1720320:2149201408 was truncated
Warning: too large value for OTHERSOCKBUF=2147483647:2148405247 was truncated
Error: tcpsndbuf.lim-tcpsndbuf.bar should be > 2147481088 (currently, 2144763327)
set to 2720320:2150201408
Error: othersockbuf.lim-othersockbuf.bar should be > 921600 (currently, 0)
set to 2147483647:2148405247
Warning: tcprcvbuf.lim-tcprcvbuf.bar should be > 2147481088 (currently, 2145763327)
set to 1720320:2149201408
Warning: too large value for TCPSNDBUF=2720320:2150201408 was truncated
Warning: too large value for TCPRCVBUF=1720320:2149201408 was truncated
Warning: too large value for OTHERSOCKBUF=2147483647:2148405247 was truncated
Validation completed: success
#


As you can see, I the settings are not saved/repaired. I can call the command as often as I want, there are no changes.

Instead, I get error messages with the VE:

# vzctl enter 400
Warning: too large value for TCPSNDBUF=2720320:2150201408 was truncated
Warning: too large value for TCPRCVBUF=1720320:2149201408 was truncated
Warning: too large value for OTHERSOCKBUF=2147483647:2148405247 was truncated
entered into VE 400
VE400:/#


Am I missing something here or is this a bug?

Best regards,
divB


Re: Bug (?): vzcfgvalidate not working [message #37260 is a reply to message #37257] Sat, 29 August 2009 22:20 Go to previous messageGo to next message
curx
Messages: 739
Registered: February 2006
Location: Nürnberg, Germany
Senior Member

Hi Niki,

the max value of the ubc (=user beancounters) can set to max value depends on arch:

i386 max value : 2147483647 (unlimited)
X86_64 max value : 9223372036854775807 (unlimited)

-> change the max value (=limit) to the max value of your ct 400 settings via vzctl and please check the info about the user beancounters http://wiki.openvz.org/UBC_secondary_parameters

Btw why are the ubc set to the max limit, any failcounters hit ?

Bye,
Thorsten
Re: Bug (?): vzcfgvalidate not working [message #37271 is a reply to message #37260] Sun, 30 August 2009 11:30 Go to previous messageGo to next message
divB is currently offline  divB
Messages: 79
Registered: April 2009
Member
Hello,

Thank you for the reply!

Well, at first, I set the resources of my important and huge VEs to "unlimited". Then, I read the manual and there is a chapter about validating with "vzcfgvalidate":

Quote:
The system resource control parameters have complex interdependencies. Violation of these interdependencies can be catastrophic for the Virtual Private Server. In order to ensure that a Virtual Private Server does not break them, it is important to validate the VPS configuration file before creating VPSs on its basis.


So I tried the vzcfgvalidate tool and I saw that there were many "Error" and "Warning" messages with my VEs. So I used the "-r" switch to auto-repair my configs. But obviously there is a bug and this does not work. Sad And it broke my configs (see the error messages about truncated values).

Now I have broken configuration for my VEs and I think the only way to correct it is to forget about vzcfgvalidate and correct them on my own?!

However, setting the values manually is very hard and complex. For example, I have many failcnt's and just setting the limits to a higher value does not help in many situations.

What's really missing in my opinion is an automatic tool that sets the UBC values based on failcnt values and other information. I thought vzcfgvalidate would do this.

Is there any other tool known who helps in assigning the resources?

Regards,
divB

Re: Bug (?): vzcfgvalidate not working [message #37290 is a reply to message #37271] Mon, 31 August 2009 21:20 Go to previous messageGo to next message
divB is currently offline  divB
Messages: 79
Registered: April 2009
Member
Another question: Is there a tool which implements the formulas described in the Wiki?

My problem is: With OpenVZ I can configure a fine grained resource control but actually for the first it is enough to partitionate the server based on a very simple value: RAM. Is there a simple way to calculate all the other values just based on e.g.:

Total: 1GB RAM, 8 VServers:
* 2 heavily loaded (Apache, mySQL, MTA, IMAP Server, ...)
* 1 moderate loaded (nagios)
* 2 more moderate loaded
* 2 very basic

I made a few diagrams with Excel based on the "vmprivpages" values but actually I do not know apply these values to all VEs.

Regards,
divB
Re: Bug (?): vzcfgvalidate not working [message #37293 is a reply to message #37290] Tue, 01 September 2009 10:35 Go to previous message
divB is currently offline  divB
Messages: 79
Registered: April 2009
Member
And it's me again.

Yes, I think setting all the UBC values on ones own is too complex except for fine tuning/special purposes.

I found a manual for Virtuozzo called "Virtuozzo Management of System Resources". This original manual from SW states:

Quote:
The best and easiest way to configure resource management parameters for a new Virtual Environment is to produce the configuration at once, using commands operating with the configuration as a whole, rather than to set the parameters individually


The manual described to:


  1. Split the hardware resources with vzsplit
  2. Validate the config with vzcfgvalidate
  3. If there are more and less powerful VEs on a single node, use vzcfgscale to scale up or down the configs
  4. Apply them using vzctl --applyconfig
  5. Check usage with vzcalc on per-machine basis and vzmemcheck for the system as a whole


That sounds nicer to me. Unfortunately vzcfgscale is not included in OpenVZ. However, I used the following way to partitionate my resources:



  • I have 1 GB of RAM and 4 GB of swap and have 8 VEs
  • I use vzsplit -s "2 GB" -n 8 -f hn-by-10 to produce a config for 8 VEs. This way I have 2 GB of swap in spare.
  • Validate with vzcfgvalidate. No errors/warnings found
  • Apply to my VEs with vzctl --applyconfig


Now this is my memory map:
# vzmemcheck -v
Output values in %
veid        LowMem  LowMem     RAM MemSwap MemSwap   Alloc   Alloc   Alloc
              util  commit    util    util  commit    util  commit   limit
400           1.73   13.12   11.84    2.69    8.45    7.62    8.45   15.83
302           0.64   13.12    6.45    1.54    8.45    2.59    8.45   15.83
301           1.18   13.12    7.64    2.50    8.45    2.71    8.45   15.83
300           0.28   13.12    0.40    0.10    8.45    0.56    8.45   15.83
202           0.32   13.12    0.47    0.13    8.45    0.29    8.45   15.83
201           0.93   13.12    1.30    0.32    8.45    8.32    8.45   15.83
200           1.99   13.12    8.58    1.95    8.45    7.41    8.45   15.83
-------------------------------------------------------------------------
Summary:      7.06   91.87   36.69    9.23   59.14   29.49   59.14  110.83


So I guess I have much resources for spare in case I want to scale up one of the VEs. I this case I would try to manually scale down the less power-VEs and scale up the powerful ones using the forumula in http://wiki.openvz.org/Intermediate_UBC_configurations.

I think this is the way to go rather than setting all the parameters on ones own.

What is your opinion?

divB
Previous Topic: Question about vzdump restore
Next Topic: sock_sendpage() kernel vulnerability
Goto Forum:
  


Current Time: Sun Jul 14 10:13:01 GMT 2024

Total time taken to generate the page: 0.02276 seconds