Debugging and diagnosing lock convoying problems in .NET

后端 未结 3 2071
滥情空心
滥情空心 2021-02-04 19:51

I am looking into performance issues of a large C#/.NET 3.5 system that exhibits performance degradation as the number of users making requests scales up to 40-50 distinct user

3条回答
  •  时光取名叫无心
    2021-02-04 20:23

    Lock convoys are hard to debug in general. Does your code path have sequential lock statements either directly or in branches?

    The Total # of Contentions performance counter gives a base estimate of contention in the app.

    Also break open a profiler and look. You can also write some perf counters to track down the slow parts of a code path. Also make sure that locks are only being held for as long as absolutely necessary.

    Also check out the Windows Performance Tools. I have found these to be extremely useful as you can track down lots of low level problems like abnormal amounts of context switching.

提交回复
热议问题