Difference between revisions of "UBC secondary parameters"

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search
(created (needs more work))
 
(formatting fixes)
Line 1: Line 1:
 
{{UBC toc}}
 
{{UBC toc}}
  
Secondary (dependant) UBC parameters are directly connected
+
'''Secondary (dependant) UBC parameters''' are directly connected
 
to the [[UBC primary parameters|primary ones]] and can't be configured arbitrarily.
 
to the [[UBC primary parameters|primary ones]] and can't be configured arbitrarily.
  
Line 19: Line 19:
 
It is important to have a certain safety gap between the <code>barrier</code> and
 
It is important to have a certain safety gap between the <code>barrier</code> and
 
the <code>limit</code> of the <code>kmemsize</code> parameter
 
the <code>limit</code> of the <code>kmemsize</code> parameter
(for example, 10%, as in [[UBC examples]]).  Equal <code>barrier</code> and <pre>limit</pre> of
+
(for example, 10%, as in [[UBC examples]]).  Equal <code>barrier</code> and <code>limit</code> of
 
the <code>kmemsize</code> parameter may lead to the situation where the kernel will
 
the <code>kmemsize</code> parameter may lead to the situation where the kernel will
 
need to kill Virtual Environment's applications to keep the <code>kmemsize</code>
 
need to kill Virtual Environment's applications to keep the <code>kmemsize</code>
Line 38: Line 38:
 
socket buffer memory for each socket, as discussed in [[UBC consistency check]]:
 
socket buffer memory for each socket, as discussed in [[UBC consistency check]]:
  
<math>tcpsndbuf_{lim} - tcpsndbuf_{bar} \ge 2.5KB \cdot numtcpsock \rm.\cr}</math>
+
<math>tcpsndbuf_{lim} - tcpsndbuf_{bar} \ge 2.5KB \cdot numtcpsock \rm.</math>
  
 
If this restriction is not satisfied, some network connections
 
If this restriction is not satisfied, some network connections
Line 64: Line 64:
 
socket buffer memory for each socket, as discussed in [[UBC consistency check]]:
 
socket buffer memory for each socket, as discussed in [[UBC consistency check]]:
  
<math>
+
<math>tcprcvbuf_{lim} - tcprcvbuf_{bar} \ge 2.5KB \cdot numtcpsock \rm.</math>
tcprcvbuf_{lim} - tcprcvbuf_{bar} \ge 2.5KB \cdot numtcpsock \rm.\cr}
 
</math>
 
  
 
If this restriction is not satisfied, some network connections
 
If this restriction is not satisfied, some network connections
Line 87: Line 85:
 
in the system plus the <code>kmemsize</code> and other socket buffers is limited
 
in the system plus the <code>kmemsize</code> and other socket buffers is limited
 
by the hardware resources of the system.
 
by the hardware resources of the system.
This total limit is discussed in [UBC systemwide configuration#“Low memory”|“low memory”]].
+
This total limit is discussed in [[UBC systemwide configuration#“Low memory”|“low memory”]].

Revision as of 13:48, 22 August 2006

User Beancounters
Definition
/proc/user_beancounters
/proc/bc/
General information
Units of measurement
VSwap
Parameters description
Primary parameters
numproc, numtcpsock, numothersock, vmguarpages
Secondary parameters
kmemsize, tcpsndbuf, tcprcvbuf, othersockbuf, dgramrcvbuf, oomguarpages, privvmpages
Auxiliary parameters
lockedpages, shmpages, physpages, numfile, numflock, numpty, numsiginfo, dcachesize, numiptent, swappages
Internals
User pages accounting
RSS fractions accounting
On-demand accounting
UBC consistency
Consistency formulae
System-wide configuration
vzubc(8)
Configuration examples
Basic
Derived
Intermediate configurations
Tables
List of parameters
Parameter properties
Consistency
Config examples

Secondary (dependant) UBC parameters are directly connected to the primary ones and can't be configured arbitrarily.

kmemsize

Size of unswappable memory, allocated by the operating system kernel.

It includes all the kernel internal data structures associated with the Virtual Environment's processes, except the network buffers discussed below. These data structures reside in the first gigabyte of the computer's RAM, so called “low memory”.

This parameter is related to the number of processes (numproc). Each process consumes certain amount of kernel memory — 24 kilobytes at minimum, 30–60 KB typically. Very large processes may consume much more than that.

It is important to have a certain safety gap between the barrier and the limit of the kmemsize parameter (for example, 10%, as in UBC examples). Equal barrier and limit of the kmemsize parameter may lead to the situation where the kernel will need to kill Virtual Environment's applications to keep the kmemsize usage under the limit.

Kmemsize limits can't be set arbitrarily high. The total amount of kmemsize consumable by all Virtual Environments in the system plus the socket buffer space (see below) is limited by the hardware resources of the system. This total limit is discussed in “low memory”.

tcpsndbuf

The total size of buffers used to send data over TCP network connections. These socket buffers reside in “low memory”.

Tcpsndbuf parameter depends on number of TCP sockets (numtcpsock) and should allow for some minimal amount of socket buffer memory for each socket, as discussed in UBC consistency check:

If this restriction is not satisfied, some network connections may silently stall, being unable to transmit data.

Setting high values for tcpsndbuf parameter may, but doesn't necessarily, increase performance of network communications. Note that, unlike most other parameters, hitting tcpsndbuf limits and failed socket buffer allocations do not have strong negative effect on the applications, but just reduce performance of network communications.

Tcpsndbuf limits can't be set arbitrarily high. The total amount of tcpsndbuf consumable by all Virtual Environments in the system plus the kmemsize and other socket buffers is limited by the hardware resources of the system. This total limit is discussed in “low memory”.

tcprcvbuf

The total size of buffers used to temporary store the data coming from TCP network connections. These socket buffers also reside in “low memory”.

Tcprcvbuf parameter depends on number of TCP sockets (numtcpsock) and should allow for some minimal amount of socket buffer memory for each socket, as discussed in UBC consistency check:

If this restriction is not satisfied, some network connections may stall, being unable to receive data, and will be terminated after a couple of minutes.

Similarly to tcpsndbuf, setting high values for tcprcvbuf parameter may, but doesn't necessarily, increase performance of network communications. Hitting tcprcvbuf limits and failed socket buffer allocations do not have strong negative effect on the applications, but just reduce performance of network communications. However, staying above the barrier of tcprcvbuf parameter for a long time is less harmless than for tcpsndbuf. Long periods of exceeding the barrier may cause termination of some connections.

Tcprcvbuf limits can't be set arbitrarily high. The total amount of tcprcvbuf consumable by all Virtual Environments in the system plus the kmemsize and other socket buffers is limited by the hardware resources of the system. This total limit is discussed in “low memory”.