On Fri, Jan 12, 2024, 12:03 <izor...@gmail.com> wrote: > Добрый день, Илья. > > > Первый вариант патча оказывается не рабочий, забыл применить: > > gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror > -g -I src/core -I src/event -I src/event/modules -I src/event/quic -I > src/os/unix -I /nix/store/2ysp5ichpc$ > > -o objs/src/http/ngx_http_file_cache.o \ > > src/http/ngx_http_file_cache.c > > src/event/quic/ngx_event_quic_output.c: In function > 'ngx_quic_allow_segmentation': > > src/event/quic/ngx_event_quic_output.c:249:36: error: variable 'len' set > but not used [^[]8;; > https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-but-set-variable$ > > 249 | size_t bytes, len; > > | ^~~ > > > > Сработал такой патч: > > diff --git a/src/event/quic/ngx_event_quic_output.c > b/src/event/quic/ngx_event_quic_output.c > > index 914d81921..27efc1950 100644 > > --- a/src/event/quic/ngx_event_quic_output.c > > +++ b/src/event/quic/ngx_event_quic_output.c > > @@ -303,7 +303,7 @@ ngx_quic_allow_segmentation(ngx_connection_t *c) > > } > > } > > > > - return 0; > > + return 1; > > } > > > > Теперь используется sendmmsg() > > 1065 36.0% 36.0% 1065 36.0% _aesni_ctr32_ghash_6x > > 1018 34.4% 70.4% 1018 34.4% __sendmmsg > > 268 9.1% 79.4% 268 9.1% __libc_pread64 > > 175 5.9% 85.3% 175 5.9% __memmove_avx_unaligned_erms > > 58 2.0% 87.3% 58 2.0% epoll_wait > > 48 1.6% 88.9% 48 1.6% __memset_avx2_unaligned_erms > > 31 1.0% 90.0% 31 1.0% __recvmsg > > 15 0.5% 90.5% 120 4.1% ngx_quic_write_buffer > > 12 0.4% 90.9% 12 0.4% aesni_ctr32_encrypt_blocks > > 12 0.4% 91.3% 90 3.0% ngx_quic_create_frame > > 11 0.4% 91.7% 11 0.4% aesni_encrypt > > 8 0.3% 91.9% 24 0.8% EVP_CIPHER_CTX_ctrl > > 8 0.3% 92.2% 8 0.3% __strcmp_avx2 > > > > Но теперь скорость значительно упала, примерно с ~400 Мбайт/сек до ~250. > > >
Это ожидаемо, если накапливается 1 пакет, его дорого отправлять через sendmmsg. Собственно, смысл проверки был в том, чтобы проверить, действительно ли пакеты (в вашем случае) не успевают накапливаться Вроде в настройках сетевой карты gso включен: > > tx-gso-robust: off [fixed] > > tx-gso-partial: on > > tx-gso-list: off [fixed] > > > > > -- > С уважением, > Izorkin mailto:izor...@gmail.com > <izor...@gmail.com> > _______________________________________________ > nginx-ru mailing list > nginx-ru@nginx.org > https://mailman.nginx.org/mailman/listinfo/nginx-ru >
_______________________________________________ nginx-ru mailing list nginx-ru@nginx.org https://mailman.nginx.org/mailman/listinfo/nginx-ru