Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust vheap sizes for message handling processes on Erlang/OTP 27 #12208

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

kjnilsson
Copy link
Contributor

@kjnilsson kjnilsson commented Sep 4, 2024

OTP 27 reset all assumptions on how the vm reacts to processes that
buffer and process a lot of large binaries.

Substantially increasing the vheap sizes for such process restores
most of the same performance by allowing processes to hold more binary
data before major garbage collections are triggered.

This introduces a new module to capture process flag configurations.

The new vheap sizes are only applied when running on OTP 27 or
above.

@mkuratczyk
Copy link
Contributor

64B messages (represented differently within OTP than binaries above 64B):
msg-size-64B

65B messages:
msg-size-65B

100B messages:
msg-size-100B

1kb messages:
msg-size-1kb

5kb messages:
msg-size-5kb

Full results:
https://grafana.lionhead.rabbitmq.com/goto/aDIKeWeIR?orgId=1

@michaelklishin
Copy link
Member

My interpretation of the benchmarks can be summarized as: with this QQ process configuration the throughput becomes comparable, if not better (with smallest messages), on Erlang 27 but latency is worse, in particular the 99% percentile/max.

I think it's a reasonable outcome and will allow us to support Erlang 27 in 4.0 without major regressions.

@mergify mergify bot added the bazel label Sep 9, 2024
@kjnilsson kjnilsson changed the title QQ vheap tweaks to do better on OTP27 Adjust vheap sizes for message handling processes in OTP 27 Sep 9, 2024
@michaelklishin
Copy link
Member

The forced push was a rebase. @mkuratczyk I assume this change is still relevant, correct?

@mkuratczyk
Copy link
Contributor

Yes, I think we can merge it. @kjnilsson anything else you wanted to do here?

kjnilsson and others added 2 commits October 9, 2024 20:08
OTP 27 reset all assumptions on how the vm reacts to processes that
buffer and process a lot of large binaries.

Substantially increasing the vheap sizes for such process restores
most of the same performance by allowing processes to hold more binary
data before major garbage collections are triggered.

This introduces a new module to capture process flag configurations.

The new vheap sizes are only applied when running on OTP 27 or
above.
@michaelklishin
Copy link
Member

Another rebase.

@kjnilsson kjnilsson marked this pull request as ready for review October 10, 2024 15:12
@michaelklishin michaelklishin merged commit 1726064 into main Oct 11, 2024
334 checks passed
@michaelklishin michaelklishin deleted the qq-otp27-conf branch October 11, 2024 13:59
michaelklishin added a commit that referenced this pull request Oct 11, 2024
Adjust vheap sizes for message handling processes in OTP 27 (backport #12208)
@michaelklishin michaelklishin changed the title Adjust vheap sizes for message handling processes in OTP 27 Adjust vheap sizes for message handling processes on Erlang/OTP 27 Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants