rpc,server: investigate regression caused by #138368 #139339
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Branch here.
We observed that #138368 reliably lowers performance by ~1% as measured by time/op in BenchmarkSysbench/SQL/3node/oltp_read_write.
This commit (
server: give Node.BatchStream its own impl
) not only claws back this 1% regression, it actually achieves another 1% improvement on top (when comparing "pr plus my commit" vs "master before pr"). Remarkably, the code change in this commit is a partial revert of a refactor introduced in the PR, and since nothing in the PR should've made performance better (after all, the PR introduced another setting to check, and the setting is off), it's surprising that the commit actually gains 1.73% vs master:To circle in on this more, I wanted to see if pr+commit vs pr produces a 2% speed-up. I didn't even have to run this for very long, it's pretty clear that it does (p-value is basically zero):
I don't know what to make of this yet, but am reminded of this segment of "Performance Matters" by Emery Berger.
I'm nearing the end of my day, but leaving this here as food for thought for now.
Closes #139022.