Add transaction_log_dir option to Mnesia
Hi!
We've noticed mnesia overloaded warnings in one system, and wanted to address this somehow. Since the warnings are happening when the transaction log files are to be dumped before the previous dumping has finished, the issue seems to be with disc performance. Changing dump_log_write_treshold or dc_dump_limit did not help, from what I understand. So the proposed solution was to put the transaction log files on a different filesystem, possibly on a different, faster drive then the Mnesia directory. This would require adding a configuration parameter with a path specifying where to put the log files, something like proposed in this PR - transaction_log_dir.
I've tried to write testcases for this option, and from what I checked locally, the proposal seems to work. I did not write the documentation yet, because it maybe better to get some feedback before that.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
gustaw-lippa seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.
CT Test Results
2 files 55 suites 24m 22s :stopwatch: 662 tests 513 :heavy_check_mark: 149 :zzz: 0 :x: 709 runs 540 :heavy_check_mark: 169 :zzz: 0 :x:
Results for commit 5809c84f.
:recycle: This comment has been updated with latest results.
To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.
See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.
Artifacts
// Erlang/OTP Github Action Bot
Did using this patch remove the warnings?
Normally if you have peak of work you will get warning but as long as it doesn't happen several times in a row mnesia will catch up and it is not a problem, the problem is when you are consistently writing more data then what the disk/mnesia can handle so the logfile will increase the size.
Otherwise the code looks ok.
Being honest, we didn't yet test this solution. I will keep you updated and tell you about the results when we will. The reason I've opened this PR before that, was to see if adding such an option to Mnesia would be at all acceptable.
As for the load, it's rather consistent in our case, and we see a lot of these warnings for longer periods.
Closing this, please re-open if/when it have been proved to increase the performance