git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Todd Rinaldo <toddr@cpanel.net>
Cc: git@vger.kernel.org
Subject: Re: Disabling Delta Compression on a fetch
Date: Thu, 8 Dec 2011 15:14:43 -0500	[thread overview]
Message-ID: <20111208201443.GA8035@sigill.intra.peff.net> (raw)
In-Reply-To: <070681D4-F87B-435E-8A3B-144E59DE722B@cpanel.net>

On Thu, Dec 08, 2011 at 11:34:26AM -0600, Todd Rinaldo wrote:

> All of the git communication happens on 1 subnet all connected by a
> single gigabit switch. As I see it, the Delta Compression is actually
> a performance degradation in our environment.
> 
> The solution I've come up with is to set pack.window=0 in
> /etc/gitconfig on the gitorious server. 

An alternative is to mark the binary files as "-delta" with
gitattributes on the server. Then you will get the benefits of delta
compression for other files without bothering to try the binary files.

Note that git won't read the gitattributes file out of the tree in a
bare repository, so these attributes should go either in
$REPO/info/attributes (if they are repo-specific), or in
/etc/gitattributes (if they are in many repos).

I.e., something like:

  echo '*.bin -delta' >/etc/gitattributes

Also, before any of that, make sure that the upstream repos are fully
packed. Git will not try to delta two objects coming from the same pack
(since it will already have tried when they were entering the pack).
That by itself might be enough to solve your problem without any other
configuration.

> My question is: Are there are any unintended consequences of this
> approach anyone can think of?

Other than trading bandwidth, you are also trading space on the client
side, since each client will store the resulting pack.

-Peff

      parent reply	other threads:[~2011-12-08 20:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-08 17:34 Disabling Delta Compression on a fetch Todd Rinaldo
2011-12-08 20:10 ` Junio C Hamano
2011-12-08 20:14 ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111208201443.GA8035@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=toddr@cpanel.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).