Skip to content

Conversation

@anonrig
Copy link
Member

@anonrig anonrig commented Jan 15, 2026

Tcmalloc is extremely flaky while running benchmarks. This change would reduce the probability of outliers at the cost of diverging from production. For benchmarks that need tcmalloc to use the default values, they have to avoid including bench-tools.

Recommended by Codspeed folks.

@anonrig anonrig requested review from a team as code owners January 15, 2026 18:43
@anonrig anonrig force-pushed the yagiz/tune-tcmalloc branch 3 times, most recently from 4d831f6 to bf34cb6 Compare January 15, 2026 18:45
@anonrig anonrig requested review from fhanau and mikea January 15, 2026 18:46
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 15, 2026

Merging this PR will improve performance by 12.99%

⚡ 1 improved benchmark
✅ 67 untouched benchmarks
⏩ 129 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
simpleStringBody[Response] 21.6 µs 19.1 µs +12.99%

Comparing yagiz/tune-tcmalloc (f328f8a) with main (4e603ca)

Open in CodSpeed

Footnotes

  1. 129 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@fhanau
Copy link
Contributor

fhanau commented Jan 15, 2026

I think we'll need to select() based on //src/workerd/server:really_use_tcmalloc instead to handle the case of sanitizer builds (no tcmalloc but may be Linux) correctly. You may need to make that target public first for this to work.
Edit: Asan CI has passed – perhaps because we don't build benchmarks in the ASan job?

@anonrig anonrig force-pushed the yagiz/tune-tcmalloc branch from bf34cb6 to 5793063 Compare January 15, 2026 19:39
@anonrig
Copy link
Member Author

anonrig commented Jan 15, 2026

Edit: Asan CI has passed – perhaps because we don't build benchmarks in the ASan job?

Probably yes. Regardless, I've added the changes you recommended.

@anonrig anonrig force-pushed the yagiz/tune-tcmalloc branch from 5793063 to f328f8a Compare January 15, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants