git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: "Bernhard R. Link"  <brl+ccmadness@pcpool00.mathematik.uni-freiburg.de>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] Limit file descriptors used by packs
Date: Mon, 28 Feb 2011 12:44:06 -0800	[thread overview]
Message-ID: <20110228204406.GA26052@spearce.org> (raw)
In-Reply-To: <20110228203557.GA8189@pcpool00.mathematik.uni-freiburg.de>

"Bernhard R. Link" <brl+ccmadness@pcpool00.mathematik.uni-freiburg.de> wrote:
> * Shawn O. Pearce <spearce@spearce.org> [110228 21:27]:
> > By using a hard upper limit that is below the rlimit of the current
> > process, it is not necessary to check for EMFILE on every single
> > fd-allocating system call.  Instead reserving 8 file descriptors
> > makes it safe to assume the system call won't fail due to being
> > over limit in the filedescriptor limit.
> 
> Isn't 8 quite a bit low for a reserve? Couldn't some libc stuff
> (especially nss modules perhaps activated by something) easily surpass
> that?

Originally I proposed 25 to Junio, but he scoffed and said that
was quite high. So I went with 8, 3 for std{in,out,err} and 5 as
a WAG for everything else.

Its arbitrary, 25 might be a better WAG than 8...

-- 
Shawn.

  reply	other threads:[~2011-02-28 20:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-28 20:27 [PATCH] Limit file descriptors used by packs Shawn O. Pearce
2011-02-28 20:35 ` Bernhard R. Link
2011-02-28 20:44   ` Shawn O. Pearce [this message]
2011-02-28 20:38 ` Junio C Hamano
2011-02-28 20:47   ` Shawn O. Pearce
2011-02-28 20:52     ` [PATCH v2] " Shawn O. Pearce
2011-02-28 21:13       ` Erik Faye-Lund
2011-03-01 14:24     ` [PATCH] " Junio C Hamano
2011-03-01 14:58       ` Shawn Pearce
2011-03-02 18:01         ` [PATCH 2/1] sha1_file.c: Don't retain open fds on small packs Shawn O. Pearce

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=20110228204406.GA26052@spearce.org \
    --to=spearce@spearce.org \
    --cc=brl+ccmadness@pcpool00.mathematik.uni-freiburg.de \
    --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).