These comments apply to Solaris 08/07 or later (or KU patch 120011-14 or later).
There is some info on capping memory for zones here: http://docs.sun.com/app/docs/doc/817-1592/gepte?a=view You can specify capped memory for each zone, and rcapd will be enabled automatically. There is no need to configure rcapd or projects within any zones. To set cpu shares for all zones, including the global: http://docs.sun.com/app/docs/doc/817-1592/gepvn?l=en&a=view&q=cpu-shares The cpu-share settings for all zones (including global) are applied when the zone boots. To update the shares on a running zone (including global): # prctl -n zone.cpu-shares -r -v <value> -i zone <zonename> All zones with cpu shares are automatically put into the fair share scheduler. The exception is the global zone. FSS must be configured system wide for the global zone. Example 1: Setting caps and shares for the first time, with zones already running: --------------- Update system's default scheduler (applied at boot) # dispadmin -d FSS Update scheduler on running zones. # priocntl -s -c FSS -i all Set the global zone boot-time shares: # zonecfg -z global set cpu-shares=50 Configure the running global zone shares: # prctl -n zone.cpu-shares -r -v 50 -i zone global For each non-global zone: Configure boot-time settings for the zone. # zonecfg -z zonename > set cpu-shares=10 > add capped-memory > set physical=200M > set swap=300M > end > add capped-cpu > set ncpus=1.5 > end > exit If the zone is running, configure it's running settings: # prctl -n zone.cpu-shares -r -v 10 -i zone zonename # prctl -n zone.cpu-cap -s -t priv -v 150 -t priv -i zone zonename # prctl -n zone.max-swap -s -t priv -v 300M -i zone zonename # rcapadm -z zonename -m 200M Enable rcap service: # svcadm enable rcap Example 2: Updating caps and shares on a system already configured with caps and shares from -------------- Example 1. Update the global zone boot-time shares: # zonecfg -z global set cpu-shares=100 Update running global zone shares: # prctl -n zone.cpu-shares -r -v 100 -i zone global For each non-global zone: Update it's boot time settings: # zonecfg -z zonename > set cpu-shares=20 > add capped-memory > set physical=400M > set swap=600M > end > add capped-cpu > set ncpus=2.5 > end > exit If the zone is running, update it's running settings: # prctl -n zone.cpu-shares -r -v 20 -i zone zonename # prctl -n zone.cpu-cap -r -t priv -v 250 -t priv -i zone zonename # prctl -n zone.max-swap -r -t priv -v 600M -i zone zonename # rcapadm -z zonename -m 400M Notes: - The cpu cap value is multiplied by 100 for prctl in both examples. - prctl for caps uses "-s" in example 1, and "-r" in example 2. - cpu cap is not required. Just cpu-shares + capped-memory is certainly valid. - capped memory and cpu can be set on the global zone as well. Capping the global zone can impact system availability. Use with caution. -- This message posted from opensolaris.org _______________________________________________ zones-discuss mailing list firstname.lastname@example.org