Skip to content

Tracking issue for threading work items #52701

Open

Description

@kouvel
  • Using less power when appropriate on machines with heterogenous cores
    • The thread pool parallelizes fairly quickly and likely causes cores to be unparked or for threads to be switched to a performance core. The goal is to experiment with a couple of ideas that may work and to measure the effects.
    • Identify a mobile device scenario to improve and measure the current performance and power
    • Experiment with using the online core count to limit concurrency while still being able to unpark cores if necessary for performance
    • Experiment with spin-waiting less and measure power usage
  • Further investigate the perf regressions from processing IO events at higher priority on Unixes. Tracking issue for some thread pool experiments (.NET 8) #77665
  • Hill climbing
    • Disable hill climbing by default for a few previews and gather feedback
    • Consider an alternative, to identify individual threads that appear to be stalled and responding more quickly similarly to cooperative blocking
  • The overhead of work stealing is high, especially in bursty scenarios or in cases where the thread count is high, when threads are all trying to determine that there is no work left. Reduce time in .NET Threadpool's WorkStealingQueue.TrySteal method and ThreadPoolWorkQueue.Dequeue methods.  #10752

Completed

Activity

  1. added this to the 6.0.0 milestone on May 13, 2021
  2. self-assigned this
    on May 13, 2021
  3. ghost added
    untriaged
    on May 13, 2021
  4. removed
    untriaged
    on May 13, 2021
  5. davidfowl commented on May 13, 2021

    @davidfowl
    Member

    @kouvel do you want to link some of the other work items.

  6. mangod9 commented on May 14, 2021

    @mangod9
    Member

    Thanks for listing these. Couple of questions:

    1. Are these in priority order?
    2. Would be good to determine which will make it into .net 6 preview 7 timeframe
    3. First and last items are basically the same?
  7. kouvel commented on May 14, 2021

    @kouvel
    ContributorAuthor

    Are these in priority order?

    These are not in any particular order, I believe they are all worth doing.

    Would be good to determine which will make it into .net 6 preview 7 timeframe

    Other than the checked item, "Increase rate of thread injection for blocking due to sync-over-async" and "Fix spin-waiting to not depend on values measured at startup" are the currently scheduled items.

    First and last items are basically the same?

    The last one is specific to sync-over-async and works a bit differently. There is some overlap between them.

  8. modified the milestones: 6.0.0, 7.0.0 on Jun 21, 2021
  9. modified the milestones: 7.0.0, 8.0.0 on Jul 19, 2022
  10. added
    tracking
    on Aug 12, 2022
  11. modified the milestones: 8.0.0, Future on Aug 12, 2022
  12. removed their assignment
    on Aug 12, 2022
  13. davidfowl commented on Aug 22, 2022

    @davidfowl
    Member

    This list is awesome. There are only 2 open work items. Great work all. We made lots of progress on the thread pool over the years.

  14. jeremysimmons commented on Feb 7, 2024

    @jeremysimmons

    I was interested in the event for ThreadPool mentioned in #11008, does this exist?
    I don't see an item tracking this
    https://learn.microsoft.com/en-us/dotnet/api/system.threading.threadpool?view=net-8.0 doesn't have any events listed.

  15. kouvel commented on Feb 8, 2024

    @kouvel
    ContributorAuthor

    I was interested in the event for ThreadPool mentioned in #11008, does this exist?

    This event indicates when starvation is detected (when Reason is Starvation): https://learn.microsoft.com/en-us/dotnet/fundamentals/diagnostics/runtime-thread-events#threadpoolworkerthreadadjustmentadjustment-event

  16. self-assigned this
    on Sep 4, 2025
  17. WeihanLi commented on Aug 27, 2026

    @WeihanLi
    Contributor

    Currently, we already have some threadpool metrics in the runtime metrics, could we also add metrics for thread starvation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-System.Threadingtracking

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions