prctl, rcapadm can modify a running zone. and the zonecfg defines the resource parameters of the zone when it boots.
So in order to make changes dynamically you will have to do the following:
1. Update the zonecfg.
2. Use the prctl, rcapadm commands to modify the zone while it is online. make sure that everything matches the changes you've made to the zonecfg.
Below are the detail steps to add the capped-memory to the running zone container.
zonecfg -z blah
zonecfg:blah; select capped-memory
zonecfg:blah:capped-memory> info
capped-memory:
physical: 1G
[swap: 2G]
[locked: 512M]
zonecfg:blah:capped-memory> set physical=2g
zonecfg:blah:capped-memory> set swap=3g
zonecfg:blah:capped-memory> info
capped-memory:
physical: 2G
[swap: 3G]
[locked: 512M]
zonecfg:blah:capped-memory> end
zonecfg:blah> exit
Modify the zones running settings:
blah:/
# rcapadm -z blah -m 2048m
blah:/
# sleep 60
blah:/
# rcapstat -z 1 1
blah:/
prctl -n zone.max-swap -v 3g -t privileged -r -e deny -i zone blah
Verify that the settings have taken effect
zlogin -C blah
Then run the top command
#top -c
Well its about that time, i hope you enjoyed and really got something out of this tutorial.
until next time i wish you nothing but happiness and success.
zonecfg -z blah
zonecfg:blah; select capped-memory
zonecfg:blah:capped-memory> info
capped-memory:
physical: 1G
[swap: 2G]
[locked: 512M]
zonecfg:blah:capped-memory> set physical=2g
zonecfg:blah:capped-memory> set swap=3g
zonecfg:blah:capped-memory> info
capped-memory:
physical: 2G
[swap: 3G]
[locked: 512M]
zonecfg:blah:capped-memory> end
zonecfg:blah> exit
Modify the zones running settings:
blah:/
# rcapadm -z blah -m 2048m
blah:/
# sleep 60
blah:/
# rcapstat -z 1 1
blah:/
prctl -n zone.max-swap -v 3g -t privileged -r -e deny -i zone blah
Verify that the settings have taken effect
zlogin -C blah
Then run the top command
#top -c
Well its about that time, i hope you enjoyed and really got something out of this tutorial.
until next time i wish you nothing but happiness and success.