Re: Turn on git pack bitmaps?

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: PostgreSQL WWW <pgsql-www(at)postgresql(dot)org>
Subject: Re: Turn on git pack bitmaps?
Date: 2015-02-21 18:26:07
Message-ID: CABUevEzw2CaorLxnafYhCoSpGmAqO8Deam_dHjsd3hXH1uLYPg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

On Thu, Feb 19, 2015 at 5:01 PM, Andres Freund <andres(at)2ndquadrant(dot)com>
wrote:

> On 2015-02-19 16:50:56 +0100, Magnus Hagander wrote:
> > On Thu, Feb 19, 2015 at 4:41 PM, Andres Freund <andres(at)2ndquadrant(dot)com>
> > wrote:
> >
> > > Hi,
> > >
> > > Right now cloning/refreshing a repository often spends a fair amount of
> > > its time in the 'Counting objects' stage. Since git 2.0 git has a
> > > 'bitmap index' feature for packs. I wonder if that could be enabled on
> > > gitmaster/git.pg.o? Saves both time and CPU.
>
> > We do pretty strongly want to stick to the packaged versions of git (and
> > other software) to keep our work at reasonable levels. And right now,.
> only
> > 1.7 is packaged for Debian Wheezy which is what we run. 2.0 isn't even
> > available in backports. However, it will become 2.1 once we can migrate
> to
> > Jessie, but it's not released yet.
>
> Hm. I somehow thought 2.1 were in bpo ;)
>
> > So unless it's something really critical, which I don't think it is
> (though
> > it does sound like a nice convenience), I would suggest we wait until we
> go
> > to Jessie, and then enable it.
>
> It sure isn't critical, just saves some time/cpu (server side) every now
> and then.
>

Ok - then let's postpone it until we go jessie.

> # enable it everywhere
> > > git config --global pack.writebitmaps on
> > > git config --global pack.writeBitmapHashCache on
> > > git config --global pack.threads 0 # make gc/repack faster, autodetect
> cpus
> > >
> > > # and write it by repacking
> > > git gc --aggressive --no-prune
> > >
> > >
> > Is that something that would have to be done in a cronjob repeatedly, or
> > are you saying you have to run that once and then it'll be enabled for
> the
> > future?
>
> It'll stay enabled/in effect for the future. But it'd be a good idea to
> regularly schedule a repack independent of bitmaps - or enable automatic
> gc's on push (not sure which version made that available). Right now
> git.pg.o's postgresql.git is ~40MB bigger than my local one...
>

Well, it does them now and then, IIRC? We haven't set up a cronjob for it,
but I'm fairly certain I've gotten stuck with it doing GC during a commit
someitme...

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Tom Lane 2015-02-21 18:34:06 Re: Turn on git pack bitmaps?
Previous Message Alvaro Herrera 2015-02-19 16:33:35 archives: messages as attachments