On 02/27/2016 11:50 PM, Robin H. Johnson wrote: > On Sat, Feb 27, 2016 at 02:14:12PM +0100, Luca Barbato wrote: >> On 24/02/16 01:33, Duncan wrote: >>> That option is there, and indeed, a patch providing it was specifically >>> added to portage for infra to use, because appending entries to existing >>> files is vastly easier and more performant than trying to prepend entries >>> and having to rewrite the entire file as a result. >> This sounds wrong in many different ways. The changelog files are tiny >> and makes next to no difference truncate+write or append. > Prior to seperating ChangeLog files into years, this was way worse: > a kernel bump present in any of gentoo-sources, hardened-sources, > vanilla-sources meant another 100k of data to sent. It's not a lot > overall, but here's some quick stats from one of our rsync servers, on > bytes sent. [snip] > > So, now the question: > If we use appending changelogs, the large changelogs only differ by a > few hundred bytes. If we instead have to rewrite them, it's 50k+ per > changelog. from /usr/share/portage/config/make.globals:
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" Notice the --whole-file part there. > > For each 50k changelog, the median transfer would get 0.25% larger. > Well, we could just have less changes ;) 160GB/day per server is about 2MB/s, ~16Mbit, or about 5TB/month. That's still included in the 'free' bandwidth that el cheapo hosters like Hetzner provide with their smallest servers ...