Project

General

Profile

Actions

Bug #3772

closed

consider raising default descriptor soft limit

Added by Rich Lowe over 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
2013-05-17
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

We by default have the rlimit file descriptor soft limit set to 256 (or at least, that's what it is on my systems). This seems to be, probably, how OSX defaults also. Linux seems to default to 1024.

I have a handful of times recently been screwed by software that hits this limit ungracefully, most notably git. More graceful software is most gracefuly by increasing the soft limit to match the hard, expecting Solaris-like systems to have low limits. There are several things in pkgsrc with accompanying patches to either increase the soft limit, or to make soft == hard

Perhaps it is time we considered, (and I do mean that, not do it blindly) upping the default.

Actions #1

Updated by Rich Lowe over 10 years ago

SmartOS patches the limit (via the default /etc/system) such that soft == hard by default, at 65536

Actions #2

Updated by Joshua M. Clulow over 10 years ago

Experimentally, on Mac OS X 10.8, I can set the soft limit as high as 10240 (0x2800) as a regular user or 12288 (0x3000) as root.

The default soft limit appears to be 2560. The default hard limit is "unlimited", though there is clearly a specific upper bound that is different for root and non-root users.

Actions #3

Updated by Rich Lowe over 10 years ago

  • Status changed from New to In Progress
Actions #4

Updated by Rich Lowe almost 10 years ago

This stalled because of complicates related to select(), range-checking of fd_set, and differences in implementation.

I have a plan to happily deal with this, and am back on it.

Actions #5

Updated by Electric Monk over 6 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 2209d3c850d80c0681948f966816f28f767575cb

commit  2209d3c850d80c0681948f966816f28f767575cb
Author: Richard Lowe <richlowe@richlowe.net>
Date:   2017-01-25T17:40:33.000Z

    3772 consider raising default descriptor soft limit
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Juraj Lutter <juraj@lutter.sk>
    Reviewed by: Patrick Mooney <pmooney@pfmooney.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Actions

Also available in: Atom PDF