3 Commits

Author SHA1 Message Date
Dan McGregor
26c0d09bfd Don't hardcode bash location
bash may not be installed in /bin, so don't make that assumption.

Change-Id: I04ae786c7558f829ddf9649c127cbba1457dcfd3
2015-08-26 09:03:24 -06:00
Brian Harring
c068f3343e git-exproll.sh: Return nonzero on errors.
This script needs a bit more analysis to make sure all pathways
are covered, but this CL fixes an obvious path.

Change-Id: I2a8404b7a6eecd5cedba3daa20f63917a8d18482
2013-05-24 15:20:56 +09:00
Martin Fick
43a4e17fbb Add an exponentially rolling garbage collection script
git-exproll is a git garbage collection script aimed
specifically at reducing exccessive garbage collection and
particularly large packfile churn for Gerrit installations.

Excessive garbage collection on "dormant" repos is wasteful
of both CPU and disk IO.  Large packfile churn can lead to
heavy RAM and FS usage on Gerrit servers when the Gerrit
process continues to hold open the old delete packfiles.
This situation is most detrimental when jgit is configured
with large caching parameters.  Aside from these downsides,
running git gc often can be very beneficial to performance
on servers.  This script attempts to implement a git gc
policy which avoids the downsides mentioned above so that
git gc can be comfortably run very regularly.

git-exproll.sh uses keep files to manage which files will
get repacked.  It also uses timestamps on the repos to
detect dormant repos to avoid repacking them at all.  The
primary packfile objective is to keep around a series of
packfiles with sizes spaced out exponentially from each
other, and to roll smaller packfiles into larger ones once
the smaller ones have grown.  This strategy attempts to
balance disk space usage with avoiding rewriting large
packfiles most of the time.

The exponential packing objective above does not save a
large amount of time or CPU, but it does prevent the
packfile churn.  Depending on repo usage, however the
dormant repo detection and avoidance can result in a very
large time savings.

Change-Id: I5e8c3cc02f6ca382d34f62af2cf12a9cb8ffd21e
2012-06-14 18:24:17 -06:00