rabbitmq-server
rabbitmq-server copied to clipboard
Khepri: high memory usage during import
NOTE: this issue is related to an unreleased feature
bazel run --config=local broker
bazel run --config=local rabbitmqctl enable_feature_flag raft_based_metadata_store_phase1
bazel run --config=local rabbitmqctl import_definitions q1-with-100k-topic-bindings.json
Memory usage goes up to almost 4GB:
For comparison, with Mnesia it doesn't go above 800MB:
I've re-tested this with the most recent changes. It's significantly better, with the maxium usage of ~1.4GB:
Restested a year later. The peak is below 900MB. Sill higher than Mnesia (600MB), but the import is significantly faster (90s for Khepri, 174s for Mnesia), so I think that's a decent trade-off.
Worth mentioning that the migration to khepri after importing this file took 14 minutes, which is something worth looking into, but this will be a separate issue.