Linux Scroll

Just another WordPress.com site

Increase solaris zone memory capping

Check zone resources:

# /bin/prctl -n zone.max-swap `pgrep -z appzone init`
process: 10371: /sbin/init
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
zone.max-swap
        privileged      44.8GB      -   deny                                 -
        system          16.0EB    max   deny                                 -
# /bin/prctl -n zone.max-locked-memory `pgrep -z appzone init`
process: 10371: /sbin/init
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
zone.max-locked-memory
        system          16.0EB    max   deny                                 -

To use memory caps on a server or inside a zone, the rcapadm utility needs to be run with the ā€œ-Eā€ (enable memory caps) option to enable memory caps:

# rcapstat -z 1 1
rcapstat: rcapd is not active
# rcapadm
rcapadm: resource caps not configured
# rcapadm -E

Temporary increase zone.max-swap resource:

# /bin/prctl -n zone.max-swap -r -v 90G `pgrep -z appzone init`

Temporary increase zone.max-locked-memory resource:

# /bin/prctl -n zone.max-locked-memory -r -v 90G `pgrep -z appzone init`

Change the physical memory capping:

# rcapadm -z appzone -m 90G

Permanent setting:

# zonecfg -z appzone

    zonecfg:appzone> select capped-memory
    zonecfg:zone:capped-memory> set physical=90G
    zonecfg:zone:capped-memory> set swap=90G
    zonecfg:zone:capped-memory> set locked=90G
    zonecfg:zone:capped-memory> end
    zonecfg:zone:> commit

After zone reboot, the setting will make permanent.
Check zone setting:

# zonecfg -z appzone info

capped-memory:
        physical: 90G
        [swap: 90G]
        [locked: 90G]
Advertisements

Comments are closed.

%d bloggers like this: