[ZODB-Dev] RelStorage 1.5.0b1 dry-run > two phase pack, better pack lock behaviour
Martijn Pieters
mj at zopatista.com
Wed Feb 23 05:23:58 EST 2011
On Tue, Feb 22, 2011 at 22:51, Maurits van Rees
<m.van.rees at zestsoftware.nl> wrote:
> I wonder it it may help to set pack-gc to false during the first pack.
> According to the docs this is faster, though it of course leaves more
> unused objects behind. Set pack-gc to the default true value for
> subsequent packs. Theoretically this should make sure that the first
> pack will finish on time and leave an already smaller database; after
> the second pack the database is at its smallest.
That would be a good idea indeed.
Without GC enabled, it won't analyse object references. As a result,
the number of queries run during a non-GC pre-pack is far lower too,
so it's a lot easier on the database. Pre-pack becomes 5 queries,
essentially (3 inserts, 2 truncates), as opposed to 17 + batched
reference updates + batched pack state updates.
And with the 'easy' records cleared out with a non-GC run, presumably
queries during a GC run should be easier on the database as there is
less data to scan through.
--
Martijn Pieters
More information about the ZODB-Dev
mailing list