-
Notifications
You must be signed in to change notification settings - Fork 848
Add http2.default_buffer_water_mark config to tune latency #8747
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
Add http2.default_buffer_water_mark config to tune latency #8747
Conversation
658841b to
17c1396
Compare
|
[approve ci fedora] |
|
@randall I dont think its stuck, just had another fedora failure. It looks like autest is running though so let that one finish first and then can retry just fedora |
|
@keesspoelstra is going to review this. Thanks in advance! |
797c9d3 to
67bdb2d
Compare
|
I will take a look at this PR too. |
| payload_length = 0; | ||
| } | ||
|
|
||
| if (payload_length > 0 && this->session->is_write_high_water()) { |
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.
You are not going to send data to the client unless there is 32k to send?
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.
If you're wondering about the timing of the this->session->flush(), it is called with several conditions.
- e.g. if the response body is 10 bytes, it'll be sent to the client immediately.
This is checking the high watermark of the session buffer to stop it keep growing.
67bdb2d to
0b0a988
Compare
0b0a988 to
5e6e160
Compare
Co-authored-by: Masaori Koshiba <masaori@apache.org> (cherry picked from commit 0f2d941)
* asf/9.2.x: Updated ChangeLog Add http2.default_buffer_water_mark config to tune latency (apache#8747) Updated ChangeLog Updated ChangeLog Revert remap.config loading changes (apache#8803)
When I ported #8747 into HTTP/2 to origin logic, I missed setting the watermark on outgoing connections. This essentially made it so that regardless of configuration, POST requests or the like would always send every little bit of DATA frames regardless of the configured watermark. The watermark was effectively zero on the server side. This patch fixes that by appying the configured watermark. This patch also fixes the HTTP/2 write_time_threshold configuration so it consistently wakes up ATS to transmit the frames held up behidn write_buffer_threshold. If the write_buffer_threshold is not met, then I noticed ATS never woke up to send the accumulated frames until a xmit with a flush was sent at the end of the transaction. This ensures that the frames are transmitted per the write_time_threshold by scheduling an event for the retransmission. Here's a list of changes made in this patch: * Adding a write_threshold test * Set buffer watermark for origin h2 connections * HTTP2_SESSION_EVENT_XMIT -> HTTP2_SESSION_EVENT_PRIO * schedule flushing event for write_time_threshold
When I ported #8747 into HTTP/2 to origin logic, I missed setting the watermark on outgoing connections. This essentially made it so that regardless of configuration, POST requests or the like would always send every little bit of DATA frames regardless of the configured watermark. The watermark was effectively zero on the server side. This patch fixes that by appying the configured watermark. This patch also fixes the HTTP/2 write_time_threshold configuration so it consistently wakes up ATS to transmit the frames held up behidn write_buffer_threshold. If the write_buffer_threshold is not met, then I noticed ATS never woke up to send the accumulated frames until a xmit with a flush was sent at the end of the transaction. This ensures that the frames are transmitted per the write_time_threshold by scheduling an event for the retransmission. Here's a list of changes made in this patch: * Adding a write_threshold test * Set buffer watermark for origin h2 connections * HTTP2_SESSION_EVENT_XMIT -> HTTP2_SESSION_EVENT_PRIO * schedule flushing event for write_time_threshold (cherry picked from commit 66940f5)
No description provided.