[Users] Re: swap unlimited on the CT?

Benjamin Henrion bh at udev.org
Wed Sep 19 10:28:39 EDT 2012


On Thu, Sep 13, 2012 at 5:36 PM, Kir Kolyshkin <kir at openvz.org> wrote:
> On 13 September 2012 17:20, Benjamin Henrion <bh at udev.org> wrote:
>> On Thu, Sep 13, 2012 at 3:06 PM, Benjamin Henrion <bh at udev.org> wrote:
>>> Hi,
>>>
>>> I am struggling to setup a container with unlimited parameters,
>>> including the swap.
>>>
>>> I put in my config:
>>>
>>> PHYSPAGES="unlimited"
>>> SWAPPAGES="unlimited"
>>
>> Ok found the solution, apparently, commenting SWAPPAGES or removing it
>> from the config makes the CT to have access to the whole swap of the
>> HN.
>>
>> Which is different from setting it to "unlimited". Strange, but it works...
>
> Strange indeed. Can you please revert back to config when it was not
> working as expected, restart CT and then provide the following:
>
> - cat /etc/vz/conf/$CTID.conf
> - cat /proc/bc/$CTID/resources
> - uname -a
> - vzctl --version

Here it is with 16G hardcoded, I would like to have it floating so
that I do not have to template it for all the hosts:
=====================================
$ cat /etc/vz/conf/$CTID.conf
# UBC parameters (in form of barrier:limit)
# Primary parameters
AVNUMPROC="unlimited"
NUMPROC="unlimited"
NUMTCPSOCK="1801439850948198"
NUMOTHERSOCK="1801439850948198"
VMGUARPAGES="unlimited"
# Secondary parameters
KMEMSIZE="unlimited"
#TCPSNDBUF="2147483647:2147483647"
TCPSNDBUF="4611686018427387903:unlimited"
TCPRCVBUF="4611686018427387903:unlimited"
OTHERSOCKBUF="4611686018427387903:unlimited"
DGRAMRCVBUF="unlimited"
OOMGUARPAGES="unlimited"
# Auxiliary parameters
LOCKEDPAGES="unlimited"
SHMPAGES="unlimited"
PRIVVMPAGES="unlimited"
NUMFILE="unlimited"
NUMFLOCK="unlimited"
NUMPTY="unlimited"
NUMSIGINFO="unlimited"
DCACHESIZE="unlimited"

PHYSPAGES="0:unlimited"
NUMIPTENT="unlimited"
SWAPPAGES="16G"

# Disk quota parameters (in form of softlimit:hardlimit)
DISK_QUOTA="no"
IP_ADDRESS="192.168.20.101"
HOSTNAME="spear"
VE_ROOT="/vz/root/$VEID"
VE_PRIVATE="/vz/private/$VEID"
OSTEMPLATE="openvz-20120912145112-stage3-amd64-20120614"
ORIGIN_SAMPLE="unlimited"
ONBOOT="yes"
=====================================
* 14:25 root at hn-101 /etc/vz# vzctl --version
vzctl version 3.0.29.3
* 14:25 root at hn-101 /etc/vz# uname -a
Linux hn-101 2.6.32-openvz-061.2 #1 SMP Tue Sep 11 09:11:46 UTC 2012
x86_64 Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz GenuineIntel GNU/Linux
=====================================
* 14:26 root at hn-101 /etc/vz# cat /proc/bc/1011/resources
            kmemsize                141938497            153149440
9223372036854775807  9223372036854775807                    0
            lockedpages                     0                    0
9223372036854775807  9223372036854775807                    0
            privvmpages              21028812             21323185
9223372036854775807  9223372036854775807                    0
            shmpages                  5243528              5244184
9223372036854775807  9223372036854775807                    0
            numproc                        78                  156
9223372036854775807  9223372036854775807                    0
            physpages                   81651               106395
               0  9223372036854775807                    0
            vmguarpages                     0                    0
9223372036854775807  9223372036854775807                    0
            oomguarpages                19794                19794
9223372036854775807  9223372036854775807                    0
            numtcpsock                     69                   71
1801439850948198     1801439850948198                    0
            numflock                        1                   11
9223372036854775807  9223372036854775807                    0
            numpty                          1                    5
9223372036854775807  9223372036854775807                    0
            numsiginfo                      0                   90
9223372036854775807  9223372036854775807                    0
            tcpsndbuf                 1284152              1378024
4611686018427387903  9223372036854775807                    0
            tcprcvbuf                 1130496              1171984
4611686018427387903  9223372036854775807                    0
            othersockbuf               191896               225968
4611686018427387903  9223372036854775807                    0
            dgramrcvbuf                     0                33032
9223372036854775807  9223372036854775807                    0
            numothersock                  233                  256
1801439850948198     1801439850948198                    0
            dcachesize              114319192            121356647
9223372036854775807  9223372036854775807                    0
            numfile                       502                 1100
9223372036854775807  9223372036854775807                    0
            numiptent                      10                   10
9223372036854775807  9223372036854775807                    0
            swappages                       0                    0
         4194304              4194304                    0
=====================================

--
Benjamin Henrion <bhenrion at ffii.org>
FFII Brussels - +32-484-566109 - +32-2-3500762
"In July 2005, after several failed attempts to legalise software
patents in Europe, the patent establishment changed its strategy.
Instead of explicitly seeking to sanction the patentability of
software, they are now seeking to create a central European patent
court, which would establish and enforce patentability rules in their
favor, without any possibility of correction by competing courts or
democratically elected legislators."


More information about the Users mailing list