From: Sebastian Leske <Sebastian.Leske@sleske.name>
To: git@vger.kernel.org
Subject: Re: Multiple threads of compression
Date: Mon, 26 Nov 2012 08:23:47 +0100 [thread overview]
Message-ID: <20121126072347.GA25752@localhost> (raw)
In-Reply-To: <loom.20121125T171702-64@post.gmane.org>
Hi,
[Thorsten Glaser <tg@debian.org>, 2012-11-25 17:27]:
> On a multi-core machine, the garbage collection of git, as well
> as pack compression on the server side when someone clones a
> repository remotely, the compression is normally done automatically
> using multiple threads of execution.
>
> That may be fine for your typical setups, but in my cases, I have
> two scenarios where it isn’t:
>
> ⓐ The machine where I want it to use only, say, 2 of my 4 or 8 cores
> as I’m also running some VMs on the box which eat up a lot of CPU
> and which I don’t want to slow down.
> ⓑ The server VM which has been given 2 or 3 VCPUs to cope with all
> the load done by clients, but which is RAM-constrained to only
> 512 or, when lucky, 768 MiB. It previously served only http/https
> and *yuk* Subversion, but now, git comes into the play, and I’ve
> seen the one server box I think about go down *HARD* because git
> ate up all RAM *and* swap when someone wanted to update their clone
> of a repository after someone else committed… well, an ~100 MiB large
> binary file they shouldn’t.
unfortunately I can't really speak to the git side of things, but both
of these cases just sound like standard resource starvation. So why
don't you address them using the usual OS mechanisms?
If you want to prevent git from sucking up CPU, nice(1) it, and if it
eats too much RAM, use the parent shell's ulimit mechanism.
Granted, this might also require some changes to git, but wouldn't that
be a simpler and more general approach to solving starvation problems?
prev parent reply other threads:[~2012-11-26 22:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-25 16:27 Multiple threads of compression Thorsten Glaser
2012-11-26 2:37 ` Brandon Casey
2012-11-26 9:59 ` Thorsten Glaser
2012-11-26 7:23 ` Sebastian Leske [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=20121126072347.GA25752@localhost \
--to=sebastian.leske@sleske.name \
--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).