Monitor Caches in PerfMon
The local cache publishes performance statistics using Windows Performance Counters. NCache also publishes performance statistics of cache from client perspective. In this step, you will verify that the Stress test tool that you ran in previous step is making cache calls successfully.
Prerequisite
- For .NET, make sure the NCache Service (NCacheSvc) is started. If it is not, type the following command in PowerShell (run as admin):
Start-Service -Name NCacheSvc
View Cache Statistics
To view performance statistics of a running cache, type PerfMon in Windows search bar.
Performance Monitor appears in search result. Open Performance Monitor.
Click on Performance Monitor in Monitoring tool in left pane, Performance Monitor windows opens up in right pane.
Click on Add (+) button. This opens Add Counters pop up window.
By default, it shows Performance Counter categories on local system. If cache is running on a different computer, type computer name or IP prepended by “\\” for e.g., \\20.200.20.220 or \\TEST.
Scroll up in Performance Categories window to find 'NCache'. Select NCache.
Although NCache publishes a lot of statistics, you can select the following basic counters to monitor cache:
Additions/sec: Shows how many new cache items are being added per second.
Count: Shows how many items are present in the cache.
Expirations/sec: Shows how many cache items are being expired per second.
Fetches/sec: Shows how many cache items are being read by your application from the cache.
Request/sec: Number of requests received (meaning cache commands like add, get, insert, remove, etc.) from all clients to this cache server.
Updates/sec: Shows how many existing cache items are being updated per second.
Every cache publishes its statistics under its cache name. Select the cache you want to monitor and click Add button at the bottom.
Click OK.
Change graph type from Line to Report.
You can now verify that the stress test tool that you ran in previous step is making 100s of request per second to this cache.
See Also
Create a Cache
Simulate Cache Usage
Use NCache from .NET Application
Use NCache for ASP.NET Sessions