The workload manager recalculates load scores every 15 seconds, using the load scores (and the resulting statistics) to compare the relative workloads for all instances in the cluster. The workload manager uses the statistics to populate the monitoring tables. The statistics are per-instance: the workload manager does not track per-SPID statistics
Use workload_metric to update the value of the user metric for an instance, which is used to calculate the total load score of an instance. You can include workload_metric in a user-defined stored procedure, trigger, or an externally triggered script. The instances recalculate the load score every 15 seconds.
When calculating a load score, Adaptive Server considers five system-defined metrics and, optionally, one user-supplied metric.
User connections – the capacity of an instance to accept a new connection, based on resource availability.
CPU utilization – the capacity of an instance to accept additional work.
Run-queue length – the number of runnable tasks on a system. Run-queue length measures the processing backlog, and is a good indicator of relative response time.
I/O load – outstanding asynchronous I/Os.
Engine deficit – the difference in the number of online engines among instances in the cluster.
Engine deficit is measurable only when instances in
the cluster have unequal numbers of engines. In this scenario, engine
deficit adds a metric for maximum relative capacity to the load
score.
User metric – an optional metric specific to the user’s environment. Use workload_metric to supply its value. See “Creating a user metric.”
The load score is calculated with this forumula:
ConnectionsWeight x (ConnectionsLoad)/100 + CPUWeight x (CPULoad)/100 + RunQueueWeight x (RunQueueLoad)/100 + UserDefinedWeight x (UserDefinedLoad)/100 + EngineWeight x (EngineLoad)/100 + IOWeight x (IOLoad)/100 --------------------------------------------------------------- = Load score