-
Notifications
You must be signed in to change notification settings - Fork 345
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: improve read / write performance #482
base: master
Are you sure you want to change the base?
Conversation
Hi, This looks interesting, just a cosmetic thing: maybe the manpage should be changed like so?
When using this patch but without specifying the new options, will rsync run with the same parameters as when running without this patch? Thanks, |
@realsimix sure thing see 8dd0b8e. Yes options are backward compatible. |
@WayneD ? |
On fast storage, reading with a specific block size can drastically improve fetch performance. This option acts as length mmap argument. On scale-out or flash disk storage, this value can be set higher than 1MB. Tests on my side resulted on rsync whole-file, 5x time faster with the follwowing specs: - max-map-size 4MB - network 10Gb link - hpnssh / 4800 MTU
This option forces the buffer size when writing a file on the receiver side.
@@ -2772,7 +2776,19 @@ void server_options(char **args, int *argc_p) | |||
args[ac++] = arg; | |||
} | |||
|
|||
if (io_timeout) { | |||
if (max_map_size) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we will need a MAX_MAP_SIZE_DEFAULT define, and make this check be if (max_map_size != MAX_MAP_SIZE_DEFAULT)
otherwise we will be sending this option always, and the remove rsync may not understand it, so would break a lot of setups
args[ac++] = arg; | ||
} | ||
|
||
if (write_size) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same issue as max_map_size
@@ -472,6 +472,8 @@ has its own detailed description later in this manpage. | |||
--checksum-choice=STR choose the checksum algorithm (aka --cc) | |||
--one-file-system, -x don't cross filesystem boundaries | |||
--block-size=SIZE, -B force a fixed checksum block-size | |||
--max-map-size=SIZE force mmap read block size (expressed in bytes, useful for fast storage, default 256K) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be easier to use in kBytes?
Context
On fast storage, reading with a specific block size can drastically improve fetch performance.
Default value is 256K. On scale-out or flash disk storage, this value can be set higher than 1MB.
Update
This PR adds two things:
This option acts as count argument in
read(int fd, void *buf, size_t count)
This option forces the buffer size when writing a file on the receiver.
Result
Tests on my side resulted on rsync whole-file, 5x time faster with the following specs:
2x 1,3 GB zip files
Total: 2,6 GB
hpn aes128 +
mtu 4800 end to end +
read block size 1024
hpn aes128 +
mtu 4800 end to end +
read block size 4096