Scheduled controls are active for the duration of a defined schedule. For example, if a schedule starts at 8 p.m. and stops after 5 p.m., then the associated controls will be in effect during those times and only those times. Governor supports up to 255 schedules per resource group, providing enough flexibility to properly control resource consumption.
All date, day, and time criteria are inclusive. For example, if the stop after time is 5 p.m., then the schedule will be active at 17:00:01, 17:00:02, through 17:00:59. The schedule will not be ignored until after 17:00:59.
As an administrator, you must define a value for each control. For each control, you can set online values separately from batch values. Again, this should provide enough flexibility to properly control both online resource consumption and batch resource consumption.
If a cancel limit is exceeded, then the HPO/Governor module cancels the current QMF command. If a prompt limit is exceeded (and the corresponding cancel limit is not exceeded), then a dialog begins with the user. This dialog explains which resource limit has been exceeded and asks the user for a response to one of these questions:
Notice that there is no batch prompt limit because it is not possible to invoke a dialog with the user in batch mode.
Governor can control the amount of CPU time consumed for each distinct command. When a user issues a command, Governor begins to monitor CPU consumption. If a QMF command completes before the defined limits are exceeded, Governor resets its internal counters back to zero and waits for the next command to be issued.
Governor can control the number of rows fetched from the database for each distinct command. When a user issues a command, Governor begins to quantify fetched rows. If a QMF command completes before the defined limits are exceeded, Governor resets its internal counters back to zero and waits for the next command to be issued.
However, a command such as RUN can be followed by a series of related commands (such as, DOWN). When related commands are detected, these internal counters will not be reset to zero. Instead these related commands are treated as extensions of the primary command.
To understand how Governor behaves, consider a scenario in which a user issues a RUN QUERY command. Assume that you want to limit the number of fetched rows to 1000. When the RUN command is issued, QMF fetches rows from the database until it is ready to display the first screen of data. Once the screen is displayed to the user the RUN command ends. When the user presses PF8 to view the next panel of data, a new command is issued, namely the DOWN command. As the user repeatedly presses PF8 and proceeds down the table, QMF will access more and more rows from the database.
Governor limits the number of fetched rows from the beginning of the primary command (RUN) until the end of the last related command (DOWN). That is, when related commands are detected, internal counters tracking the number of fetched rows will not be reset to zero. Using the scenario above, the limit of 1000 will not be reached until the sum of rows fetched from the RUN command and subsequent DOWN commands exceeds 1000.
You can define up to 255 schedules per resource group. The first schedule in which the date, day, and time definition match the current date, day, and time will become the active schedule. Schedules are checked in numerical order. That is, schedule 1 is checked first, schedule 2 is checked second, and so on (schedule 255 is checked last). The priority of checking to determine which set of controls is active is defined below:
All ranges are inclusive, so that if the Start Date is 20990101, then the schedule would become active after midnight on 20981231. The order of checking is Date followed by Day Of The Week followed by Time Of Day. Therefore, if the Day does not coincide with the Date, the schedule will never be in effect.
If Start and Stop Times wrap around midnight (for example, 5 p.m. through 8 a.m.), this creates, in effect, two separate blocks of time each day that the schedule becomes active. Consider the following schedule as an example:
Start Date: | 20990111 (January 11, 2099) |
Stop Date: | 20990131 (January 31, 2099) |
Start Day: | 2 (Monday) |
Stop Day: | 6 (Friday) |
Start Time: | 1700 (5 p.m.) |
Stop Time: | 0800 (8 a.m.) |
This schedule is active January 11, 2099 through January 31, 2099 only on weekdays (Mondays through Fridays). For each day that this schedule is active, it is in effect for the hours 5 p.m. to midnight, and midnight to 8 a.m. For example, this schedule is active each Monday morning from midnight to 8 a.m., as well as each Monday evening from 5 p.m. to midnight.
These are the scheduled controls in a resource group: