git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ebbo <david.ebbo@gmail.com>
To: git@vger.kernel.org
Subject: Seeing high CPU usage during git-upload-pack
Date: Wed, 9 May 2012 00:01:37 -0700	[thread overview]
Message-ID: <CAPeUw3EsFCxki6obAAeVBb0g4MKNWBteL3VueG5djbajkFiv3A@mail.gmail.com> (raw)

We’re using git-upload-pack in a simple git server. When the repo is
on a slow share, we’re noticing that git-upload-pack is hugging the
CPU during the whole pack-objects operation.

More details:

- git-upload-pack gets launched (with params git-upload-pack
--stateless-rpc //path/to/repo)
- it itself launches a git process (with params pack-objects --revs
--all --stdout --progress --delta-base-offset). This git process is
the one that does all the disk I/O, but it's not the one using up the
CPU time.
- git-upload-pack appears to be waiting for the git process, and is at
high CPU during that time, suggesting that it's doing some kind of
busy wait. To further test that, I stopped the git process in the
debugger, preventing it from making progress. At that point,
git-upload-pack pegs the CPU forever.

Would someone familiar with the sources be able to comment on this
busy wait behavior, and on whether it could conceivably be done in a
way that doesn’t use up some much CPU?

Thanks,
David

             reply	other threads:[~2012-05-09  7:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09  7:01 David Ebbo [this message]
2012-05-09 10:37 ` Seeing high CPU usage during git-upload-pack Nguyen Thai Ngoc Duy
     [not found]   ` <CAPeUw3HCkKKBP6RnZzR0TYOO0hHtJ4_ma-Je4a-xKhPpNPJhHw@mail.gmail.com>
2012-05-09 15:11     ` Nguyen Thai Ngoc Duy
2012-05-10 20:41       ` David Ebbo

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=CAPeUw3EsFCxki6obAAeVBb0g4MKNWBteL3VueG5djbajkFiv3A@mail.gmail.com \
    --to=david.ebbo@gmail.com \
    --cc=git@vger.kernel.org \
    /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).