Gentoo Archives: gentoo-portage-dev

From: Bastian Balthazar Bux <BastianBalthazarBux@×××××××××.it>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] Cache rewrite backport
Date: Wed, 12 Oct 2005 01:50:02
Message-Id: 434C6BB8.8070600@pnpitalia.it
In Reply to: Re: [gentoo-portage-dev] Cache rewrite backport by Brian Harring
1 Brian Harring ha scritto:
2 > On Wed, Oct 12, 2005 at 12:01:12AM +0200, Bastian Balthazar Bux wrote:
3 >
4 >>Sorry, but here the results are not those expected:
5 >
6 > .51.22 vs .53_rc5... try with a vanilla .53_rc5 please
7
8 here they are, also added a test with a dirty trick to precharge the
9 portage dir and see what happen. Look like there is a small improvement.
10 Now it's late.
11
12 ==== time emerge --metadata; 1st run; 2.0.53_rc5 vanilla
13 real 9m44.449s
14 user 4m51.034s
15 sys 0m24.754s
16
17 ==== time emerge --metadata; 2nd run; 2.0.53_rc5 vanilla
18 real 2m50.932s
19 user 0m12.597s
20 sys 0m3.836s
21
22 ==== time emerge --metadata; 3rd run; 2.0.53_rc5 vanilla
23 real 1m55.445s
24 user 0m12.501s
25 sys 0m3.416s
26
27 ==== tar -c /usr/portage/* >/dev/null & time emerge --metadata
28 ==== ; 4th run; 2.0.53_rc5 vanilla
29 real 1m10.275s
30 user 0m13.377s
31 sys 0m4.740s
32
33
34 ==== time emerge --metadata; 1st run; 2.0.53_rc5 patched
35 real 4m30.186s
36 user 0m12.757s
37 sys 0m9.921s
38
39 ==== time emerge --metadata; 2nd run; 2.0.53_rc5 patched
40 real 4m41.021s
41 user 0m12.597s
42 sys 0m9.297s
43
44 ==== time emerge --metadata; 3rd run; 2.0.53_rc5 patched
45 real 4m44.544s
46 user 0m12.521s
47 sys 0m9.457s
48
49 ==== tar -c /usr/portage/* >/dev/null & time emerge --metadata
50 ==== ; 4th run; 2.0.53_rc5 patched
51 real 4m12.131s
52 user 0m13.661s
53 sys 0m10.329s
54
55 >
56 >
57 >
58 >>==== time emerge --metadata; 1st run; 2.0.51.22-r3
59 >>real 2m24.419s
60 >>user 0m12.329s
61 >>sys 0m3.644s
62 >>
63 >>==== time emerge --metadata; 2nd run; 2.0.51.22-r3
64 >>real 1m17.700s
65 >>user 0m12.257s
66 >>sys 0m2.976s
67 >>
68
69 [snip]
70 the 2.0.51.22-r3 ones are still much faster on "real", please shade a
71 light into my ignorance
72
73 >
74 >
75 > Wasn't expecting a massive improvement, although wasn't sure as hell
76 > wasn't expecting a 3x increase in sys. :)
77 >
78 > Should've seen a large tweak for the first .53_rc5 run also, since it
79 > (essentially) would be a forced rewrite of the cache due to INHERITED
80 > vs _eclasses_ key changes (moving eclass_cache into the backend).
81
82 look like it is :)
83
84 >
85 > Not running anything additional via /etc/portage/modules I'd bet, but
86 > asking to verify also...
87
88 good bet, /etc/portage/modules does not exist on this box
89
90 >
91 > Meanwhile, thanks for testing; contrary to other results, but _any_
92 > regression I'm after.
93 > ~harring
94
95 No, thank you to work on this, every time I've tryed to dive in portage
96 I needed some day of hospital.
97
98 look also at this additional try:
99
100 ==== cp -a cache/* /dev/shm/
101 ==== mount -obind /dev/shm /usr/portage/metadata/cache/
102 ==== tar -c /usr/portage/* >/dev/null & time emerge --metadata
103 ==== ; Nth run; 2.0.53_rc5 patched
104
105 real 3m43.653s
106 user 0m12.937s
107 sys 0m9.817s
108
109 IMHO the "real" time of an emerge --metadata could be improved acting in
110 two ways:
111 1) preload as much as possible data (stats included) from disk before to
112 parse it
113 2) separating disk read from disk writes (i.e many disk read followed
114 by many disk writes followed ...)
115
116 some idea?
117
118 Fetching virtual information from a cache save thousand of disk reads
119 # find /var/db/pkg/ -name PROVIDE \
120 \( -exec echo -n {}\: \; -and -exec cat {} \; \) \
121 | egrep -v "PROVIDE:$"
122
123 not the same for use, it's only called seldom (at least on the run>=2)
124 # find /var/db/pkg/ -name USE \
125 \( -exec echo -n {}\: \; -and -exec cat {} \; \) \
126 | egrep -v "USE:$"
127
128 read behind the ebuilds ...
129
130 bla bla bla
131
132 cheers, francesco
133
134 P.S.
135 find ... PROVIDE ... isn't the best, because PROVIDE are multiline
136 files, but I don't know how to join the lines
137 --
138 gentoo-portage-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-portage-dev] Cache rewrite backport Brian Harring <ferringb@g.o>
Re: [gentoo-portage-dev] Cache rewrite backport Brian Harring <ferringb@g.o>