Skip to content

Conversation

@omnibs
Copy link
Member

@omnibs omnibs commented Sep 22, 2025

While investigating #141, I noticed our stdout-pretty reporter uses ridiculous amounts of ram when logging at high thoughput.

The reason is for every iteration of logLoop, we launch a brand new green thread to advertise log-explorer.

Replacing concurrently_ with race_ helped, but memory usage still wasn't constant.

Changing to use a dedicated advertisement green thread fixed it.

before after
image image

notice the x axis: we hit 1GB within seconds

When logging at high throughput, we created loads of new green threads
to check whether to advertise `log-explorer`.

Changing `concurrently_` to `race_` helped reduce growth rate, but
didn't fix things.

Splitting off a dedicated advertisement thread made memory usage
constant.
@omnibs omnibs changed the base branch from test-memory-leak to trunk September 23, 2025 13:32
@omnibs omnibs closed this Sep 23, 2025
@omnibs omnibs reopened this Sep 23, 2025
@omnibs omnibs added this pull request to the merge queue Sep 23, 2025
Merged via the queue into trunk with commit 09e9705 Sep 23, 2025
4 checks passed
@omnibs omnibs deleted the fix-dev-reporter-memory-usage branch September 24, 2025 14:40
@omnibs omnibs mentioned this pull request Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants