Question: Why is Alert #27 - Connection CPU issued when the overall server CPU Time is lower than the Alert 27 threshold?
Here is an example of an Alert #27 (Connection CPU) that was displayed when the overall server CPU Time was only 7.2%:
May 13 1:51:54 PM Alert #27: The approximate CPU time has reached 25% of elapsed time or more for at least one connection during 10 or more recent samples.
Here's the explanation:
There were 4 CPUs in use, and Foxhound calculates the overall server CPU Time figure of 7.2%
as the fraction of the total CPU capacity available. If only 1 CPU had been used then (all
other things being equal) the overall server CPU Time would have been 4 * 7.2 = 28.8%.
The "approximate CPU time" referred to in Alert #27 is not the overall server CPU Time,
it is the CPU time spent at a connection level.
The Alert #27 threshold of 25% is calculated as a fraction of the clock-on-the-wall time,
not the total CPU capacity available. It is possible for this number to exceed 100% for
two reasons: measurement errors (that's why it is called "approximate"), and intra-query
parallelism (where SQL Anywhere uses two or more CPUs to process a single query).
It is not necessary for a single connection to exceed the Alert #27 threshold during 10
or more recent samples, it is only necessary for at least one connection to do so during
each of the samples. In other words, the heavy CPU usage may be alternating among two or