-
Notifications
You must be signed in to change notification settings - Fork 540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert sync over async network handling to async #835
Open
msft-paddy14
wants to merge
66
commits into
main
Choose a base branch
from
users/padgupta/add_async_socket_processing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+93
−46
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit 1b3dca6.
badrishc
reviewed
Dec 4, 2024
badrishc
reviewed
Dec 4, 2024
badrishc
reviewed
Dec 4, 2024
badrishc
reviewed
Dec 5, 2024
badrishc
reviewed
Dec 5, 2024
2. Refactor continuewith to async/await pattern
badrishc
reviewed
Dec 5, 2024
badrishc
reviewed
Dec 20, 2024
badrishc
approved these changes
Dec 20, 2024
You can also increment the Version in version.props before merge so that we get a new release with this. |
…github.com/microsoft/garnet into users/padgupta/add_async_socket_processing
…github.com/microsoft/garnet into users/padgupta/add_async_socket_processing
badrishc
requested changes
Dec 21, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In RawStringOps etc. the BDN calls should be async ... await as you had it earlier. We still need that else the BDN will return before the operation completes.
badrishc
requested changes
Dec 21, 2024
badrishc
approved these changes
Dec 21, 2024
…/padgupta/add_async_socket_processing
…github.com/microsoft/garnet into users/padgupta/add_async_socket_processing
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently Garnet's network processing in TLS mode happens by blocking the thread that receives the packet and it waits for TLS processing to complete. This leads to threadpool exhaustion and is an anti-pattern in general. It limits scalability where cores are limited as threads will get blocked and .NET will create more threads (where limit is not set). This makes things worst as memory footprint increases (~8MB per stack) and thread contention increases. We also convert Task to ValueTask for paths where async operation is already completed in general
BDN results for Network test added
BenchmarkDotNet v0.14.0, Windows 11 (10.0.26100.2605) (Hyper-V)
AMD EPYC 7763, 1 CPU, 16 logical and 8 physical cores
.NET SDK 9.0.100
[Host] : .NET 8.0.11 (8.0.1124.51707), X64 RyuJIT AVX2
.NET 8 : .NET 8.0.11 (8.0.1124.51707), X64 RyuJIT AVX2
Job=.NET 8 EnvironmentVariables=DOTNET_TieredPGO=0 Runtime=.NET 8.0
Server=True
Without changes (Main)
With Changes (current PR)
Job=.NET 8 EnvironmentVariables=DOTNET_TieredPGO=0 Runtime=.NET 8.0
Server=True
Remaining BDN Results
AsyncBDNWithChanges.log
MainBranch.log