Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ConcurrentRequestQueue - Reduced SpinCount to 15, before monitor wait - #5344

#5344
Merged
snakefoot merged 1 commit into
NLog:devNLog/NLog:devfrom
snakefoot:ConcurrentRequestQueue-SpinCountsnakefoot/NLog:ConcurrentRequestQueue-SpinCountCopy head branch name to clipboard
Sep 9, 2023
Merged

ConcurrentRequestQueue - Reduced SpinCount to 15, before monitor wait#5344
snakefoot merged 1 commit into
NLog:devNLog/NLog:devfrom
snakefoot:ConcurrentRequestQueue-SpinCountsnakefoot/NLog:ConcurrentRequestQueue-SpinCountCopy head branch name to clipboard

Conversation

@snakefoot

@snakefoot snakefoot commented Sep 9, 2023

Copy link
Copy Markdown
Contributor

Double performance in synthetic benchmarks, when using OverflowAction=Block

Maybe the reason is that the DotNet Task Dispatcher is very good at giving high priority to dedicated threads running at full speed, thus delaying the handling of timer-events. There was actually a bug in dotnet 6.0.000 where the DotNet Task Dispatcher would never schedule timer-events as long other thread-task was pending. This was improved a little with Dotnet ver. 6.0.400, but timer-events still seem to have lower priority.

This means that if having 2 thread spinning hard, then it will delay the scheduling of the background timer-event, thus their spinning will actually introduce an unwanted "pause". But when reducing the spinning, then it will also reduce the "pause"-effect. Seems the SpinCount upgrades to Sleep(1) after 20 iteration, which makes the "pause" even harder.

It is strange that timer-event are not scheduled when actually having more physical cores (4) than active threads (2). So maybe I'm experiencing something else.

@snakefoot
snakefoot enabled auto-merge (squash) September 9, 2023 14:26
@sonarqubecloud

sonarqubecloud Bot commented Sep 9, 2023

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@snakefoot
snakefoot merged commit eeb3f32 into NLog:dev Sep 9, 2023
@snakefoot snakefoot added this to the 5.2.5 milestone Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.