Editing User Guide/Managing Resources

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 572: Line 572:
 
=== Validating Container Configuration ===
 
=== Validating Container Configuration ===
 
The system resource control parameters have complex interdependencies. Violation of these interdependencies can be catastrophic for the Container. In order to ensure that a Container does not break them, it is important to validate the CT configuration file before creating CTs on its basis.
 
The system resource control parameters have complex interdependencies. Violation of these interdependencies can be catastrophic for the Container. In order to ensure that a Container does not break them, it is important to validate the CT configuration file before creating CTs on its basis.
 
+
The typical validation scenario is shown below:
Here is how to validate a CT configuration:
 
  
 
  # '''vzcfgvalidate /etc/vz/conf/101.conf'''
 
  # '''vzcfgvalidate /etc/vz/conf/101.conf'''
Line 579: Line 578:
 
  Recommendation: dgramrcvbuf.bar should be > 132096 (currently, 65536)
 
  Recommendation: dgramrcvbuf.bar should be > 132096 (currently, 65536)
 
  Recommendation: othersockbuf.bar should be > 132096 (currently, 122880)
 
  Recommendation: othersockbuf.bar should be > 132096 (currently, 122880)
 +
# '''vzctl set 101 --kmemsize 2211840:2359296 --save'''
 +
Saved parameters for CT 101
 +
# '''vzcfgvalidate  /etc/vz/conf/101.conf'''
 +
Recommendation: kmemsize.lim-kmemsize.bar should be > 163840 (currently, 147456)
 +
Recommendation: dgramrcvbuf.bar should be > 132096 (currently, 65536)
 +
Recommendation: othersockbuf.bar should ba > 132096 (currently, 122880)
 +
Validation completed: success
  
 
The utility checks constraints on the resource management parameters and displays all the constraint violations found. There can be three levels of violation severity:
 
The utility checks constraints on the resource management parameters and displays all the constraint violations found. There can be three levels of violation severity:
Line 592: Line 598:
 
|}
 
|}
  
==== Manual adjustment ====
+
In the scenario above, the first run of the vzcfgvalidate utility found a critical error for the kmemsize parameter value. After setting reasonable values for kmemsize, the resulting configuration produced only recommendations, and the Container can be safely run with this configuration.
 
 
To fix errors or warnings reported by <code>vzcfgvalidate</code>, adjust the parameters accordingly and re-run the <code>vzcfgvalidate</code>.
 
 
 
# '''vzctl set 101 --kmemsize 2211840:2359296 --save'''
 
Saved parameters for CT 101
 
# '''vzcfgvalidate  /etc/vz/conf/101.conf'''
 
Recommendation: dgramrcvbuf.bar should be > 132096 (currently, 65536)
 
Recommendation: othersockbuf.bar should ba > 132096 (currently, 122880)t
 
Validation completed: success
 
 
 
In the scenario above, the first run of the <code>vzcfgvalidate</code> utility found a critical error for the <code>kmemsize</code> parameter value. After setting reasonable values for <code>kmemsize</code>, the resulting configuration produced only recommendations, and the Container can be safely run with this configuration.
 
 
 
==== Automatic adjustment ====
 
 
 
FIXME: vzcfgvalidate -r|-i
 
  
 
=== Applying New Configuration Sample to Container ===
 
=== Applying New Configuration Sample to Container ===

Please note that all contributions to OpenVZ Virtuozzo Containers Wiki may be edited, altered, or removed by other contributors. If you don't want your writing to be edited mercilessly, then don't submit it here.
If you are going to add external links to an article, read the External links policy first!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)