Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: "Michał Górny" <mgorny@g.o>, gentoo-portage-dev@l.g.o
Cc: Zac Medico <zmedico@g.o>
Subject: Re: [gentoo-portage-dev] [PATCH] Enable FEATURES=parallel-install by default (bug 715110)
Date: Tue, 12 May 2020 20:18:28
Message-Id: d04fa553-8d90-36a6-0017-9c051dc6eee0@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH] Enable FEATURES=parallel-install by default (bug 715110) by "Michał Górny"
1 On 5/12/20 12:28 PM, Michał Górny wrote:
2 > W dniu wto, 12.05.2020 o godzinie 10∶05 -0700, użytkownik Zac Medico
3 > napisał:
4 >> On 5/12/20 3:39 AM, Michał Górny wrote:
5 >>> I'm sorry but I was asking of a more high-level implications.
6 >>>
7 >>> I presume that this means that more than files of more than one
8 >>> package
9 >>> can be merged simultaneously. However:
10 >>
11 >> No, an exclusive lock must be held on vardbapi._fs_lock for this.
12 >> This
13 >> is currently required at least to guarantee that access to the config
14 >> memory file is serialized (config memory is the thing that emerge
15 >> --noconfmem disables, but --noconfmem does not disable this lock).
16 >>
17 >> We assume that it's probably not worthwhile to try to merge files for
18 >> more than one package at a time, since that would cause them to
19 >> compete
20 >> for IO bandwidth.
21 >>
22 >>> 1. Are collisions handled correctly then? i.e. if you start
23 >>> installing
24 >>> A, and then B, and the two packages collide will portage fail
25 >>> before
26 >>> starting to install any file from B?
27 >>
28 >> There are no guarantees here. However, the risk is minimal, since
29 >> it's
30 >> unlikely that a file collision of this sort would occur. file
31 >> collisions
32 >> are a QA problem that is generally detected and corrected log before
33 >> we
34 >> would encounter a collision of this sort.
35 >>
36 >>> 2. Are preinst/postinst phases called simultaneously or serialized?
37 >>
38 >> They're serialized.
39 >
40 > Now I'm lost here. Could you try to explain to me, without getting
41 > into the deep technicalities, how parallel-install achieves better
42 > speed or at doing what is non-parallel-install so slow?
43
44 It allows preinst/postinst/prerm/postrm phases to run for one package
45 while files are concurrently being merged or unmerged for another
46 package. This makes it possible to approach saturation of IO bandwidth.
47 --
48 Thanks,
49 Zac

Attachments

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

Replies