Skip to content

Conversation

@mgravell
Copy link
Collaborator

@mgravell mgravell commented Sep 1, 2021

Pain point in the last release was a spiral of death triggered (or at least: exacerbated) by the backlog processor

Copy link
Collaborator

@NickCraver NickCraver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good 👍

@mgravell
Copy link
Collaborator Author

mgravell commented Sep 2, 2021 via email

@NickCraver NickCraver changed the title use a dedicated thread, rather than the thread-pool, for the backlog processor Use a dedicated thread, rather than the thread-pool, for the backlog processor Sep 2, 2021
@NickCraver NickCraver merged commit 7e5c219 into main Sep 2, 2021
@NickCraver NickCraver deleted the backlog-thread branch September 2, 2021 12:42
NickCraver added a commit that referenced this pull request Jan 17, 2022
In #1854 we switched to a Thread here to prevent the pile-up case, however under concurrent load this incurs a 10-11% penalty given backlogs aren't all that uncommon (due to the lock contention case). In .NET 6.0+, let's use the thread pool growth semantics to handle the stall case and use the cheaper Task.Run() approach.
NickCraver added a commit that referenced this pull request Jan 18, 2022
In #1854 we switched to a `Thread` here to prevent the pile-up case, however under concurrent load this incurs a 10-11% penalty given backlogs aren't all that uncommon (due to the lock contention case). In .NET 6.0+, let's use the thread pool growth semantics to handle the stall case and use the cheaper `Task.Run()` approach.

Running the benchmarks from #1164 I was experimenting with on lock perf, I noticed a large perf sink in thread creation as a result of lock contention. For that benchmark as an example (high concurrent load) we're talking about a ~93 second -> ~84 second run reduction and similar wins in concurrent load tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants