You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: I am not currently a SQLWATCH user, but while doing research I found the query being used by SQLWATCH. Leaving this issue here by request of @marcingminski
I came across a bug regarding this commonly used query:
WHERE ring_buffer_type =N'RING_BUFFER_SCHEDULER_MONITOR'collate database_default
AND record LIKEN'%<SystemHealth>%'collate database_default
ORDER BY [timestamp] DESC
) AS x
) AS y
OPTION (keep plan);
(Also used in dbadash and other tools/scripts).
It seems there is an issue when running this query against non-hypervisor instances. The ProcessUtilization value does not appear to be 100-based and I have not yet determined what it actually is based on. Just working on theory at this point. The value starts at 0, like normal, but as SQL load increases, the value quickly surpasses where you would expect it to be.
For example, I have an instance with the following stats:
My theory is that it might be multiplied by the number of sections in process_physical_affinity, but that is a complete guess for now.
One solution I have considered is to just make the query "less bad". For example, if virtual_machine_type_desc is NONE then do not use ProcessUtilization, instead use 100-SystemIdle, as SystemIdledoes seem to reliably be 100-based. Unfortunately this lumps OS load into there, but that seems better than having nothing or something completely wrong.
The text was updated successfully, but these errors were encountered:
UPDATE: I guess I've got blinders on and I have been looking at this problem for too long. I don't think there is any need to look at process_physical_affinity. As it seems when virtual_machine_type_desc is NONE then the number of sections in process_physical_affinity is equal to the socket count.
Here from SQL Server Community Slack chat:
https://app.slack.com/client/T1LTZ0BQV/C1MS1RA4B
Note: I am not currently a SQLWATCH user, but while doing research I found the query being used by SQLWATCH. Leaving this issue here by request of @marcingminski
I came across a bug regarding this commonly used query:
sqlwatch/SqlWatch.Monitor/Project.SqlWatch.Database/dbo/Procedures/usp_sqlwatch_logger_performance.sql
Lines 62 to 79 in 1b3543c
(Also used in dbadash and other tools/scripts).
It seems there is an issue when running this query against non-hypervisor instances. The
ProcessUtilization
value does not appear to be 100-based and I have not yet determined what it actually is based on. Just working on theory at this point. The value starts at 0, like normal, but as SQL load increases, the value quickly surpasses where you would expect it to be.For example, I have an instance with the following stats:
When I run the linked query above, I get:
My theory is that it might be multiplied by the number of sections in
process_physical_affinity
, but that is a complete guess for now.One solution I have considered is to just make the query "less bad". For example, if
virtual_machine_type_desc
isNONE
then do not useProcessUtilization
, instead use100-SystemIdle
, asSystemIdle
does seem to reliably be 100-based. Unfortunately this lumps OS load into there, but that seems better than having nothing or something completely wrong.The text was updated successfully, but these errors were encountered: