Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6862007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:36:27+00:00 2026-05-27T02:36:27+00:00

Today I profiled one of my C# applications using the Visual Studio 2010 Performance

  • 0

Today I profiled one of my C# applications using the Visual Studio 2010 Performance Analyzer. Specifically, I was profiling for “Concurrency” because it seemed as though my app should have more capacity then it was demonstrating. The analysis report showed that the threads were spending ~70-80% of their time in a Synchronization state.

To be honest, I’m not sure what this means. Does this mean that the application is suffering from a live-lock condition?

For context… there are ~30+ long-running threads bound to a single AppDomain (if that matters) and some of the threads are very busy (Ex. while(true) { _waitEvent.WaitOne(0); //do stuff }).

I realize this is a fairly vague question… I guess I’m looking for some elucidation on the meaning the Synchronization state of threads. How much is too much, and why? Is ~75% really bad? Do I have too many threads? or should I just start looking in other areas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:36:28+00:00Added an answer on May 27, 2026 at 2:36 am

    I’m not sure what this means.

    It means that the threads were on average spending 75% of their time waiting for another thread to finish some work.

    Does this mean that the application is suffering from a live-lock condition?

    Maybe!

    To clarify for readers unfamiliar with the term: a ‘deadlock’ is when two threads are both waiting for each other to finish, and therefore they wait forever. A ‘live lock’ is a situation where two threads are trying to avoid a deadlock, but due to their poor choices, spend most of their time waiting anyway. Imagine for example a table with two people, a fork and a knife. Both people wish to pick up both utensils, use them, and then put them down. Suppose I pick up the knife and you pick up the fork. If we both decide to wait for the other to put the utensil down, we are deadlocked. If we both realize that we’re about to deadlock, and I put down the knife, and you put down the fork and then I pick up the fork and you pick up the knife, we are live-locked. We can repeat this process indefinitely; we’re both working to resolve the situation, but we’re not communicating effectively enough to actually resolve it quickly.

    However, my guess is that you’re not in a live-lock situation. My guess is rather that you simply have enormous contention on a small number of critical resources that can only be accessed by one thread at a time. Occam’s Razor would indicate that you should assume the simple hypothesis — lots of threads taking turns using a scarce resource — rather than the complicated hypothesis — a whole bunch of threads all trying to tell each other “no, you go first”.

    There are ~30+ long-running threads bound to a single AppDomain (if that matters) and some of the threads are very busy (Ex. while(true) { _waitEvent.WaitOne(0); //do stuff }).

    Sounds awful.

    I realize this is a fairly vague question.

    Yes, it is.

    How much is too much, and why?

    Well, suppose you were trying to drive across town, and you and every other driver in the city spent 75% of your time stopped at traffic lights waiting for other drivers. You tell me: is that too much, and why? Spending an hour in traffic to drive for 15 minutes distance might be perfectly acceptable to some people and utterly unacceptable to other people. Every time I take SR 520 at rush hour I spend an hour in traffic to move a distance that should take 15 minutes; that wasn’t acceptable to me so now I take the bus.

    Whether this lousy performance is acceptable to you and your customers or not is your call. Fixing performance problems is expensive. The question you should be asking is how much profit you’ll gain by taking on the expense of diagnosing and fixing the problem.

    Is ~75% really bad?

    Your threads are taking four times longer than they need to. Doesn’t seem too good to me.

    Do I have too many threads?

    You almost certainly do, yes. 30 is a lot.

    But that is completely the wrong technical question to ask in your situation. Asking “do I have too many threads?” is like trying to fix traffic congestion by asking “does this city have too many cars?” The right question to ask is “why are there so many traffic lights in this city where there could be freeways?” The problem isn’t the threads; the problem is that they are waiting on each other instead of driving on through to their destinations without stopping.

    should I just start looking in other areas?

    How on earth should we know?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two publish profiles defined for my project in Visual Studio 2010: one
Today, I ran into this weird problem with a user using Mac OS X.
Started using thinking sphinx today and I'd like to know what's going wrong here:
OK. I was going a little crazy today with a WPF project. I'm using
I'm using Kohana v3 for a web project, and today I found myself writing
We created an application profile using our company's Facebook account. Today, I've just finished
I am trying the google performance tool for CPU time profiling. However, I had
I arrived at work to today to discover one of our SQL 2005 servers
Today I was listening to the Hanselminutes show about .NET 3.5 SP1...What's inside ,
Today I was working on a tab navigation for a webpage. I tried the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.