public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Ciaran McCreesh <ciaran.mccreesh@blueyonder.co.uk>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Re: VDB access
Date: Tue, 5 Feb 2008 19:02:24 +0000	[thread overview]
Message-ID: <20080205190224.59268128@snowcone> (raw)
In-Reply-To: <20080205084355.45ade352@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 1947 bytes --]

On Tue, 5 Feb 2008 08:43:55 +0100
Christian Faulhammer <opfer@gentoo.org> wrote:
> > This will let package managers use a format other than VDB. A well
> > designed replacement can shave a minute off cold cache command
> > times.
> 
>  How much gain can be expected?

There're two common operations that're really really slow (because they
need lots of filesystem access) using VDB: turning a pkg into a cat/pkg
and finding all PROVIDEd packages. A redesigned format can, for example,
make the former a single filesystem operation and the latter a single
directory read.

If you're looking for numbers, you can see very roughly how long a VDB
load takes off cold cache using:

echo 2 | sudo dd of=/proc/sys/vm/drop_caches
find /var/db/pkg/ -type f -not -name 'environment.bz2' \
    | xargs cat >/dev/null

A different on-disk format could avoid 90% of those filesystem accesses
for many operations.

There's a more subtle issue with VDB and the scope of locking required
by multithreaded implementations. This one's not an issue for
interpreted languages, but it's a minor nuisance in places where
there's no language-induced locking.

> And what package managers will allow native_built_with_use?

I doubt Portage will, since if someone's going to make changes to
Portage that'd let it use something other than VDB, they've clearly got
enough time to implement use deps as a side project, which would make
built_with_use obsolete. Paludis would certainly implement it -- we've
already got a redesigned on-disk db format that we use for tracking
unpackaged packages, and repurposing that to handle ebuilds wouldn't be
very hard.

Incidentally, if anyone is still thinking that built_with_use is
fine... It doesn't handle IUSE defaults, which means package managers
have to store a hacked version of IUSE in VDB for EAPI 1. This isn't
documented anywhere and is highly unobvious.

-- 
Ciaran McCreesh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2008-02-05 19:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-05  1:05 [gentoo-dev] VDB access Ciaran McCreesh
2008-02-05  7:43 ` [gentoo-dev] " Christian Faulhammer
2008-02-05 19:02   ` Ciaran McCreesh [this message]
2008-02-06  6:43     ` Petteri Räty
2008-02-06 17:09       ` Ciaran McCreesh
2008-02-05 21:21 ` [gentoo-dev] " Zac Medico
2008-02-06  6:30   ` Vlastimil Babka
2008-02-06  7:49     ` Zac Medico
2008-02-06 13:24     ` Michael Haubenwallner
2008-02-06 18:16       ` Ciaran McCreesh
2008-02-06 17:14   ` Ciaran McCreesh
2008-02-07  7:41     ` Zac Medico
2008-02-08  9:54       ` Ciaran McCreesh
2008-04-10  8:07 ` Rémi Cardona

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080205190224.59268128@snowcone \
    --to=ciaran.mccreesh@blueyonder.co.uk \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox