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