Live data from Hacker News

Broccoli: Syncing Faster by Syncing Less

dropbox.tech

31–40 of 58 posts

Re: Broccoli: Syncing Faster by Syncing Less

#31

This is why I continue to use Dropbox for daily work and constantly changing files. The syncing is unmatched. It’s surprising how bad the others like OneDrive and google drive are in comparison.

OneDrive completed its rollout of differential sync in April 2020[1], after beginning in Sep 2019. This should improve OneDrive’s sync speed substantially.

[1] https://techcommunity.microsoft.com/t5/office-365/onedrive-c...

Re: Broccoli: Syncing Faster by Syncing Less

#32
Middle out compression has shown considerable performance over the investigated options listed in the article. I wonder why it was not mentioned?

Just kidding :) great article. As others have said, supporting data was very informative.

Re: Broccoli: Syncing Faster by Syncing Less

#33

This is why I continue to use Dropbox for daily work and constantly changing files. The syncing is unmatched. It’s surprising how bad the others like OneDrive and google drive are in comparison.

OneDrive completed its rollout of differential sync in April 2020[1], after beginning in Sep 2019. This should improve OneDrive’s sync speed substantially. [1] https://techcommunity.microsoft.com/t5/office-365/onedrive-c...

They already had this for Office files, it's just finally extended to all file types after several years. It's still nowhere near as fast as Dropbox, especially for complex directories, and the fact that it took until 2020 to finish this feature shows how far behind they are.

Re: Broccoli: Syncing Faster by Syncing Less

#34

This is why I continue to use Dropbox for daily work and constantly changing files. The syncing is unmatched. It’s surprising how bad the others like OneDrive and google drive are in comparison.

OneDrive completed its rollout of differential sync in April 2020[1], after beginning in Sep 2019. This should improve OneDrive’s sync speed substantially. [1] https://techcommunity.microsoft.com/t5/office-365/onedrive-c...

[deleted]

Re: Broccoli: Syncing Faster by Syncing Less

#35
post #23

Earlier quoted context omitted.

It looks like they did, but having an implementation in a memory-safe language was one of their requirements. Learning that was for me the most fascinating part of the article.

Surely Dropbox would have the engineering power to re-implement zstd in a memory safe language if it was sufficiently beneficial.

I'm sure they could implement it technically speaking, but if a compression protocol is not widespread enough to have others doing such a thing, they can probably consider that a sign of how supported it is.

Re: Broccoli: Syncing Faster by Syncing Less

#36
This is a really interesting write up of their use of Brotli! Makes me wonder if there might be a novel way I could leverage it beyond HTTP Responses.

I never realized the advantages of brotli over zlib could be so extensive, in particular, it appears they're getting a huge speed boost (I think also in part that its written in Rust)

>we were able to compress a file at 3x the rate of vanilla Google Brotli using multiple cores to compress the file and then concatenating each chunk.

Side note: I admit, at first I thought they were talking the Broccoli build system[0]

[0]https://github.com/broccolijs/broccoli

Re: Broccoli: Syncing Faster by Syncing Less

#37
post #23
post #22

Surprised they didn't look more at zstd. IME it's faster than brotli and often has a better compression ratio.

It looks like they did, but having an implementation in a memory-safe language was one of their requirements. Learning that was for me the most fascinating part of the article.

A pure-rust implementation of zstd decoder already exists in production : https://github.com/KillingSpark/zstd-rs

Re: Broccoli: Syncing Faster by Syncing Less

#38
post #22

Surprised they didn't look more at zstd. IME it's faster than brotli and often has a better compression ratio.

We heavily investigated zstd and met with the brilliant inventor, Yann, who provided amazing insights into the design and rationale behind zstd and why it is so fast and such an amazing technology. I also recompiled zstd into rust using https://github.com/immunant/c2rust and tried using various webasm mechanisms to run it (I didn't get webasm quite fast enough, and teaching c2rust to make it safe would be quite a slo…

> the main reason we settled on Brotli was the second order context modeling

This advanced feature is only relevant on reaching compression levels 10 or 11, which are extremely slow. Below that, it's barely used by the encoder, due to memory and cpu taxes.

Given your application has reached speed concerns, and ends up using brotli at compression level 1 in production, you would be surprised to notice that in this speed range, zstd compresses both faster and stronger, by a quite substantial margin.

Re: Broccoli: Syncing Faster by Syncing Less

#39

This is why I continue to use Dropbox for daily work and constantly changing files. The syncing is unmatched. It’s surprising how bad the others like OneDrive and google drive are in comparison.

OneDrive completed its rollout of differential sync in April 2020[1], after beginning in Sep 2019. This should improve OneDrive’s sync speed substantially. [1] https://techcommunity.microsoft.com/t5/office-365/onedrive-c...

[deleted]

Re: Broccoli: Syncing Faster by Syncing Less

#40
post #28

Is it possible to use this as rsync replacement ?

They aren't on the same level of abstraction. Rsync currently uses zlib for block compression on the wire. Brotli/broccoli would be an alternative option.

New compression options were added in rsync 3.2. From https://download.samba.org/pub/rsync/NEWS#3.2.0

Various compression enhancements, including the addition of zstd and lz4 compression algorithms and a negotiation heuristic that picks the best compression option supported by both sides.

Post reply on HN