1 |
On 2014-09-14 10:46, Michał Górny wrote: |
2 |
> Dnia 2014-09-14, o godz. 15:40:06 |
3 |
> Davide Pesavento <pesa@g.o> napisał(a): |
4 |
> > How long does the md5-cache regeneration process take? Are you sure it |
5 |
> > will be able to keep up with the rate of pushes to the repo during |
6 |
> > "peak hours"? If not, maybe we could use a time-based thing similar to |
7 |
> > the current cvs->rsync synchronization. |
8 |
> |
9 |
> This strongly depends on how much data is there to update. A few |
10 |
> ebuilds are quite fast, eclass change isn't ;). I was thinking of |
11 |
> something along the lines of, in pseudo-code speaking: |
12 |
> |
13 |
> systemctl restart cache-regen |
14 |
> |
15 |
> That is, we start the regen on every update. If it finishes in time, it |
16 |
> commits the new metadata. If another update occurs during regen, we |
17 |
> just restart it to let it catch the new data. |
18 |
> |
19 |
> Of course, if we can't spare the resources to do intermediate updates, |
20 |
> we may as well switch to cron-based update method. |
21 |
|
22 |
I don't see per push metadata regen working entirely well in this case |
23 |
if this is the only way we're generating the metadata cache for users to |
24 |
sync. It's easy to imagine a plausible situation where a widely used |
25 |
eclass change is made followed by commits less than a minute apart (or |
26 |
shorter than however long it would take for metadata regen to occur) for |
27 |
at least 30 minutes (rsync refresh period for most user-facing mirrors) |
28 |
during a time of high activity. |
29 |
|
30 |
I haven't run portage metadata regen on a beefy machine lately, but I |
31 |
don't think it could keep up in all cases. Perhaps someone can prove me |
32 |
wrong. |
33 |
|
34 |
Anyway, things could definitely be sped up if portage merges a few speed |
35 |
tweaks used in pkgcore. Specifically, I think using some of the weakref |
36 |
and perhaps jitted attrs support along with the eclass caching hacks |
37 |
would give a 2-4x metadata regen speedup. Otherwise pkgcore could |
38 |
potentially be used to regen metadata as well or some other tuned regen |
39 |
tool. |
40 |
|
41 |
Tim |