Solaris Fair Share Scheduling and Projects


Solaris FSS is a method of resource sharing and allocation based on the importance of a process. Specifically a SHARE is a portion of a CPUs resources. In the instance below I was asked to setup FSS and Projects so that two low priority test databases could run along side production databases without any risk of impact.

First off its work nothing that FSS is not always installed by default, you need to ensure that you have the package, SUNWfss.

pkginfo SUNWfss

You are looking for the response below

system      SUNWfss Fair Share Schedule system      SUNWfss Fair Share Schedule

 Ok, since I have several databases running on each box, I am going to make this easy on myself and create two NIS groups, one that the production database users will belong to and one that the non-production, or low priority databases will belong to. The two groups that I created are ora-high and ora-low. This should be self explanitory. Once created in NIS and given access to the box, the xext step is to add ourprojects.

The two examples below define projects by groups.

#projadd -c "Oracle high priority project" group.ora-high

#projadd -c "Oracle low priority project" group.ora-low


Now view your new projects.

#projects -l


Use the command below to see what projects a user id is part of.

#id -p <userid>

 Now that the projects are created, go ahead and change the system scheduling to use Solaris FSS. This change will require a reboot.

# ps -cafe

# dispadmin -d FSS

# priocntl -s -c FSS -i class TS

# priocntl -s -c FSS -i pid 1

# ps –café


* "ps -cafe" – shows all processes and there scheduler class. Time Sharing is the default class, btw

* "dispadmin -d FSS" – sets the default scheduling class to be used on reboot to FSS

* "priocntl -s -c FSS -i class TS" – changes all current process with TS class to FSS class

 * "priocntl -s -c FSS -i pid 1" – changes the /sbin/init process to FSS class


Now you need to set the CPU shares per project.

Note that the number of CPU shares always equates to 100. The actual number of shares is irrelevant, its the relationship between the shares that is important.


If we only have two sets of shares allocated ( 99 & 1 ) the percentage if one wanted to calculate it would be : 99 shares = 99 / (99+1) * 100 = 99% and 1 share = 1 / (99+1) * 100 = 1% .

Note that one of the commands below sets the cpu shares on the fly, and the other one adds the setting to the /etc/project file so that the setting is persistent across reboots.

# prctl -n project.cpu-shares -r -v 99 -i project  group.ora-high

# prctl -n project.cpu-shares -r -v 1 -i project group.ora-low

# projmod -sK “project.cpu-shares=(privileged,1,none)” group.ora-low

# projmod -sK “project.cpu-shares=(privileged,99,none)” group.ora-high


Just as a side note, prstat -J will show resources utilization by project


If there are any issues the backout process is simple.

First comment out the entries new entries from /etc/project.

# dispadmin -d TS

# priocntl -s -c TS -i class FSS

# priocntl -s -c TS -i pid 1


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s