<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openvz.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Psykax</id>
	<title>OpenVZ Virtuozzo Containers Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openvz.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Psykax"/>
	<link rel="alternate" type="text/html" href="https://wiki.openvz.org/Special:Contributions/Psykax"/>
	<updated>2026-05-15T16:23:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=UBC_primary_parameters&amp;diff=2420</id>
		<title>UBC primary parameters</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=UBC_primary_parameters&amp;diff=2420"/>
		<updated>2006-10-25T03:11:33Z</updated>

		<summary type="html">&lt;p&gt;Psykax: Add mention of postfix to numothersock&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{UBC toc}}&lt;br /&gt;
&lt;br /&gt;
The most important parameters determining the resources available to&lt;br /&gt;
Virtual Environment are explained below. The meaning of the parameters&lt;br /&gt;
is illustrated assuming that the Virtual Environment runs some network&lt;br /&gt;
server applications.&lt;br /&gt;
&lt;br /&gt;
== numproc ==&lt;br /&gt;
Maximum number of processes and kernel-level threads allowed for this Virtual Environment.&lt;br /&gt;
&lt;br /&gt;
Many server applications (like Apache Web server, FTP and mail servers)&lt;br /&gt;
spawn a process to handle each client, so the limit on number of processes&lt;br /&gt;
defines how many clients the application will be able to handle in parallel.&lt;br /&gt;
However, the number of processes doesn't limit how “heavy” the application is&lt;br /&gt;
and whether the server will be able to serve heavy requests from clients.&lt;br /&gt;
&lt;br /&gt;
Configuring resource control system, it is important to estimate both&lt;br /&gt;
the maximum number of processes and the average number of processes&lt;br /&gt;
(referred to as avnumproc later). Other (dependent) resource&lt;br /&gt;
control parameters may depend both on the limit and the average number (see [[UBC consistency check]]).&lt;br /&gt;
&lt;br /&gt;
Barrier of numproc doesn't provide additional control and should be set equal to the limit.&lt;br /&gt;
&lt;br /&gt;
There is a restriction on the total number of processes in the system.&lt;br /&gt;
More than about 16000 processes start to cause poor responsiveness of&lt;br /&gt;
the system, worsening when the number grows. Total number of processes&lt;br /&gt;
exceeding 32000 is very likely to cause hang of the system.&lt;br /&gt;
&lt;br /&gt;
Note that in practice the number of processes is usually less. Each&lt;br /&gt;
process consumes some memory, and the available memory and the&lt;br /&gt;
&amp;quot;low memory&amp;quot; (see [[UBC systemwide configuration#“Low memory”|“Low memory”]]) limit the number of processes to lower&lt;br /&gt;
values. With typical processes, it is normal to be able to run only up&lt;br /&gt;
to 8000 processes in a system.&lt;br /&gt;
&lt;br /&gt;
== numtcpsock ==&lt;br /&gt;
Maximum number of TCP sockets.&lt;br /&gt;
&lt;br /&gt;
This parameter limits the&lt;br /&gt;
number of TCP connections and, thus, the number of clients the server&lt;br /&gt;
application can handle in parallel.&lt;br /&gt;
Barrier of this parameter should be set equal to the limit.&lt;br /&gt;
If each Virtual Environment has it's own set of IP addresses (which is&lt;br /&gt;
the only way a OpenVZ system can be configured), there are no direct&lt;br /&gt;
limits on the total number of TCP sockets in the system. The number&lt;br /&gt;
of sockes needs to be controlled because each socket needs certain&lt;br /&gt;
amount of memory for receive and transmit buffers (see descriptions&lt;br /&gt;
of [[&amp;lt;code&amp;gt;tcpsndbuf&amp;lt;/code&amp;gt;]] and [[&amp;lt;code&amp;gt;tcprcvbuf&amp;lt;/code&amp;gt;]]), and&lt;br /&gt;
the memory is a limited resource.&lt;br /&gt;
&lt;br /&gt;
== numothersock ==&lt;br /&gt;
Maximum number of non-TCP sockets (local sockets, UDP and other types of sockets).&lt;br /&gt;
&lt;br /&gt;
Local (UNIX-domain) sockets are used for communications inside the&lt;br /&gt;
system. Multi-tier applications (for example, a Web application with a&lt;br /&gt;
database server as a back-end) may need one or multiple local sockets&lt;br /&gt;
to serve each client. Straightforward applications (for example, most&lt;br /&gt;
mail servers, with the exception of Postfix) do not use local sockets.&lt;br /&gt;
&lt;br /&gt;
UDP sockets are used for Domain Name Service (DNS) queries, but&lt;br /&gt;
the number of such sockets opened simultaneously is low. UDP and&lt;br /&gt;
other sockets may also be used in some very special applications&lt;br /&gt;
(SNMP agents and others).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Barrier&amp;lt;/code&amp;gt; of this parameter should be set equal to the &amp;lt;code&amp;gt;limit&amp;lt;/code&amp;gt;.&lt;br /&gt;
The number of local sockets in a system is not limited. The number of&lt;br /&gt;
UDP sockets in a system, similarly to TCP sockets, is not limited in&lt;br /&gt;
OpenVZ systems.&lt;br /&gt;
&lt;br /&gt;
Similarly to &amp;lt;code&amp;gt;numtcpsock&amp;lt;/code&amp;gt; parameter discussed above, the number of&lt;br /&gt;
non-TCP sockets needs to be controlled because each socket needs certain&lt;br /&gt;
amount of memory for its buffers, and the memory is a limited&lt;br /&gt;
resource.&lt;br /&gt;
&lt;br /&gt;
== vmguarpages ==&lt;br /&gt;
Memory allocation guarantee.&lt;br /&gt;
&lt;br /&gt;
This parameter controls how much memory is available to the Virtual&lt;br /&gt;
Environment (i.e. how much memory its applications can allocate by&lt;br /&gt;
&amp;lt;code&amp;gt;malloc(3)&amp;lt;/code&amp;gt; or other standard Linux memory allocation mechanisms).&lt;br /&gt;
The more clients are served or the more “heavy” the application is, the&lt;br /&gt;
more memory it needs.&lt;br /&gt;
&lt;br /&gt;
The amount of memory that Virtual Environment's applications are&lt;br /&gt;
guaranteed to be able to allocate is specified as the barrier of&lt;br /&gt;
&amp;lt;code&amp;gt;vmguarpages&amp;lt;/code&amp;gt; parameter. The current amount of allocated memory space&lt;br /&gt;
is accounted into &amp;lt;code&amp;gt;privvmpages&amp;lt;/code&amp;gt; parameter, and &amp;lt;code&amp;gt;vmguarpages&amp;lt;/code&amp;gt;&lt;br /&gt;
parameter does not have its own accounting. The barrier and the limit of&lt;br /&gt;
&amp;lt;code&amp;gt;privvmpages&amp;lt;/code&amp;gt; parameter impose an upper limit on the memory allocations&lt;br /&gt;
(see [[privvmpages]]). The meaning of the &amp;lt;code&amp;gt;limit&amp;lt;/code&amp;gt; for the&lt;br /&gt;
&amp;lt;code&amp;gt;vmguarpages&amp;lt;/code&amp;gt; parameter is unspecified in the current version and should be set&lt;br /&gt;
to the maximal allowed value ([[MAX_ULONG]]).&lt;br /&gt;
&lt;br /&gt;
If the current amount of allocated memory space does not exceed the&lt;br /&gt;
guaranteed amount (the &amp;lt;code&amp;gt;barrier&amp;lt;/code&amp;gt; of &amp;lt;code&amp;gt;vmguarpages&amp;lt;/code&amp;gt;),&lt;br /&gt;
memory allocations of Virtual Environment's applications always succeed.&lt;br /&gt;
If the current amount of allocated memory space exceeds the guarantee but below&lt;br /&gt;
the &amp;lt;code&amp;gt;barrier&amp;lt;/code&amp;gt; of &amp;lt;code&amp;gt;privvmpages&amp;lt;/code&amp;gt;, allocations may or may not succeed,&lt;br /&gt;
depending on the total amount of available memory in the system.&lt;br /&gt;
&lt;br /&gt;
Starting from the &amp;lt;code&amp;gt;barrier&amp;lt;/code&amp;gt; of &amp;lt;code&amp;gt;privvmpages&amp;lt;/code&amp;gt;,&lt;br /&gt;
normal priority allocations and, starting from the &amp;lt;code&amp;gt;limit&amp;lt;/code&amp;gt;&lt;br /&gt;
of &amp;lt;code&amp;gt;privvmpages&amp;lt;/code&amp;gt;, all memory allocations&lt;br /&gt;
made by the applications fail.&lt;br /&gt;
The memory allocation guarantee (&amp;lt;code&amp;gt;vmguarpages&amp;lt;/code&amp;gt;) is a primary tool for&lt;br /&gt;
controlling the memory available to Virtual Environments, because&lt;br /&gt;
it allows administrators to provide Service Level Agreements — agreements&lt;br /&gt;
guaranteeing certain quality of service, certain amount of resources&lt;br /&gt;
and general availability of the service. The unit of measurement&lt;br /&gt;
of vmguarpages values is memory pages (4KB on x86 processors).&lt;br /&gt;
The total memory allocation guarantees given to Virtual Environments&lt;br /&gt;
are limited by the physical resources of the computer — the size of RAM&lt;br /&gt;
and the swap space — as discussed in [[UBC systemwide configuration]].&lt;/div&gt;</summary>
		<author><name>Psykax</name></author>
		
	</entry>
</feed>