Bug 32382 - Raise default hard ulimit on number of files to 4096 or so
Summary: Raise default hard ulimit on number of files to 4096 or so
Status: CLOSED OBSOLETE
Alias: None
Product: Networking
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Arnaldo Carvalho de Melo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-31 20:12 UTC by Dan Kegel
Modified: 2012-05-12 14:48 UTC (History)
2 users (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Raise default hard ulimit on number of files to 4096 (1.74 KB, patch)
2011-03-31 21:28 UTC, Tim Gardner
Details | Diff

Description Dan Kegel 2011-03-31 20:12:14 UTC
Apps are increasingly using more than 1024 file descriptors.
See discussion in several distro bug trackers, e.g.
https://bugs.launchpad.net/bugs/663090
https://issues.rpath.com/browse/RPL-2054

You don't want to raise the default soft limit, since that might break
apps that use select(), but it's safe to raise the default hard limit;
that way, apps that know they need lots of file descriptors can raise their
soft limit without needing root, and without user intervention.

Ubuntu is doing this for 11.04 by changing include/asm-generic/resource.h:

-	[RLIMIT_NOFILE]		= {       INR_OPEN,       INR_OPEN },	\
+	[RLIMIT_NOFILE]		= {       INR_OPEN,     INR_OPEN*4 },	\

They chose to do this with a kernel change because they have a policy
of not changing kernel defaults in userland.

While 4096 might not be enough for *all* apps, it seems to be plenty
for the apps I've seen lately that are unhappy with 1024.
Comment 1 Andrew Morton 2011-03-31 20:24:33 UTC
Send it to lkml, please.  CC me and anyone else who might be interested.
Comment 2 Tim Gardner 2011-03-31 21:28:21 UTC
Created attachment 52812 [details]
Raise default hard ulimit on number of files to 4096

Submitted on lkml

Note You need to log in before you can comment on or make changes to this bug.