UnixServerAdmin

Server Administration & Management

Virtuozzo Guide: Parameters Explained

Primary Parameters

1. numproc = max ‘number of processes’ and kernel level threads allowed for a VE
It is the total number of processes that can be run on a server, i.e httpd, ftp, mail spawn a process to handle each client and limiting number of processes define how many clients the application will be able to handle in parallel. However number of processes does not limit how heavy the application may be. But increasing this value to more than about 16000 processes start to cause poor responsiveness of the system, worsening when the number grows. Total number of processes exceeding 32000 is very likely to cause hang of the system. With typical processes, it is normal to be able to run only up to 8000 processes in a system. The number of sockets needs to be controlled because each socket needs certain amount of memory for receive and transmit buffers. Barrier of this parameter should be set equal to the limit.

2. numtcpsock = max ‘number of TCP sockets’
This parameter limits the number of TCP connections and, thus, the number of clients the server application can handle in parallel. If each VE has its own set of IP addresses, there are no direct limits on the total number of TCP sockets in the system.Barrier of this parameter should be set equal to the limit.

3. numothersock = max ‘number of sockets other than TCP’
Local sockets (sockets used for communication inside the system), UDP sockets (DNS queries). The number of sockets needs to be controlled because each socket needs certain amount of memory for receive and transmit buffers. Barrier of this parameter should be set equal to the limit.

4. vmguarpages = ‘virtual memory guaranteed pages’
This parameter controls how much memory is available to the VE. The more clients are served or the more “heavy” the application is, the more memory it needs The meaning of the limit for the vmguarpages parameter is unspecified and should be set to the maximal allowed value.If the current amount of allocated memory space does not exceed the guaranteed amount (the barrier of vmguarpages), memory allocations of VE applications always succeed. If the current amount of allocated memory space exceeds the guarantee but below the barrier of privvmpages, allocations may or may not succeed, depending on the total amount of available memory in the system.

=====================================================================

Secondary Parameters

1. kmemsize = ‘kernel memory size’
Size of unswappable kernel memory allocated for the internal kernel structures. This parameter is related to the number of processes, numproc.Kmemsize limits can’t be set arbitrarily high. It is important to have a certain safety gap between the barrier and the limit of the kmemsize parameter. Equal barrier and limit of the kmemsize parameter may lead to the situation where the kernel will need to kill Virtual Environment’ applications to keep the kmemsize usage under the limit.

2. tcpsndbuf = total size of ‘send buffers for TCP sockets’
The amount of kernel memory allocated for the data sent from an application to a TCP socket. tcpsndbuf parameter depends on number of TCP sockets, numtcpsock and should allow for some minimal amount of socket buffer memory for each socket.

3. tcprcvbuf = total size of ‘receive buffers for TCP’
The amount of kernel memory allocated for the data received from the remote side, but not read by the local application yet. Tcprcvbuf parameter depends on number of TCP sockets, numtcpsock and should allow for some minimal amount of socket buffer memory for each socket.

4. othersockbuf = total size of ‘buffers used by other sockets’
Othersockbuf parameter depends on number of non-TCP sockets,numothersock. Othersockbuf configuration should satisfy,othersockbuf_{lim} – othersockbuf_{bar} ge 2.5KB cdot numothersock.Increased limit for othersockbuf is necessary for high performance of communications through local sockets. However, similarly to tcpsndbuf, hitting othersockbuf affects the communication performance only and does not affect the functionality. The total amount of other sock buf consumable by all VE in the system plus the kmemsize and other socketbuffers is limited by the hardware resources of the system

5. dgramrcvbuf = total size of ‘receive buffers of UDP and other datagram protocol’
The total size of buffers used to temporary store the incoming packets of UDP and other datagram protocols. Dgramrcvbuf parameters depend on number of non-TCP sockets (numothersock). dgramrcvbuf limits usually don’t need to be high. Only if the VE needs to send and receive very large datagrams, the barriers for both othersockbuf and dgramrcvbuf parameters should be raised.

6. oomguarpages = ‘out of memory guarantee in pages’
Any VE process will not be killed even in case of heavy memory shortage if the current memory consumption (including both physical memory and swap) does not reach the oomguarpages barrier.oomguarpages parameter is related to vmguarpages. If applications start to consume more memory than the computer has, the system faces an out-of-memory condition. In this case the operating system will start to kill VE processes to free some memory and prevent the total death of the system. oomguarpages parameter accounts the total amount of memory and swap space used by the processes of a particular Virtual Environment.The barrier of the oomguarpages parameter is the out-of-memory guarantee.

=====================================================================

Auxiliary Parameters

1. privvmpages = ‘private virtual memory pages’
privvmpages parameter allows controlling the amount of memory allocated by applications. The memory that is always shared among different applications is not included in this resource parameter. The barrier and the limit of privvmpages parameter control the upper boundary of the total size of allocated memory. Note that this upper boundary doesn’t guarantee that the Virtual Environment will be able to allocate that much memory, neither does it guarantee that other Virtual Environments will be able to allocate their fair share of memory. The primary mechanism to control memory allocation is the vmguarpages guarantee. Privvmpages parameter accounts allocated (but, possibly, not used yet) memory. The accounted value is an estimation how much memory will be really consumed when the Virtual Environment’s applications start to use the allocated memory. Consumed memory is accounted into oomguarpages parameter.

2. lockedpages
The memory not allowed to be swapped out in pages. The size of these pages is also accounted into kmemsize. The barrier may be set equal to the limit or may allow some gap between the barrier and the limit, depending on the nature of applications using memory locking features.

3. shmpages = total size of ‘shared memory pages’
These pages are also accounted into privvmpages. The barrier should be set equal to the limit. The configuration of this parameter doesn’t affect security and stability of the whole system or isolation between Virtual Environments. Its configuration affects functionality and resource shortage reaction of applications in the given Virtual Environment only.

Advertisements

October 19, 2011 - Posted by | Virtualization, Virtuozzo | ,

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: