composefs-rs used to fsync each file written when pulling which was costly.
This got changed to a global syncfs call in c3677f1.
We could potentially do better by following a logic similar to what's done in ostree:
- When pulling, link all the files to be written into a tmp folder
- Then fsync the entire folder once ready to move them into the composefs repo
- Then complete the repo import
- We would have a tmp directory per pull operation to enable parallel pulls
Some notes from Pragyan:
Adding some stats related to fsync:
For 37857 objects, we call fsync 4 times (I’m not sure at what point we sync everything)
composefs-rs used to fsync each file written when pulling which was costly.
This got changed to a global syncfs call in c3677f1.
We could potentially do better by following a logic similar to what's done in ostree:
Some notes from Pragyan: