1 |
On Tue, 5 Feb 2008 08:43:55 +0100 |
2 |
Christian Faulhammer <opfer@g.o> wrote: |
3 |
> > This will let package managers use a format other than VDB. A well |
4 |
> > designed replacement can shave a minute off cold cache command |
5 |
> > times. |
6 |
> |
7 |
> How much gain can be expected? |
8 |
|
9 |
There're two common operations that're really really slow (because they |
10 |
need lots of filesystem access) using VDB: turning a pkg into a cat/pkg |
11 |
and finding all PROVIDEd packages. A redesigned format can, for example, |
12 |
make the former a single filesystem operation and the latter a single |
13 |
directory read. |
14 |
|
15 |
If you're looking for numbers, you can see very roughly how long a VDB |
16 |
load takes off cold cache using: |
17 |
|
18 |
echo 2 | sudo dd of=/proc/sys/vm/drop_caches |
19 |
find /var/db/pkg/ -type f -not -name 'environment.bz2' \ |
20 |
| xargs cat >/dev/null |
21 |
|
22 |
A different on-disk format could avoid 90% of those filesystem accesses |
23 |
for many operations. |
24 |
|
25 |
There's a more subtle issue with VDB and the scope of locking required |
26 |
by multithreaded implementations. This one's not an issue for |
27 |
interpreted languages, but it's a minor nuisance in places where |
28 |
there's no language-induced locking. |
29 |
|
30 |
> And what package managers will allow native_built_with_use? |
31 |
|
32 |
I doubt Portage will, since if someone's going to make changes to |
33 |
Portage that'd let it use something other than VDB, they've clearly got |
34 |
enough time to implement use deps as a side project, which would make |
35 |
built_with_use obsolete. Paludis would certainly implement it -- we've |
36 |
already got a redesigned on-disk db format that we use for tracking |
37 |
unpackaged packages, and repurposing that to handle ebuilds wouldn't be |
38 |
very hard. |
39 |
|
40 |
Incidentally, if anyone is still thinking that built_with_use is |
41 |
fine... It doesn't handle IUSE defaults, which means package managers |
42 |
have to store a hacked version of IUSE in VDB for EAPI 1. This isn't |
43 |
documented anywhere and is highly unobvious. |
44 |
|
45 |
-- |
46 |
Ciaran McCreesh |