# UBC derived configuration examples

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
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

This table shows examples of configurations derived from the basic examples.

## Derived UBC configurations

Name A B 2A 0.5A+0.5B
Power 1GB/200 1GB/60 1GB/100 1GB/92
Helper values
total mem 4986KB 16000KB 9972KB 10493KB
total kmem 1536KB 3712KB 3072KB 2624KB
total umem 3450KB 12288KB 6900KB 7869KB
avnumproc 15 40 30 27
Primary parameters
numproc 40 65 80 52
numtcpsock 40 80 80 60
numothersock 40 80 80 60
Secondary parameters
kmemsize 851,968 2,359,296 1,703,936 1,605,632
tcpsndbuf 262,144 524,288 524,288 393,216
tcprcvbuf 262,144 524,288 524,288 393,216
othersockbuf 163,840 327,680 327,680 245,760
dgramrcvbuf 32,768 65,536 65,536 49,152
Auxiliary parameters
shmpages 512 1,024 1,024 768
privvmpages 3,450 9,216 6,900 6,333
numfile 512 1,280 1,024 896
dcachesize 196,608 524,288 393,216 360,448

## Explanation

The columns A and B are exactly the already considered examples A and B.

### 2A

The next column labelled “2A” was produced by multiplying all the numbers from example A by 2. This configuration is good for half the number of containers plan A was created for, that is, this new configuration is for 100 containers on a system with 1GB of RAM.

### 0.5A+0.5B

The next column “0.5A+0.5B” was produced by multiplying the numbers from example A by 0.5 and adding the numbers from example B multiplied by 0.5. The resulting confguration is a mean confguration between A and B, being computed as (A + B)/2. It is good for

${\displaystyle {\frac {1}{0.5/200+0.5/60}}\approx 92}$

containers on a system with 1GB of RAM.

## Other configurations

A lot of other configurations can be produced the same way, by multiplying by a constant (and summing, if necessary) the values from existing configurations.

Configurations produced by multiplying existing configurations by a number greater than 1 will be consistent if the original configurations were consistent. Configurations produced by multiplying by a number less than 1 may or may not be consistent. See Intermediate UBC configurations for more details about producing new configurations basing on the existing ones.

Caution: do not subtract the values of one configuration from others.