Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] User eix-sync permissions problem
Date: Tue, 11 Feb 2014 12:14:49
Message-Id: 52FA1427.3000604@gmail.com
In Reply to: Re: [gentoo-user] User eix-sync permissions problem by Walter Dnes
1 On 11/02/2014 13:07, Walter Dnes wrote:
2 > On Tue, Feb 11, 2014 at 07:32:46AM +0200, Alan McKinnon wrote
3 >
4 >> emerge --sync X number of times daily in a cron
5 >>
6 >> emerge -avuND world deliberately and manually as the sysadmin at your
7 >> leisure.
8 >>
9 >> Two different actions in time.
10 >
11 > Assume you sync once a day, and update once a week, the first 6 syncs
12 > would be mostly wasted. Yes, your final sync would be smaller. But
13 > your machine and the server would have to go through the file-comparison
14 > process 7 times, instead of once.
15 >
16
17 So what? rsync is cheap and doesn't stress the server unduly.
18
19 It doesn't check every object in the directory tree and stat 179680
20 files/dirs every time, the whole thing is hashed and it's the hash
21 values that are compared. To compare a directory, rsync only needs to
22 look at the directory inode, if they match on both ends then it's a
23 certainty the files match. It's a *very* efficient system, all done
24 in-memory, your average server can deal with many connections and not
25 even break a sweat.
26
27 If you want to minimize load, concentrate on making emerge world more
28 efficient so that it takes less than 3 minutes to depgraph on a fast cpu
29 and up to 40 on a slow one. Coupled with overlays, more often than not
30 the portage cache is invalidated so emerge ends up sourcing almost every
31 ebuild file in the tree.
32
33 --sync is not something worth optimizing if done once a day. At that
34 frequency you are well below the noise floor
35
36
37 --
38 Alan McKinnon
39 alan.mckinnon@×××××.com