We are using Red Gate's SQL Monitor to alert (every 5 minutes) when memory grants pending are greater than zero. Several times a day we are alerted on our Devel and Prod servers.
However, when querying the resource_semaphore wait type using sys.dm_os_wait_stats, it used to register non-zero amounts several months ago, but now is always equal to zero.
The Devel server is version 11.0.3128 standard on Windows 2008 R2 Standard 64-bit, and the Prod server is version 10.0.5500 on Windows 2008 Standard 64-bit.
We are storing wait stats for each server in a database, collected every half hour. The Prod resource semaphore was 569 early August 11, then after a reboot at 3:30 AM was equal to zero and is the same today. I have confirmed the current value using the following query.
SELECT * FROM sys.dm_os_wait_stats
WHERE wait_type = 'RESOURCE_SEMAPHORE';
Similarly, the Devel resource semaphore was 167 early October 23, then after a reboot at 7:03 AM was equal to zero and has not changed from zero since then. Again, I confirmed the current value using the above query.
The custom alert code for Red Gate SQL Monitor is:
SELECT COUNT(*) FROM sys.dm_exec_query_memory_grants;
Also, running a perfmon counter against SQL Server: Memory Manager: Memory Grants Pending for
several days yields a flat line equal to zero, with maximum value zero.
Looks to me like something in SQL Server's internal stats collection system has broken. Or possibly, I am misunderstanding that these three counters measure the same thing.
Thanks for your help.
The Devel server is version 11.0.3128 standard on Windows 2008 R2 Standard 64-bit, and the Prod server is version 10.0.5500 on Windows 2008 Standard 64-bit.
We are storing wait stats for each server in a database, collected every half hour. The Prod resource semaphore was 569 early August 11, then after a reboot at 3:30 AM was equal to zero and is the same today. I have confirmed the current value using the following query.
SELECT * FROM sys.dm_os_wait_stats
WHERE wait_type = 'RESOURCE_SEMAPHORE';
Similarly, the Devel resource semaphore was 167 early October 23, then after a reboot at 7:03 AM was equal to zero and has not changed from zero since then. Again, I confirmed the current value using the above query.
The custom alert code for Red Gate SQL Monitor is:
SELECT COUNT(*) FROM sys.dm_exec_query_memory_grants;
Also, running a perfmon counter against SQL Server: Memory Manager: Memory Grants Pending for
several days yields a flat line equal to zero, with maximum value zero.
Looks to me like something in SQL Server's internal stats collection system has broken. Or possibly, I am misunderstanding that these three counters measure the same thing.
Thanks for your help.