public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Wieland Gmeiner <e8607062@student.tuwien.ac.at>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.13-rc6 1/2] New Syscall: get rlimits of any process 	(update)
Date: 18 Aug 2005 18:39:27 +0200	[thread overview]
Message-ID: <p737jejtd1c.fsf@verdi.suse.de> (raw)
In-Reply-To: <1124381951.6251.14.camel@w2.suse.lists.linux.kernel>

Wieland Gmeiner <e8607062@student.tuwien.ac.at> writes:

> On Thu, 2005-08-18 at 04:05 +0200, Andi Kleen wrote:
> 
> > Is there a realistic use case where this new system call is actually useful
> > and solves something that cannot be solved without it?
> 
> As an example: It seems to be a common problem with numerous services to
> run out of available file descriptors. There are several workarounds to
> this problem, the most common seems to be increasing the systemwide max
> number of filedescriptors and restarting the service. If you google for
> e.g. 'linux "too many open files"' you get a bunch of mailing list
> support requests about that problem.

Consider a process that runs out of fds. If that happens it's already
too late - it lost some of its files and is probably in a inconsistent
state internally because usually error handling parts for such things
are not working very well. The best thing to do is to restart it.

The only way to handle it properly would be to constantly monitor the
process and then try to increase it shortly before it runs out of
fds. First there is no reliable race free way to do this, and if you
really do all this overhead then it's far easier to just increase the
max number of fds in the first place.

In short your new call doesn't solve the problem in a sufficient way.

The real fix probably would be to just increase the default limits
even further, possible coupled with more aggressive per user memory
management. The main reason these limits tends to too small
is to avoid a user to fill up kernel memory too much, and there
is no global "per user" accounting which accounts all memory
used by a user. If that was available the per process limit
could be raised much further.

And e.g.  on 64bit machines there tends to be more usable low mem for
these purposes anyways so even without additional accounting the 
limits could be higher there.

-Andi

       reply	other threads:[~2005-08-18 16:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1124326652.8359.3.camel@w2.suse.lists.linux.kernel>
     [not found] ` <p7364u40zld.fsf@verdi.suse.de.suse.lists.linux.kernel>
     [not found]   ` <1124381951.6251.14.camel@w2.suse.lists.linux.kernel>
2005-08-18 16:39     ` Andi Kleen [this message]
2005-08-18  0:57 [PATCH 2.6.13-rc6 1/2] New Syscall: get rlimits of any process (update) Wieland Gmeiner
2005-08-18  1:17 ` Chris Wright
2005-08-18  2:05 ` Andi Kleen
2005-08-18 16:19   ` Wieland Gmeiner
2005-08-18 16:40     ` James Morris
2005-08-18 17:49     ` Alan Cox
2005-08-19 17:11       ` Elliot Lee
2005-08-23  5:52       ` Ulrich Drepper
2005-08-18 18:17     ` Lee Revell
2005-08-18 23:13       ` Alan Cox
2005-08-18 23:16         ` Lee Revell
2005-08-19  0:29           ` Alan Cox
2005-08-19  0:15             ` Lee Revell
2005-08-22  5:15 ` Eric W. Biederman

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=p737jejtd1c.fsf@verdi.suse.de \
    --to=ak@suse.de \
    --cc=e8607062@student.tuwien.ac.at \
    --cc=linux-kernel@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