Add SocketTransportOption to enable/disable WaitForData#19396
Conversation
adamsitnik
left a comment
There was a problem hiding this comment.
LGTM.
I confirm that making this optional can improve throughput and latency. Moreover, it's mandatory to make batching with Linux AIO work (it does not support 0 bytes reads)
Co-Authored-By: Adam Sitnik <adam.sitnik@gmail.com>
Tratcher
left a comment
There was a problem hiding this comment.
The ref assemblies need updating.
https://github.com/dotnet/aspnetcore/blob/master/docs/ReferenceAssemblies.md
What are the actual benchmark numbers?
| public int IOQueueCount { get; set; } = Math.Min(Environment.ProcessorCount, 16); | ||
|
|
||
| /// <summary> | ||
| /// Wait until there is data available to allocate a buffer. Set this to true to reduce memory used for idle connections. |
There was a problem hiding this comment.
Setting this to false can increase throughput at the cost of increased memory usage.
Can we run a benchmark using the Citrine infrastructure? Should I make a change to some files to make the benchmark run with |
|
/azp run pr-benchmark |
|
No pipelines are associated with this pull request. |
|
FYI, this will need API review (should be quick and easy though) as it adds a new public API. |
|
I set the default to |
|
Benchmark results using Citrine: JSON WaitForData enabled: --jobs "..\Benchmarks\benchmarks.json.json" --scenario "Json"WaitForData disabled: --jobs "..\Benchmarks\benchmarks.json.json" --scenario "Json"For Plaintext there is no visible difference - both settings give me 86XYk RPS |
|
Did you set --self-contained on both runs, or use a custom build on each run to ensure that self-contained is implicitly set? If not then the displayed versions are misleading as the sdk's shared runtimes would prevail. |
|
@sebastienros For the disabled case, I've compiled this dll locally and sent it using |
|
In the case you don't provide any argument then you need to use |
|
@sebastienros @halter73 where can we set |
I guess it is in https://github.com/aspnet/Benchmarks once this change has rippled through. |
|
Normally our API reviews are on Monday, but it got canceled this week. I'll try to get it through next Monday. Sorry for the delay. |
|
Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:
|
|
If the goal is only for benchmarking, you can do a local build that would use an ENV, or hard code the switch, and share the lib to use it instead. |
|
This got approved via email, so no need to wait 😄 Thanks! |
|
As follow up to this call |
This allows to opt-out of the zero-byte read that is performed to reduce memory usage for idle connections.
This read has a measurable impact on TE JSON benchmark.
cc @halter73 @davidfowl @sebastienros @adamsitnik