Top.Mail.Ru
? ?

Previous Entry | Next Entry

news from the VSwap front

I have added vswap confguration samples to vzctl git. Basically, you set physpages and swappages and leave every other beancounter at unlimited. For example, this is how ve-vswap-256m-conf.sample looks like:

# UBC parameters (in form of barrier:limit)
PHYSPAGES="0:256M"
SWAPPAGES="0:512M"
KMEMSIZE="unlimited"
LOCKEDPAGES="unlimited"
PRIVVMPAGES="unlimited"
SHMPAGES="unlimited"
NUMPROC="unlimited"
VMGUARPAGES="unlimited"
OOMGUARPAGES="unlimited"
NUMTCPSOCK="unlimited"
NUMFLOCK="unlimited"
NUMPTY="unlimited"
NUMSIGINFO="unlimited"
TCPSNDBUF="unlimited"
TCPRCVBUF="unlimited"
OTHERSOCKBUF="unlimited"
DGRAMRCVBUF="unlimited"
NUMOTHERSOCK="unlimited"
DCACHESIZE="unlimited"
NUMFILE="unlimited"
NUMIPTENT="unlimited"

# Disk quota parameters (in form of softlimit:hardlimit)
DISKSPACE="1G"
DISKINODES="200000"
QUOTATIME="0"

# CPU fair scheduler parameter
CPUUNITS="1000"

As you can see, physpages (ie RAM size) is set to 256 megabytes, while swappages (ie swap size) is set to 512 megabytes, all the other beancounters are unlimited. Wow, it's never been easier to configure your containers!

Now, we can utilize this stuff using RHEL6 based kernel. This is what we see from inside the container:

[root@localhost ~]# vzctl enter 103
entered into CT 103
[root@localhost /]# free
             total       used       free     shared    buffers     cached
Mem:        262144      23936     238208          0          0      10968
-/+ buffers/cache:      12968     249176
Swap:       524288          0     524288

[root@localhost /]# cat /proc/user_beancounters 
Version: 2.5
       uid  resource                     held              maxheld              barrier                limit              failcnt
      103:  kmemsize                  4722976              4853726  9223372036854775807  9223372036854775807                    0
            lockedpages                     0                    0  9223372036854775807  9223372036854775807                    0
            privvmpages                  4296                13875  9223372036854775807  9223372036854775807                    0
            shmpages                       31                   31  9223372036854775807  9223372036854775807                    0
            dummy                           0                    0                    0                    0                    0
            numproc                        33                   33  9223372036854775807  9223372036854775807                    0
            physpages                    5984                 5985                    0                65536                    0
            vmguarpages                     0                    0  9223372036854775807  9223372036854775807                    0
            oomguarpages                 2696                 2696  9223372036854775807  9223372036854775807                    0
            numtcpsock                      4                    4  9223372036854775807  9223372036854775807                    0
            numflock                        5                    6  9223372036854775807  9223372036854775807                    0
            numpty                          1                    1  9223372036854775807  9223372036854775807                    0
            numsiginfo                     12                   18  9223372036854775807  9223372036854775807                    0
            tcpsndbuf                   69760                    0  9223372036854775807  9223372036854775807                    0
            tcprcvbuf                   65536                    0  9223372036854775807  9223372036854775807                    0
            othersockbuf                 2312                10768  9223372036854775807  9223372036854775807                    0
            dgramrcvbuf                     0                    0  9223372036854775807  9223372036854775807                    0
            numothersock                   51                   53  9223372036854775807  9223372036854775807                    0
            dcachesize                1172451              1172451  9223372036854775807  9223372036854775807                    0
            numfile                       370                  390  9223372036854775807  9223372036854775807                    0
            dummy                           0                    0                    0                    0                    0
            dummy                           0                    0                    0                    0                    0
            dummy                           0                    0                    0                    0                    0
            numiptent                      14                   14  9223372036854775807  9223372036854775807                    0


[root@localhost /]# cat /proc/meminfo 
MemTotal:         262144 kB
MemFree:          238208 kB
Cached:            10968 kB
Active:            16956 kB
Inactive:           1384 kB
Active(anon):       6352 kB
Inactive(anon):     1020 kB
Active(file):      10604 kB
Inactive(file):      364 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:        524288 kB
SwapFree:         524288 kB
Dirty:                 0 kB
AnonPages:          7364 kB
Mapped:             3416 kB
Shmem:               124 kB
Slab:               4012 kB
SReclaimable:       1088 kB
SUnreclaim:         2924 kB

Comments

k001
Feb. 11th, 2011 01:28 pm (UTC)
Re: didnt work here
This report doesn't make much sense w/o specifying kernel and vzctl version you have used. More to say, livejournal is not the best place for filing bugs — please use bugzilla.openvz.org
(Anonymous)
Feb. 11th, 2011 01:35 pm (UTC)
Re: didnt work here
will do so, sorry - however, i've shown the versions :)
k001
Feb. 11th, 2011 01:40 pm (UTC)
Re: didnt work here
> however, i've shown the versions :)

Well, not really...

> The used Kernel is 2.6.32 (with openvz patches applied)

For 2.6.32, we have two branches -- rhel6 and 2.6.32. vswap is only supported by rhel6.

For each branch, we have versions; for example, latest rhel6 is 042test007.1.
(Anonymous)
Feb. 11th, 2011 09:34 pm (UTC)
Re: didnt work here
k, sorry, i used the wrong branch - Works fine, good work!

Latest Month

July 2016
S M T W T F S
     12
3456789
10111213141516
17181920212223
24252627282930
31      

Page Summary

Comments

Powered by LiveJournal.com
Designed by Tiffany Chow