Information Technology Reference
In-Depth Information
any workload can use idle CPU cycles as long as each workload receives its guar-
anteed minimum resources. The FSS method does not force any process to wait
if a CPU is available, unlike the other methods of CPU control. Even so, a more
important workload may wait while a less important task finishes its time slice
on a CPU.
To use the FSS with Containers, first enable it for use across the Solaris in-
stance. As is often the case, one command is needed to tell Solaris to change a
specific setting the next time Solaris boots, and a different command is needed
to tell Solaris to begin changing its behavior now. The dispadmin (1M) command
shown here changes the default scheduler to be used the next time that Solaris
boots. The priocntl (1) command changes the default scheduler that Solaris is
using now for all existing processes.
GZ# dispadmin -d FSS
GZ# priocntl -s -c FSS -i all
Now that FSS is the default scheduler, you must assign sufficient shares to the
global zone to ensure that its processes get sufficient CPU time. Choose a value that
is of the same magnitude as the values used for the other Containers. Set a value
with zonecfg for the next time the system boots. Also, use prctl to set a value for
right now. The order of execution does not matter.
GZ# zonecfg -z global
zonecfg:web> set cpu-shares=100
zonecfg:web> exit
GZ# prctl -t privileged -n zone.cpu-shares -v 100 -i zone global
The next step is the allocation of 100 cpu-shares to a Container, using the
following command:
GZ# zonecfg -z web
zonecfg:web> set cpu-shares=100
zonecfg:web> exit
GZ# zoneadm -z web reboot
After the zone is rebooted, this value can be queried with the following command:
GZ# prctl -n zone.cpu-shares -t privileged -i zone web
zone: 6: web
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
zone.cpu-shares privileged 100 - none -
 
Search WWH ::




Custom Search