git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Disabling Delta Compression on a fetch

From
Jeff King <peff@peff.net>
Date
Dec 8, 2011, 20:14 UTC
Message-ID
<20111208201443.GA8035@sigill.intra.peff.net>
In-Reply-To
<070681D4-F87B-435E-8A3B-144E59DE722B@cpanel.net>
On Thu, Dec 08, 2011 at 11:34:26AM -0600, Todd Rinaldo wrote:
Show 6 quoted lines
> 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
Previous: Junio C Hamano
Message 3 of 3 in “Disabling Delta Compression on a fetch”
  1. Todd RinaldoDec 8, 2011
  2. Junio C HamanoDec 8, 2011
  3. Jeff KingDec 8, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.