Debian Bug report logs -
#483804
Wish for git-gc cron job
Reply or subscribe to this bug.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#483804; Package etckeeper.
(full text, mbox, link).
Acknowledgement sent to "Trent W. Buck" <trentbuck@gmail.com>:
New Bug report received and forwarded. Copy sent to Joey Hess <joeyh@debian.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: etckeeper
Version: 0.15
Severity: wishlist
After running etckeeper for a few months, I noticed that /etc/.git
constituted four fifths of my /etc tree. Running git-gc significantly
improved this ratio. I wish etckeeper did this automatically via a
cron.monthly or cron.weekly script.
twb@Clio[etc]$ sudo du -sh . .git
45M .
40M .git
twb@Clio[etc]$ sudo git gc
Counting objects: 5722, done.
Compressing objects: 100% (4928/4928), done.
Writing objects: 100% (5722/5722), done.
Total 5722 (delta 2681), reused 0 (delta 0)
twb@Clio[etc]$ sudo du -sh . .git
13M .
7.4M .git
Pieter de Bie on Freenode's #git also suggested this.
I have no idea if it's a good idea to automate.
twb@Clio[etc]$ sudo git repack -adf --window=200
Counting objects: 5722, done.
Compressing objects: 100% (4928/4928), done.
Writing objects: 100% (5722/5722), done.
Total 5722 (delta 2795), reused 0 (delta 0)
twb@Clio[etc]$ sudo du -sh . .git
13M .
6.9M .git
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.25-2-686 (SMP w/1 CPU core)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages etckeeper depends on:
ii debconf [debconf-2.0] 1.5.22 Debian configuration management sy
ii git-core 1:1.5.5.1-1 fast, scalable, distributed revisi
ii mercurial 1.0-4 Scalable distributed version contr
etckeeper recommends no packages.
-- debconf information:
* etckeeper/unclean: true
etckeeper/commit_failed:
Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#483804; Package etckeeper.
(full text, mbox, link).
Acknowledgement sent to Joey Hess <joeyh@debian.org>:
Extra info received and forwarded to list.
(full text, mbox, link).
Message #10 received at 483804@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Trent W. Buck wrote:
> After running etckeeper for a few months, I noticed that /etc/.git
> constituted four fifths of my /etc tree. Running git-gc significantly
> improved this ratio. I wish etckeeper did this automatically via a
> cron.monthly or cron.weekly script.
Modern versions of git should automatically run git-gc once the number
of loose objects reaches a certian point, controlled by gc.auto. So a
cron job should only be necessary if you want to avoid git-gc being run
during a commit. (Which is sometimes annoying as it can be slow.. but
probably not for the small stuff in /etc.)
Perhaps etckeeper should set gc.auto to a smaller number than the
default, when initially setting up a repo, so that the repo is garbage
collected more often. The default value of 6700 is unlikely to be
reached quickly in /etc -- /etc just is not committed to enough, with
enough files changed, for 6700 lose copies of files to accumulate.
I'm thinking that 1/8th of the default might be a good choice. Or closer
to a good choice.
The other option, BTW, is to have etckeeper run git gc every time. I
recommend this for machines with less than a GB of disk, and there's an
example in the README of how to set this up.
> Pieter de Bie on Freenode's #git also suggested this.
> I have no idea if it's a good idea to automate.
>
> twb@Clio[etc]$ sudo git repack -adf --window=200
> Counting objects: 5722, done.
> Compressing objects: 100% (4928/4928), done.
> Writing objects: 100% (5722/5722), done.
> Total 5722 (delta 2795), reused 0 (delta 0)
> twb@Clio[etc]$ sudo du -sh . .git
> 13M .
> 6.9M .git
It will save more space, but repacks everything each time, so is more
something to run when you need to squeeze every last bit of space you
can, not something to run automatically.
--
see shy jo
[signature.asc (application/pgp-signature, inline)]
Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#483804; Package etckeeper.
(full text, mbox, link).
Acknowledgement sent to "Trent W. Buck" <trentbuck@gmail.com>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>.
(full text, mbox, link).
Message #15 received at 483804@bugs.debian.org (full text, mbox, reply):
On Sat, May 31, 2008 at 01:31:22PM -0400, Joey Hess wrote:
> Trent W. Buck wrote:
>> After running etckeeper for a few months, I noticed that /etc/.git
>> constituted four-fifths of my /etc tree. Running git-gc
>> significantly improved this ratio. I wish etckeeper did this
>> automatically via a cron.monthly or cron.weekly script.
>
> Modern versions of git should automatically run git-gc once the
> number of loose objects reaches a certian point, controlled by
> gc.auto. [...] Perhaps etckeeper should set gc.auto to a smaller
> number [...] so that the repo is garbage collected more often.
>
> I'm thinking that 1/8th of the default might be a good choice. Or closer
> to a good choice.
I defer to your judgement on this topic, since you clearly understand
git far better than I do.
>> twb@Clio[etc]$ sudo git repack -adf --window=200
>
> It will save more space, but repacks everything each time, so is more
> something to run when you need to squeeze every last bit of space you
> can, not something to run automatically.
OK.
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Tue Jan 9 18:45:34 2018;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.