Editing UBC consistency check

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 1: Line 1:
 
{{UBC toc}}
 
{{UBC toc}}
  
System resource control parameters have certain interdependencies. Constraints on the parameter settings are listed below. Indexes <code>bar</code> and <code>lim</code> in the formulae below mean the barrier and the limit of the parameters, respectively.
+
System resource control parameters have certain interdependencies. Constraints on the parameter settings are listed below. Indexes <code>bar and <code>lim</code> in the formulae below mean the barrier and the limit of the parameters, respectively.
  
Configuration of resource control parameters for a container
+
Configuration of resource control parameters for a Virtual Environment
is invalid if these constraints are not satisfied. '''The best way to ensure the
+
is invalid if these constraints are not satisfied. The best way to ensure the
validity of the configuration is to use the {{man|vzcfgvalidate|8}} utility.'''
+
validity of the configuration is to use [http://openvz.org/documentation/man/vzcfgvalidate.8 vzcfgvalidate(8)] utility.
  
 
All the interdependencies discussed below and their importance are summarized in [[UBC interdependencies table]].
 
All the interdependencies discussed below and their importance are summarized in [[UBC interdependencies table]].
  
 
The configured limits can be checked through
 
The configured limits can be checked through
* /[[proc/user_beancounters]] interface;
+
* <code>/proc/user beancounters</code> interface;
* [[BC proc entries|/proc/bc/]] interface;
+
* Virtual Environment configuration files in <code>/etc/vz/conf/</code> directory.
* {{Man|vzubc|8}} utility;
 
* container configuration files in <code>/etc/vz/conf/</code> directory;
 
  
  
Line 21: Line 19:
 
(<code>avnumproc</code> here stands for the expected average number of processes).
 
(<code>avnumproc</code> here stands for the expected average number of processes).
  
This constraint is important for applications to work reliably in the
+
This constraint is important for reliable work of applications in the
container.
+
Virtual Environment.
If it is not satisfied, applications will start to fail in the middle of
+
If it is not satisfied, applications will start to fail at the middle of
operations instead of failing while spawning more processes
+
operations instead of failing at the moment of spawning more processes,
and the application's ability to handle resource shortage will be very
+
and the application abilities to handle resource shortage will be very
 
limited.
 
limited.
  
Line 51: Line 49:
 
Selecting the left side equal to the right side in the inequalities
 
Selecting the left side equal to the right side in the inequalities
 
above ensures minimal performance of network communications.
 
above ensures minimal performance of network communications.
Increasing the left side will increase performance to a certain extent.
+
Increasing the left side will increase performance to certain extent.
  
== UDP socket buffers should be large enough if the system is not tight on memory ==
+
== UDP socket buffers should be big enough if the system is not tight on memory ==
 
<math>dgramrcvbuf_{bar} \ge 129KB</math>
 
<math>dgramrcvbuf_{bar} \ge 129KB</math>
  
Line 59: Line 57:
  
 
These constraints are desired, but not essential.
 
These constraints are desired, but not essential.
Large enough buffers for UDP sockets improve reliability of datagram delivery.
+
Big enough buffers for UDP sockets improve reliability of datagram delivery.
 
However, note that if the UDP traffic is so bursty that it needs larger
 
However, note that if the UDP traffic is so bursty that it needs larger
 
buffers, the datagrams will likely be lost not because of resource control
 
buffers, the datagrams will likely be lost not because of resource control
 
limits, but because of other memory and performance limitations.
 
limits, but because of other memory and performance limitations.
  
== Number of files limit should be adequate for the expected number of processes ==
+
== Number of file limit should be adequate for the expected number of processes ==
 
<math>numfile \ge avnumproc \cdot 32</math>
 
<math>numfile \ge avnumproc \cdot 32</math>
  
Note that each process after a <code>execve(2)</code> system call
+
Note that each process after <code>execve(2)</code> system call
 
requires a file for each loaded shared library.
 
requires a file for each loaded shared library.
A too low <code>numfile</code> limit will increase the chances of failures
+
Too low <code>numfile</code> limit will increase the chances of failures
during <code>execve(2)</code> calls with error messages that are not clear
+
during <code>execve(2)</code> call with diagnostics not clear
to the users.
+
for the users.
  
 
== The limit on the total size of <code>dentry</code> and <code>inode</code> structures locked in memory should be adequate for allowed number of files ==
 
== The limit on the total size of <code>dentry</code> and <code>inode</code> structures locked in memory should be adequate for allowed number of files ==
Line 77: Line 75:
 
<math>dcachesize_{bar} \ge numfile \cdot 384\ \rm(bytes)</math>
 
<math>dcachesize_{bar} \ge numfile \cdot 384\ \rm(bytes)</math>
  
A too low <code>dcachesize</code> limit will increase the chances of
+
Too low <code>dcachesize</code> limit will increase the chances of
file operation refusals resulting in unexpected application failures.  
+
file operation refusals not expected by applications.
  
 
== Barrier should be less or equal than limit ==
 
== Barrier should be less or equal than limit ==
Line 86: Line 84:
  
 
should be maintained for each parameter.
 
should be maintained for each parameter.
 
== Code ==
 
See [[User:Grin/openvz checker.pl]] for a contributed code to check the consistency.
 
  
 
[[Category:Troubleshooting]]
 
[[Category:Troubleshooting]]

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)

Templates used on this page: