git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Sivakumar Selvam <gerritcode@gmail.com>, git@vger.kernel.org
Subject: Re: git repack command on larger pack file
Date: Tue, 27 Oct 2015 19:47:52 -0400	[thread overview]
Message-ID: <20151027234752.GC4172@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqq611ujfn0.fsf@gitster.mtv.corp.google.com>

On Sun, Oct 25, 2015 at 11:41:23PM -0700, Junio C Hamano wrote:

> Also it has to write more data to disk (see below), it has to find a
> good place to split, it has to adjust bookkeeping data at the pack
> boundary, in general it has to do more, not less, to produce split
> packs.  It would be surprising if it took less time.

This may go without saying, but the main cost in the write is that we
have to zlib deflate the output. I don't have any numbers at hand, but
when I've benchmarked serving fetches, it is often a balance game
between CPU time spent on a more aggressive delta search and CPU time
that goes into deflating the results of the search. Spending more CPU on
the former may yield more and smaller deltas which pay for themselves in
time spent on the latter.

There's definitely a balance point, and it varies from repo to repo, and
even within repos from fetch to fetch. I wish I had better heuristics to
report, but it's an ongoing thing I'm exploring. :)

-Peff

      parent reply	other threads:[~2015-10-27 23:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26  5:57 git repack command on larger pack file Sivakumar Selvam
2015-10-26  6:41 ` Junio C Hamano
2015-10-26  7:11   ` Junio C Hamano
2015-10-27  2:04     ` Sivakumar Selvam
2015-10-27 23:44       ` Jeff King
2015-10-28  6:23         ` Junio C Hamano
2015-10-28  6:47           ` Junio C Hamano
2015-10-27  8:52     ` Philip Oakley
2015-10-27 23:47   ` 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=20151027234752.GC4172@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=gerritcode@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).