Welcome! Log In Create A New Profile

Advanced

[PATCH 1 of 4] QUIC: optimized ACK delay

Roman Arutyunyan
July 27, 2023 08:44AM
# HG changeset patch
# User Roman Arutyunyan <arut@nginx.com>
# Date 1690461437 -14400
# Thu Jul 27 16:37:17 2023 +0400
# Node ID 2fd16fc76920ef0b8ea2fa64858934e38c4477c5
# Parent 904c99bede1770d92566b56939c5b6ec85f05b55
QUIC: optimized ACK delay.

Previously ACK was not generated if max_ack_delay was not yet expired and the
number of unacknowledged ack-eliciting packets was less than two, as allowed by
RFC 9000 13.2.1-13.2.2. However this only makes sense to avoid sending ACK-only
packets, as explained by the RFC:

On the other hand, reducing the frequency of packets that carry only
acknowledgments reduces packet transmission and processing cost at both
endpoints.

Now ACK is delayed only if output frame queue is empty. Otherwise ACK is sent
immediately, which significantly improves QUIC performance with certain tests.

diff --git a/src/event/quic/ngx_event_quic_ack.c b/src/event/quic/ngx_event_quic_ack.c
--- a/src/event/quic/ngx_event_quic_ack.c
+++ b/src/event/quic/ngx_event_quic_ack.c
@@ -1171,7 +1171,8 @@ ngx_quic_generate_ack(ngx_connection_t *
delay = ngx_current_msec - ctx->ack_delay_start;
qc = ngx_quic_get_connection(c);

- if (ctx->send_ack < NGX_QUIC_MAX_ACK_GAP
+ if (ngx_queue_empty(&ctx->frames)
+ && ctx->send_ack < NGX_QUIC_MAX_ACK_GAP
&& delay < qc->tp.max_ack_delay)
{
if (!qc->push.timer_set && !qc->closing) {
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH 0 of 4] QUIC performance optimizations

Roman Arutyunyan 394 July 27, 2023 08:44AM

[PATCH 1 of 4] QUIC: optimized ACK delay

Roman Arutyunyan 174 July 27, 2023 08:44AM

Re: [PATCH 1 of 4] QUIC: optimized ACK delay

Sergey Kandaurov 92 August 10, 2023 11:50AM

[PATCH 2 of 4] QUIC: always add ACK frame to the queue head

Roman Arutyunyan 134 July 27, 2023 08:44AM

Re: [PATCH 2 of 4] QUIC: always add ACK frame to the queue head

Sergey Kandaurov 119 August 10, 2023 12:04PM

Re: [PATCH 2 of 4] QUIC: always add ACK frame to the queue head

Vladimir Homutov via nginx-devel 114 August 10, 2023 12:28PM

Re: [PATCH 2 of 4] QUIC: always add ACK frame to the queue head

Sergey Kandaurov 146 August 10, 2023 12:38PM

[PATCH 3 of 4] QUIC: fixed congesion control in GSO mode

Roman Arutyunyan 134 July 27, 2023 08:44AM

Re: [PATCH 3 of 4] QUIC: fixed congesion control in GSO mode

Sergey Kandaurov 105 August 10, 2023 12:22PM

[PATCH 4 of 4] QUIC: use sendmmsg() with GSO

Roman Arutyunyan 124 July 27, 2023 08:44AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 149
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready