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
disk-buffer: add prealloc() option, and change defaults in 4.0 #4056
disk-buffer: add prealloc() option, and change defaults in 4.0 #4056
Conversation
Build SUCCESS |
Can we also pre-allocate the full disk-buffer size in case truncation is completely disabled? |
Yes we can, I added that, too. |
02e39e5
to
ce10a10
Compare
ce10a10
to
e2de300
Compare
It seems like macOS does not have |
Signed-off-by: Attila Szakacs <attila.szakacs@oneidentity.com>
e2de300
to
41d6724
Compare
Added a hand-written preallocation for platforms, which do not have |
I'm just wondering, how long it might take to allocate 100-1000 gigabytes of storage with |
We can decide to not support preallocation at all on platforms, where we cannot guarantee it to be relatively fast. |
Please also note that If we want to avoid slow operation of pre-allocation we should check if |
On a HDD with ext4, the preallocation takes milliseconds. |
|
Signed-off-by: Attila Szakacs <attila.szakacs@oneidentity.com>
41d6724
to
70d1caf
Compare
Updated as we discussed. This is now ready for review. |
Signed-off-by: Attila Szakacs <attila.szakacs@oneidentity.com>
70d1caf
to
61fb112
Compare
Signed-off-by: Attila Szakacs <attila.szakacs@oneidentity.com>
61fb112
to
5b9a385
Compare
Signed-off-by: Attila Szakacs <attila.szakacs@oneidentity.com>
Signed-off-by: Attila Szakacs <attila.szakacs@oneidentity.com>
Its default is no in 3.x and yes in 4.x. Signed-off-by: Attila Szakacs <attila.szakacs@oneidentity.com>
Some platforms do not have posix_fallocate() (e.g. macOS). Signed-off-by: Attila Szakacs <attila.szakacs@oneidentity.com>
Signed-off-by: Attila Szakacs <attila.szakacs@oneidentity.com>
Signed-off-by: Attila Szakacs <attila.szakacs@oneidentity.com>
It does not always truncate the file. Signed-off-by: Attila Szakacs <attila.szakacs@oneidentity.com>
After this change we store in the singleton whether the user set the global config values manually, or we are using the hard-coded defaults. Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
This will become complex, so better move it to a separate function. Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
It is needed when they are both enabled. It is possible if one of them is not set explicitly by the user. Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
Signed-off-by: Attila Szakacs <attila.szakacs@oneidentity.com>
604060e
to
7ea05be
Compare
Done! |
@kira-syslogng do stresstest |
Kira-stress-test: Build FAILURE |
(Stress test is out of free disk space) |
Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
Kira-stress-test: Build FAILURE |
Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
TODO:
Signed-off-by: Attila Szakacs attila.szakacs@oneidentity.com