FX For Databases
TS or Time Share scheduling class is the default class for all user processes. Processes in this class will have their priority lowered as they consume more CPU time, and increased as they use less. The upside of this is that it tries to load balance across a system by not letting processes to continuously hog a CPU. The downside of this is the frequent ping-ponging of priorities and the time quantum for the user processes.
On Classic OLTP type Database systems most of the user processes are doing similar transactional work - they wait on a Client request, do a bit of Buffer Cache access (and maybe some disk access if they miss in the Buffer Cache ), a little bit of business logic, and back to the Client with the result.
They obviously give up the CPU when they need to do disk/network IO but the rest of the stuff is critical enough that we want them to complete as quickly as possible without having its time quantum expire.
With the frequent ping-ponging of priorities (and related change in their Time Quantum) in the Time Share Class and the very small Time Quantum at higher Priorities, we might end up with a lot of Performance being lost.
The Solution in the past has been to modify the Default TS Dispatch Table and give larger Time Quantum's at Higher Priority Levels and to make changes to reduce the amount of ping-ponging whether the processes go to sleep or have consumed their time quantum. The change to the TS Dispatch Table was made to keep some "required" set of processes at a Fixed Priority. This obviously required "root" privileges to modify the TS Dispatch Table.
The FX scheduling Class introduced in Solaris 9 attempts to solve this issue by incorporating a very simple Scheduling Class. Processes in the fixed priority class are scheduled according to the parameters in a simple fixed-priority dispatcher parameter table. The Parameter Table is pretty simple - just a Global Priority Level and its corresponding Time Quantum. Once a process is at a Priority Level it stays at that level at a fixed Time Quantum.
The Time Quantum value is only a default or starting value for processes at a particular level, as the time quantum of a fixed priority process can be changed by the user with the priocntl(1) command or the priocntl(2) system call. By default, non privileged processes are only allowed to be at Priority Level 0. Only privileged users can alter the priority level and Time Quanta of any process.
So, if we have an OLTP like system with a set of processes which we want to control by setting them at a Fixed Priority and a Fixed Quantum, we just use the priocntl(1) command.
$ priocntl -c FX -s <PID> <PID> <PID>
This will put all the <PID>'s above in the FX Scheduling Class at priority level 0 with the default Time Quantum.
It is also possible to put the entire database in a Solaris Pool, and then assign the pool to use the FX class.