summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Kuratczyk <mkuratczyk@vmware.com>2023-03-24 09:36:02 +0000
committerMichal Kuratczyk <mkuratczyk@vmware.com>2023-03-24 15:31:11 +0000
commit5b5d4d2e295aae24ae8822e324131efcdcb9d47f (patch)
tree2fbcdccc0975e05e50a5d1bd79aaddee7c1191ab
parent66c5dfbf3f55da182435dc2b1ac318c54ed6fba2 (diff)
downloadrabbitmq-server-git-recovery-terms-no-ram-file.tar.gz
Do not use DETS ram file for recovery termsrecovery-terms-no-ram-file
Using a ram file should be an optimisation but in my tests, it's much better not to use it. We've tested on different hardware and different operating systems and in all cases, not using a RAM file provided much shorter shutdown times and very similar startup times. On most systems, a node with 100k empty classic queues (either v1 or v2) would need 40-180 seconds to stop (`rabbitmqctl stop_app`). With this change, most of these systems can do it in 7-15 seconds. Startup times are marginally affected for CQv2 in some cases, eg. 27 insead of 25 seconds. CQv1s start so slowly (many minutes), that this change is irrelevant to CQv1 startup time.
-rw-r--r--deps/rabbit/src/rabbit_recovery_terms.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/deps/rabbit/src/rabbit_recovery_terms.erl b/deps/rabbit/src/rabbit_recovery_terms.erl
index cae1a161e1..9ddba02001 100644
--- a/deps/rabbit/src/rabbit_recovery_terms.erl
+++ b/deps/rabbit/src/rabbit_recovery_terms.erl
@@ -121,7 +121,7 @@ open_table(VHost, RetriesLeft) ->
VHostDir = rabbit_vhost:msg_store_dir_path(VHost),
File = filename:join(VHostDir, "recovery.dets"),
Opts = [{file, File},
- {ram_file, true},
+ {ram_file, false},
{auto_save, infinity}],
case dets:open_file(VHost, Opts) of
{ok, _} -> ok;