开发者

What is the performance hit for using WCF Performance Counters (performanceCounters = "ALL")?

开发者 https://www.devze.com 2022-12-29 01:01 出处:网络
Does anyone have experience with using the WCF Performance Counters in a production system and running into any performance issues?I suspect if you are monitoring all Service, Endpoints, and Operation

Does anyone have experience with using the WCF Performance Counters in a production system and running into any performance issues? I suspect if you are monitoring all Service, Endpoints, and Operations and log all counters to a 开发者_如何学运维file, sampling every second, then this is the worst case scenario. From what I gather, the hit comes when you actually sample, not when the counters are turned on. Any real-life experience out there using them in production?


I can't answer for the WCF ones in detail, but Performance Counters in general work by writing values to some shared memory all the time. So WCF always writes values to a memory mapped file or a shared section in a dll.

When the perfmon application wants to display them, it loads the shared memory and reads from it. That's not a performance hit particularly.

The problem comes when you want to do something with that counter data, like write it to a file or update a graph. That's when the performance starts to be noticeable. This goes double if the reader is running across the network.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号