Gentoo Archives: gentoo-alt

From: Fabian Groffen <grobian@g.o>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] tree verification in prefix
Date: Thu, 22 Feb 2018 07:24:39
Message-Id: 20180222072425.GB77958@gentoo.org
In Reply to: Re: [gentoo-alt] gemato in prefix by Michael Weiser
1 Please excuse my snipping.
2
3 On 21-02-2018 21:55:29 +0100, Michael Weiser wrote:
4 > I've been following or rather post-reading the discussion about GLEP-74
5 > and it seems a lot of thought and security considerations have gone into
6 > it. Are you following it for your implementation?
7
8 Sure. I have my reservations about the decisions now, but you only get
9 that much of detail when you start implementing such spec.
10
11 > I see you're using OpenMP. That looks very neat and could certainly make
12 > it scale better than gemato.
13
14 That was because I was too lazy to do pthreads stuff this time, and at
15 the time of writing hashgen was experimenting with OpenMP as new thing I
16 learnt. The target platform rsync0 ran on (Solaris-x64 back then,
17 ppc64-linux now, it's been amd64-linux inbetween) always supported
18 OpenMP, so I could unconditionally use it.
19
20 > BTW: I remember OpenMP being plain missing from clang until recently.
21 > Ah, https://clang-omp.github.io/ says 3.7 and onwards have native
22 > support.
23
24 Yes, in the beginning it was an issue with clang on OSX, but the joy of
25 OpenMP in a way, it just compiles and runs way slower :)
26
27 > > hashgen currently runs in 30s or so on the tree to generate manifests.
28 > > I hope it can verify in the same amount of time (we're talking about a
29 > > Quad G5 PowerPC machine here with rusty old spinning disks), leaving it
30 > > in a much better position to be used for Prefix, since we tend to have
31 > > slower/older machines around.
32 >
33 > I can only believe that number if the portage tree fits into the fs
34 > cache (RAM). Then it would be purely CPU-bound, I guess, and C could
35 > play out its advantage.
36
37 Sure. The ppc64 box I mention has 16GiB of ram, and 4 cores 2.5GHz
38 each. 14GiB of ram is used for buffers, so I may very well be a bit
39 over-optimistic here.
40
41 > It also shows that I have a high pain threshold in dealing with Gentoo
42 > on small and old machines. Considering how long Gentoo users typically
43 > wait for compiles to finish I wouldn't have expected a bit of a wait for
44 > gemato or hashverify to be much of an issue.
45
46 I have my Sun Blade 100 (sparcv9 502MHz) with 512MiB ram in mind, which
47 is very slow in any IO tasks, reasonable on CPU bound tasks.
48
49 > Ah, now I understand what you were getting at. I just verified: Both
50 > checks are working on Gentoo Linux but not in Prefix Mac. It seems to
51 > have to do with setting "thin-manifests" in layout.conf of the prefix
52 > tree. Once I set that to false, prefix portage behaves the same as
53 > Gentoo Linux portage.
54
55 THANKS. I'm going to fix this immediately.
56
57 > Gentoo Linux:
58 > [root@linux:~] grep thin /usr/portage/metadata/layout.conf
59 > # Use thin Manifests for Git
60 > thin-manifests = false
61 >
62 > Prefix Mac:
63 > root@mac:/gentoo/usr/portage/xfce-base/garcon $ grep -r thin /gentoo/usr/portage/metadata/layout.conf
64 > # Use thin Manifests for Git
65 > thin-manifests = true
66 > root@mac:/gentoo/usr/portage/xfce-base/garcon $ sed -i -e "s,thin-manifests = true,thin-manifests = false," /gentoo/usr/portage/metadata/layout.conf
67
68 > > Now I may be all wrong with trying to implement the verification myself,
69 > > but that's a separate topic. gemato should work fine.
70 >
71 > I think it's a worthy cause just for the fact that multiple
72 > implementations of a protocol are always good to drive improvement and
73 > show up the corner cases.
74
75 My thinking, plus pet-project material :)
76
77 > Maybe it shouldn't be hidden away in the prefix tree so others can more
78 > easily become aware of and contribute to it.
79
80 Once hashverify is done, I'll make an ebuild for it. hashgen is not
81 useful in general. Only if you create a tree yourself.
82
83 > I've retried a couple of times today. I deleted timestamp.chk several
84 > times and resynced until I saw no delta any more. There actually was a
85 > delta on the second and sometimes third run, mostly Manifest.gzs and
86 > metadata. It still fails reliably on second-level Manifests, e.g.
87 > dev-dotnet/Manifest.gz and sys-libs/Manifest.gz
88
89 Odd, was this rsync1 or rsync2?
90
91 > It looks as if regeneration of Manifests and md5-cache runs almost
92 > continuously, not just every 26,56 of the hour as rsync's motd says. Is
93 > that intentional or are perhaps multiple instances of the script running
94 > amok?
95
96 The script is fired off through cron at 26 and 56. I may have gone
97 wrong here, but for the sake of redundancy, I scratched the
98 rsync0 -> rsync{1,2}
99 path. Instead rsync1 and rsync2 are doing full generation both of them.
100 To make this be equal, I had to play a trick with timestamps, I
101 basically set the timestamp to the git commit time. Maybe this plays a
102 role too?
103
104 I only checked rsync1 last time, maybe rsync2 isn't as equal as I
105 thought.
106
107 Thanks,
108 Fabian
109
110 --
111 Fabian Groffen
112 Gentoo on a different level

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-alt] tree verification in prefix Michael Weiser <michael@×××××××××××××××.net>