rabbitmq-server icon indicating copy to clipboard operation
rabbitmq-server copied to clipboard

Khepri: high memory usage during import

Open mkuratczyk opened this issue 1 year ago • 1 comments

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: import-1q-100k-topic-bindings-with-khepri

For comparison, with Mnesia it doesn't go above 800MB: import-1q-100k-topic-bindings-with-mnesia

mkuratczyk avatar Aug 04 '22 09:08 mkuratczyk

I've re-tested this with the most recent changes. It's significantly better, with the maxium usage of ~1.4GB: import-q1-with-100k-bindings

mkuratczyk avatar Sep 07 '22 21:09 mkuratczyk

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.

mkuratczyk avatar Sep 12 '23 19:09 mkuratczyk