Relay CPU goes to portable ChaCha20-Poly1305 instead of AES-GCM

Abierto
#10,283 1 comentario 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
rust

Línea de trabajo

Start by tracing TLS cipher suite negotiation and the provider's suite ordering, then check where rind supplies ChaCha20 and AES backends. Reproduce the relay profile on a host with AES-NI and compare the negotiated suite and CPU profile before and after a maintainer-approved change. Done means the cause is identified and the same workload shows a measured improvement.

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

Descripción

In a profile of a relay serving many SD subscribers, the top self-time was portable ChaCha20-Poly1305 from rind:

  • rind::low::generic::chacha20::keystream: 18.0%
  • rind::low::generic::poly1305::Poly1305::add_bytes: 4.0%
  • rind::low::generic::chacha20poly1305::cipher: 1.1%

That's about 23% of the relay's CPU in the generic (non-SIMD) code path. An earlier profile of the same workload showed AES-GCM at 2.4%, so either the suite that gets negotiated changed, or the AES backend did.

Work

  • Find out why these sessions negotiate TLS13_CHACHA20_POLY1305_SHA256 rather than AES-128-GCM on hosts with AES-NI. It could be the client's suite order, the server's preference, or how the provider lists its suites.
  • Then do one or both of these, which is a decision for the maintainer:
    • On hosts with hardware AES, have the server prefer AES-GCM.
    • Give rind's ChaCha20 a SIMD backend.
  • Measure before and after, using the same profile.

(Written by Claude Opus 5.5 with high)

Lenguaje dominante
Rust
Estrellas
1.6k
Forks
251
Merge medio
10 h 10 min
PR fusionados (30 d)
832

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 moq-dev/moq

Todos los issues de moq-dev/moq

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.