revoltchat / backend

Monorepo for Revolt backend services.
https://developers.revolt.chat/api/
Other
1.22k stars 137 forks source link

bug: very high CPU usage from events server (Rust 1.78.0 regression) #341

Open insertish opened 2 months ago

insertish commented 2 months ago

What happened?

Something changed between 20240805-1 and 20240829-3 that is causing very high CPU usage.

insertish commented 2 months ago

nominal: image

problematic: image

insertish commented 2 months ago

Configurations tested:

Image Rust Version Base Image
20240805-1 1.70.0 debian:bullseye-slim
20240829-3, 20240830-1 1.80.1 gcr.io/distroless/cc-debian12:nonroot :x:
20240909-1-debug 1.80.1 debian:bookworm-slim :x:
20240909-4-debug 1.70.0 gcr.io/distroless/cc-debian12:nonroot No build
20240909-5-debug 1.76.0 gcr.io/distroless/cc-debian12:nonroot
20240909-6-debug † 1.79.0 gcr.io/distroless/cc-debian12:nonroot :x:
20240909-7-debug 1.77.0 gcr.io/distroless/cc-debian12:nonroot
20240909-8-debug 1.78.0 gcr.io/distroless/cc-debian12:nonroot :x:
20240909-9-debug 1.77.2 gcr.io/distroless/cc-debian12:nonroot

† Image overwritten by 7-debug by accident

insertish commented 2 months ago

All signs point to a regression in Rust currently.

insertish commented 2 months ago

Something changed in Rust 1.78.0 that is causing very high CPU usage: https://releases.rs/docs/1.78.0/