On 2014-02-10 at 11:01 +0100, Lukas Tribus wrote:
> > same problem as mentioned here: 
> > 
> > http://comments.gmane.org/gmane.comp.web.haproxy/7172 
> 
> Same solution, use the mirrors:
>  http://master.formilux.org/git/people/willy/haproxy.git/
>  http://master.formilux.org/git/people/willy/haproxy-1.4.git/

(Bearing in mind that I'm not a git expert, just a user)

I looked at this last week, when cloning the repo; it took enough work
to get a current complete repo that I shoved a copy into
my daily-sync mirror, which is running in The Netherlands at:

 cgit web:  http://git.spodhuis.org/networking/haproxy.git/
    clone:  git://git.spodhuis.org/networking/haproxy.git

What I did notice was that is appeared that the upstream git repository
has never been garbage-collected or repacked.  This significantly adds
to the cumulative burden of load on the server.  The biggest benefit of
not repacking is that dumb clients which are fetching up-to-date can get
just the packs with the changes, but I suspect upstream will be much
happier both in CPU and bandwidth if the repo is put through a cleanup.

Cleaning up, a bare mirror is only 7.8MB.  Before cleanup, 82MB.  My
(limited) understanding is that the difference is all stale cruft which
is no longer referenced, but is part of packs which are sent in their
entirety.

My sledge-hammer approach to clean-up is "git-dessicate":
----------------------------8< cut here >8------------------------------
#!/bin/sh

SUBDIRECTORY_OK=true
[ -d /opt/local/bin ] && PATH="/opt/local/bin:$PATH"
. "$(git --exec-path)/git-sh-setup"

set -e

git fsck --full
git prune -v
git repack -a -d
----------------------------8< cut here >8------------------------------

Upstream might want to avoid the -d to repack, so that the old packs are
still around, to help out with dumb clients, but getting rid of all the
stale unreferenced objects in the packs which form a sufficient coverage
of "currently referenced" is likely to be Helpful.

There's also a "git gc" command, which overlaps with the above;
behaviour depends upon the version of git.

Regards,
-Phil

Reply via email to