1. Limit CPU usage of a Solaris Zone using dedicated-cpu
By default Solaris Zones share the CPUs with the global and all other local Zones.
Our sample Zone currently uses 16 virtual CPUs.
# zlogin v0131 psrinfo | wc -l 16
# zonecfg -z v0131 -r "add dedicated-cpu; set ncpus=4; end" zone 'v0131': Checking: Adding dedicated-cpu zone 'v0131': Applying the changes # zlogin v0131 psrinfo | wc -l 4
Make sure to run the command once again to make the configuration persistent for the next Zone reboot.
# zonecfg -z v0131 "add dedicated-cpu; set ncpus=4; end"
# zfs create v0131_data/myapp # zonecfg -z v0131 -r "add fs; set type=zfs; set dir=/myapp; set special=v0131_data/myapp; end" zone 'v0131': Checking: Mounting fs dir=/myapp zone 'v0131': Applying the changes # zlogin v0131 mount | grep myapp /myapp on /myapp read/write/setuid/devices/rstchown/nonbmand/exec/xattr/atime/zone=v0131/nozonemod/sharezone=4/dev=d50045 on Fri Jun 10 11:56:19 2016
# zonecfg -z v0131 "add fs; set type=zfs; set dir=/myapp; set special=v0131_data/myapp; end"