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

4.x: Use compressed mem tables and set a wal max entries default for quorum queues #11121

Merged
merged 1 commit into from
May 13, 2024

Conversation

kjnilsson
Copy link
Contributor

@kjnilsson kjnilsson commented Apr 29, 2024

Compressed ETS tables may introduce a small throughput penalty (low single digit %) but can reduce peak Ra memory use by 30-50%.

Also set a default wal_max_entries value to avoid mem tables growing too large when using very small message sizes (as more than 1M tiny messages can easily fit into one WAL file).

@kjnilsson kjnilsson added this to the 4.0.0 milestone Apr 29, 2024
@michaelklishin michaelklishin changed the title QQ: default to compressed mem tables and set a wal max entries default 4.x: Use compressed mem tables and set a wal max entries default for quorum queues Apr 29, 2024
@mkuratczyk
Copy link
Contributor

Indeed, the memory savings are significant in many cases (obviosuly, mostly with long queues). The throughput difference is small and actually the branch performed a bit better in some cases - it could be caused by "test entropy" (but even then, that means the differences are small if some randomness can flip the results) but could also be actually better thanks to lower memory usage.

100B messages

In this test we hit the known issue where ra_log_segment_writer can't keep up and therefore memory usage keeps going up as new ETS tables are created before the previous are deleted.
100B

1kb messages:
Same issue as above, but in this case it happened twice on main and once on the branch:
1kb

5kb messages:
5kb

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

@kjnilsson kjnilsson marked this pull request as ready for review April 30, 2024 08:55
Compressed ETS tables may introduce a small throughput penalty (low single
digit %) but can reduce peak Ra memory use by 30-50%.

Also set a default wal_max_entries value to avoid mem tables growing
too large when using very small message sizes (as more than 1M tiny
messages can easily fit into one WAL file).

Ra 2.10.1 has a type spec fix needed.
@kjnilsson kjnilsson merged commit d180474 into main May 13, 2024
18 checks passed
@kjnilsson kjnilsson deleted the qq-default-config-changes branch May 13, 2024 08:24
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.

2 participants