Skip to content

tune tcmalloc for benchmarks#5903

Merged
anonrig merged 2 commits intomainfrom
yagiz/tune-tcmalloc
Jan 20, 2026
Merged

tune tcmalloc for benchmarks#5903
anonrig merged 2 commits intomainfrom
yagiz/tune-tcmalloc

Conversation

@anonrig
Copy link
Copy Markdown
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
Copy Markdown

codspeed-hq bot commented Jan 15, 2026

Merging this PR will not alter performance

✅ 68 untouched benchmarks
⏩ 129 skipped benchmarks1


Comparing yagiz/tune-tcmalloc (329a4a3) with main (02cf171)

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
Copy Markdown
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
Copy Markdown
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
@anonrig anonrig enabled auto-merge (squash) January 16, 2026 15:20
@anonrig anonrig force-pushed the yagiz/tune-tcmalloc branch from 8494386 to 329a4a3 Compare January 16, 2026 17:11
@anonrig anonrig disabled auto-merge January 16, 2026 17:11
@anonrig anonrig merged commit 3067a5c into main Jan 20, 2026
22 of 24 checks passed
@anonrig anonrig deleted the yagiz/tune-tcmalloc branch January 20, 2026 14:35
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.

3 participants