Skip to content

Use the default pipe options for backpressure #21001

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

Merged
merged 4 commits into from
Apr 21, 2020

Conversation

davidfowl
Copy link
Member

@davidfowl davidfowl commented Apr 19, 2020

  • This controls memory so clients aren't easily overwhelmed. With the changes made to Pipe to no longer throw if the pause threshold is exceeded makes this work well.

Contributes to #17797

Here's the sample from #20654

Before:

image

After:

image

- This controls memory so clients aren't easily overwhelmed. With the changes made to Pipe to no longer throw if the pause threshold is exceeded makes this work well.

Contributes to #17797
@ghost ghost added the area-signalr Includes: SignalR clients and servers label Apr 19, 2020
- Remove PipeReaderFactory
- Implement cancellation in SSE
@davidfowl
Copy link
Member Author

/azp run aspnetcore-ci (Build Tests: Helix x64)

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@davidfowl
Copy link
Member Author

/azp run aspnetcore-ci Helix x64)

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@davidfowl
Copy link
Member Author

/azp run aspnetcore-ci Helix x64

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@davidfowl
Copy link
Member Author

/azp run aspnetcore-ci (Build Tests: Helix x64)

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@davidfowl
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@BrennanConroy
Copy link
Member

Are we not going to add the option in this PR?

@davidfowl
Copy link
Member Author

Are we not going to add the option in this PR?

I chose not to but I can. That's why I wrote contributes to vs fixes. The option isn't as important anymore because it's no longer a hard limit in pipes.

@BrennanConroy
Copy link
Member

Does this affect throughput significantly?

@davidfowl
Copy link
Member Author

Does this affect throughput significantly?

In this test it improves throughput since the GC is basically bringing the application to its knees. I haven't run any benchmarks though.

@davidfowl
Copy link
Member Author

Before

Counters:

CPU Usage (%):                 58
Working Set (MB):              75
GC Heap Size (MB):             13
Gen 0 GC (#/s):                36
Gen 1 GC (#/s):                4
Gen 2 GC (#/s):                0
Time in GC (%):                12
Gen 0 Size (B):                180,784
Gen 1 Size (B):                1,154,376
Gen 2 Size (B):                13,742,736
LOH Size (B):                  48,416
Allocation Rate (B/sec):       272,120,129
# of Assemblies Loaded:        66
Exceptions (#/s):              0
ThreadPool Threads Count:      43
Lock Contention (#/s):         959
ThreadPool Queue Length:       65
ThreadPool Items (#/s):        244,659

Benchmark:

Max RPS:                       593,436
Requests:                      8,918,162
Mean latency (ms):             9

After

Counters:

CPU Usage (%):                 63
Working Set (MB):              68
GC Heap Size (MB):             13
Gen 0 GC (#/s):                32
Gen 1 GC (#/s):                3
Gen 2 GC (#/s):                0
Time in GC (%):                10
Gen 0 Size (B):                274,304
Gen 1 Size (B):                1,048,648
Gen 2 Size (B):                12,286,616
LOH Size (B):                  48,416
Allocation Rate (B/sec):       239,139,013
# of Assemblies Loaded:        65
Exceptions (#/s):              0
ThreadPool Threads Count:      56
Lock Contention (#/s):         926
ThreadPool Queue Length:       79
ThreadPool Items (#/s):        290,194

Benchmark:

Max RPS:                       561,548
Requests:                      8,444,560
Mean latency (ms):             5

Slightly slower on our broadcast benchmark same on echo.

@davidfowl
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@davidfowl davidfowl merged commit f9a9788 into master Apr 21, 2020
@davidfowl davidfowl deleted the davidfowl/client-backpressure2 branch April 21, 2020 23:31
@BrennanConroy BrennanConroy added this to the 5.0.0-preview3 milestone Jul 31, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-signalr Includes: SignalR clients and servers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants