toolforger
Explorer
- Joined
- Aug 8, 2017
- Messages
- 60
Here's the scenario:
- Big file (megabytes).
- File gets sent to NAS via rsync. (Expectation: Used space goes up by file size.)
- NAS does a snapshot. (Expectation: Used space is essentially unchanged.)
- File gets sent to NAS again. What happens?
Things that *could* happen:
- Happy case: rsync detects that just the block is modified, updates the block. (Expectation: Used space goes up by size of changed block.)
- So-so case: rsync overwrites the entire file, but ZFS keeps blocks shared that would be unmodified after the overwrite. (I had hoped ZFS would be doing this, but some preliminary testing indicated it does not.)
- Bad case: The file will be fully stored in both versions.
To rephrase this as a question:
- Does ZFS snapshot sharing happen on a per-block or on a per-file level?
- Is rsync smart enough to transmit only those blocks that have been changed wrt. the target file?
Background info: rsync has a --blocksize options that makes me think that it *may* be smart enough to leave unchanged blocks alone, but the manual is maddeningly imprecise.
I have a test running right now, but I guess I overdid the file size - I built a 64-GB file of random data, and current estimates for initial rsync transfer time is 10 hours.
Which seems a bit slow to me - FreeNAS is reporting ~9.5 MBit/s on bge0, which sounds like *some* hardware is pegged at 10 MBit/s. I don't see that transfer rate add up to 10 hours for 64 GB though; not sure what's going on here, but maybe I'm grossly miscalculating things.
- Big file (megabytes).
- File gets sent to NAS via rsync. (Expectation: Used space goes up by file size.)
- NAS does a snapshot. (Expectation: Used space is essentially unchanged.)
- File gets sent to NAS again. What happens?
Things that *could* happen:
- Happy case: rsync detects that just the block is modified, updates the block. (Expectation: Used space goes up by size of changed block.)
- So-so case: rsync overwrites the entire file, but ZFS keeps blocks shared that would be unmodified after the overwrite. (I had hoped ZFS would be doing this, but some preliminary testing indicated it does not.)
- Bad case: The file will be fully stored in both versions.
To rephrase this as a question:
- Does ZFS snapshot sharing happen on a per-block or on a per-file level?
- Is rsync smart enough to transmit only those blocks that have been changed wrt. the target file?
Background info: rsync has a --blocksize options that makes me think that it *may* be smart enough to leave unchanged blocks alone, but the manual is maddeningly imprecise.
I have a test running right now, but I guess I overdid the file size - I built a 64-GB file of random data, and current estimates for initial rsync transfer time is 10 hours.
Which seems a bit slow to me - FreeNAS is reporting ~9.5 MBit/s on bge0, which sounds like *some* hardware is pegged at 10 MBit/s. I don't see that transfer rate add up to 10 hours for 64 GB though; not sure what's going on here, but maybe I'm grossly miscalculating things.