-
Notifications
You must be signed in to change notification settings - Fork 73
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
Feature-request: Configurable size of journal for ingegrity #151
Comments
Thanks for pointing this out, I didn't realize that this max journal size could impose a limit on the performance. We can easily add an option to specify the size, and I'll also look into whether the default sizes still make sense. |
Mikulas Patocka (dm-integrity author) has pointed out that the kernel currently has a hard coded max 64MB journal, which I then encoded in lvm. So, there's more involved to enlarge that. Have you tried bitmap mode? I've been thinking about changing the lvm default from journal to bitmap. |
Thanks for the information about the 64MB limit. I was not aware, as
But the performance, at the first test, is very high, but decreases repeating the same test, probably as the journal needs to be written back:
So it "feels" like more than 64MB are possible. I would prefer a journal over a bitmap, because bitmaps could not detect errors during power blackout. But the performance is better with bitmaps, in fact. The distribution is Debian 12, Kernel 6.1.0 nearby. The raid1 contains a HDD and a SDD, tuned with |
Yes, I misunderstood the max size issue, we just need to add an lvm option to set it. |
Hi @hans-helmut, can you give a bit more detail about your situation? What is the journal size that seems to be ideal in your case for performance with scattered writes? Do you know, or do you have to do more testing to figure out the right value once it's enabled in LVM? |
Hello @jbaublitz, I just want to store data, e.g. my fotos and contracts, for a longer time. As raid1 could not detect flipped bits (either on a drive or a data-bus), because only one side is read, I am afraid, that bad data may be copied into the backup. So I tried to add dm-integrity to the stack. I understood, that journaling is slower, because it writes twice with a delay of 10 seconds, but the only way to detect write-errors in case of a power failure, compared to the bitmap. As long as the drives are faster than the network, the slow write is acceptable, but on random access HDDs get very slow. Nearby: |
Hi, are you able to compile and test a devel version of lvm that includes the new option --raidintegrityjournalsize here? It's initially restricting the journal size to between 4 and 1024 MiB, let me know if that seems reasonable. |
Hello @teigland, I works much better now with 64 GB. I can run a few times without any big delay, but then it gets very slow, from 10000 to 100 IOPS. It is difficult to reproduce. My assumption is, that the delayed copy form the journal to "final" block needs some of the I/O-operations. I seems, when a kernel-thread named like |
Hi, thanks for testing that. I wonder if some of the other dm-integrity tunable options might be useful, like journal_watermark and commit_time: I'm nearly finished with a patch to let lvm to configure those also which I'll post a link to. I decided to change the command line interface to use |
Here's a devel patch adding |
pushed to main branch |
Hello!
While the option --raidintegritymode promises "improve performance for scattered writes", the crated size of the journal, up to only 64 MB, is too small.
So only small (from today's point of view) random writes up to max. 64 MB are improved.
Steps to reproduce:
Please offer an option to configure and resize the size of the journal for integrity.
The text was updated successfully, but these errors were encountered: