Revisit benchmarker for HTTP benchmarks

Abierto
#80 0 comentarios 5 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
node.js
Área
performance

Línea de trabajo

Comienza con benchmark/run.js y el benchmark http/simple.js; después, reproduce los resultados de Node.js 18 y 20 usando tanto test-double-http como autocannon. Investiga si un comportamiento diferente de keep-alive explica la discrepancia; se considera terminado cuando se haya identificado la limitación o el error del benchmarker y se hayan corregido en consecuencia los resultados o el método del benchmark.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

While analyzing the performance improvement of Node.js 20, I faced an unexpected behavior, see:

$ ./node18 benchmark/run.js --filter "simple.js" http

http/simple.js
http/simple.js duration=10 chunkedEnc=0 c=100 chunks=4 len=1024 type="bytes" benchmarker="test-double-http": 57,011
http/simple.js duration=10 chunkedEnc=0 c=100 chunks=4 len=1024 type="buffer" benchmarker="test-double-http": 54,078

$ ./node20 benchmark/run.js --filter "simple.js" http

http/simple.js
http/simple.js duration=10 chunkedEnc=0 c=100 chunks=4 len=1024 type="bytes" benchmarker="test-double-http": 127,857
http/simple.js duration=10 chunkedEnc=0 c=100 chunks=4 len=1024 type="buffer" benchmarker="test-double-http": 116,360

A noticeable performance improvement (from 57,011 to 127,857), but if you switch the benchmarker method, this performance drops:

$ npm i -g autocannon

added 48 packages in 5s

5 packages are looking for funding
  run `npm fund` for details
$ ./node18 benchmark/run.js --filter "simple.js" http

http/simple.js
http/simple.js duration=10 chunkedEnc=0 c=100 chunks=4 len=1024 type="bytes" benchmarker="autocannon": 42,648.73
http/simple.js duration=10 chunkedEnc=0 c=100 chunks=4 len=1024 type="buffer" benchmarker="autocannon": 43,250.91
$ ./node20 benchmark/run.js --filter "simple.js" http

http/simple.js
http/simple.js duration=10 chunkedEnc=0 c=100 chunks=4 len=1024 type="bytes" benchmarker="autocannon": 46,552.73
http/simple.js duration=10 chunkedEnc=0 c=100 chunks=4 len=1024 type="buffer" benchmarker="autocannon": 46,477.1

This indicates that the previous benchmarking method (test-double-http) had limitations or errors. It might be due to the keep-alive turned on by default after Node.js 19?

Lenguaje dominante
Shell
Estrellas
399
Forks
11
Merge medio
29 min
PR fusionados (30 d)
1

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de nodejs/performance

Todos los issues de nodejs/performance

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.