System Administration Guide: Virtualization Using the Solaris Operating System
Previous Next

Using the Fair Share Scheduler on a Solaris System With Zones Installed

Limits specified through the prctl command are not persistent. The limits are only in effect until the system is rebooted. To set shares in a zone permanently, see How to Configure the Zone and How to Set zone.cpu-shares in the Global Zone.

How to Set FSS Shares in the Global Zone Using the prctl Command

The global zone is given one share by default. You can use this procedure to change the default allocation. Note that you must reset shares allocated through the prctl command whenever you reboot the system.

You must be the global administrator in the global zone to perform this procedure.

  1. Become superuser, or assume the Primary Administrator role.

    To create the role and assign the role to a user, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Use the prctl utility to assign two shares to the global zone:
    # prctl -n zone.cpu-shares -v 2 -r -i zone global
  3. (Optional) To verify the number of shares assigned to the global zone, type:
    # prctl -n zone.cpu-shares -i zone global
See Also

For more information on the prctl utility, see the prctl(1) man page.

How to Change the zone.cpu-shares Value in a Zone Dynamically

You must be the global administrator in the global zone to perform this procedure.

  1. Become superuser, or assume the Primary Administrator role.

    To create the role and assign the role to a user, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration

  2. Use the prctl command to specify a new value for cpu-shares.
    # prctl -i idtype -n zone.cpu-shares -r -v value

    idtype is either the zonename or the zoneid. value is the new value.

Previous Next