Monitoring the default data cache performance

Because all pages are hashed in an in-memory storage cache, tasks requiring a small number of private buffers for storing intermediate pages, for example during sorting, use the default data cache. Use the buf_imdb_privatebuffer_grab monitor counter to determine if Adaptive Server is temporarily using the default data cache for sort buffers:

buf_imdb_privatebuffer_grab  buffer_0           244              510525 

This script collects monitor counters from all monitoring groups. It first clears all the monitor counters, samples the monitor counters for one minute, and reports values for all monitor counters updates for that monitoring interval.

To determine the current value for buf_imdb_privatebuffer_grab, run:

dbcc monitor ('clear','all','on')
go
dbcc monitor ('sample','all','on')
go
waitfor delay "00:01:00"
go
dbcc monitor ('sample','all','off')
go
dbcc monitor ('select','all','on')
go
select * from master.dbo.sysmonitors 
where field_name = 'buf_imdb_privatebuffer_grab' 
go

The value for buf_imdb_privatebuffer_grab indicates the default data cache’s buffer usage from queries that require temporary buffers for intermediate sorting that are run against tables in an in-memory database. Evaluate the value for buf_imdb_privatebuffer_grab according to the size of the default data cache:

See Chapter 2, “Monitoring Performance with sp_sysmon,” in Performance and Tuning Series: Monitoring Adaptive Server with sp_sysmon.