Skip to content
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

Creating COW file takes a long time #392

Open
yito24 opened this issue Oct 9, 2024 · 3 comments
Open

Creating COW file takes a long time #392

yito24 opened this issue Oct 9, 2024 · 3 comments

Comments

@yito24
Copy link

yito24 commented Oct 9, 2024

I found the cause why it take a long time to take a snapshot.
Related issues
#383

Ver 0.11.7 and later, it takes a long time to create a COW file that is 10% of the volume.
There is a problem with the behavior of creating COW files.
Please fix this issue so that COW files can be created immediately.

I tested it with a 5TB volume.

NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0    5T  0 disk 
├─sda1   8:1    0  200M  0 part /boot/efi
├─sda2   8:2    0    1G  0 part /boot
├─sda3   8:3    0  3.9G  0 part [SWAP]
├─sda4   8:4    0   50G  0 part /
└─sda5   8:5    0    5T  0 part /home

Ver 0.11.6, it takes less than 0.1 seconds to create a 500GB COW file, for example.
Ver0.11.6.txt

10/09/2024 06:35:33.630 ** datto file does not exist.
10/09/2024 06:35:34.098 ** dbdctl setup-snapshot /dev/sda5 /home/.datto0 0
10/09/2024 06:35:34.105 507G .datto0  ------------->10% COW file is created immediately
10/09/2024 06:35:34.117 ** Created snapshot /dev/sda5.
10/09/2024 06:35:34.121 ** sleep 5.
10/09/2024 06:35:39.129 ** dbdctl destroy 0.
10/09/2024 06:35:39.154 ** destroy fin.

Ver 0.11.7 and later, it takes 30 minutes to create a 500GB COW file.
Ver0.11.8.txt

10/09/2024 05:44:24.022 ** datto file does not exist.
10/09/2024 05:44:24.902 ** dbdctl setup-snapshot /dev/sda5 /home/.datto0 0
10/09/2024 05:44:25.034 ** datto file does not exist.
10/09/2024 05:44:26.040 342M .datto0
10/09/2024 05:44:27.051 921M .datto0
            :
            :
10/09/2024 06:15:08.194 506G .datto0
10/09/2024 06:15:10.888 507G .datto0  ------------->It takes 30 minutes to create 10% of the COW file
10/09/2024 06:15:13.268 ** Created snapshot /dev/sda5.
10/09/2024 06:15:13.926 ** sleep 5.
10/09/2024 06:15:18.931 ** dbdctl destroy 0.
10/09/2024 06:15:20.648 ** destroy fin.
@iamandrii
Copy link
Collaborator

Hi @yito24. Thanks for raising this again. I think I know the reason (starting from 0.11.7 we are using our fallocate instead of kernel one). We will proceed with this bug in one of our next releases. Have a nice day =)

@yito24
Copy link
Author

yito24 commented Oct 9, 2024

Hi @iamandrii,

If this issue is fixed, the quality will be better.
I look forward to it being fixed.

@yito24
Copy link
Author

yito24 commented Oct 23, 2024

Hi @iamandrii,

I was download "dattobd-real-fallocate-fix" and tested it.
I have confirmed that the COW is created in a similar amount of time as in version 0.11.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants