Project

General

Profile

Feature #286

Default ulmits should be upped

Added by Alasdair Lumsden almost 9 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Low
Category:
OS/Net (Kernel and Userland)
Target version:
-
Start date:
2010-09-30
Due date:
2011-09-14
% Done:

100%

Estimated time:
4.00 h
Difficulty:
Medium
Tags:
needs-triage

Description

root ~ (pkgdev.openindiana): ulimit -a
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
open files                      (-n) 256
pipe size            (512 bytes, -p) 10
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 29995
virtual memory          (kbytes, -v) unlimited

Thankfully it is no longer 1988. So I'd propose the conservative open files limit be upped to something more sane, such as 32768 (or 1024 at an absolute minimum).

256 is very low and encountered quickly.

History

#1

Updated by Albert Lee almost 9 years ago

Alasdair Lumsden wrote:

Thankfully it is no longer 1988. [...]

That takes us down the slippery slope of http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4204054 and its kin. :)

#2

Updated by Alasdair Lumsden almost 9 years ago

Albert Lee wrote:

Alasdair Lumsden wrote:

Thankfully it is no longer 1988. [...]

That takes us down the slippery slope of http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4204054 and its kin. :)

The slippery slope of progress? :D

Do you have any arguments against increasing the default or would you generally be in favour? I can't think of any serious consequences.

The only one I did think of is I have seen some software in the past that as a security measure runs close() against all file descriptors after being launched, starting at 3 and stopping at the highest file descriptor number. Upping the from 256 to a large value would increase the number of system calls the app makes at launch from 256ish to the new value.

#3

Updated by Alasdair Lumsden almost 9 years ago

Some defaults from other OSen for ulimit -n:

MacOS: 2560
CentOS 5: 1024
Debian 5: 1024
Ubuntu 10: 1024
FreeBSD 8: Reports of 11095 and 112500 (is it autoscaling?)

Normal server hardware these days tends to have 8GB+ and at least Quad core CPUs. People generally will run large apps with lots of open files, and it'd be good for these to work out of the box without requiring tweeks.

I can't see any reason why setting this to a value such as 4096 would cause issues. Certainly modest Apache/MySQL installs will hit 256 open files very quickly. Users can revise down the limit if they wish.

#4

Updated by Sevan Janiyan almost 9 years ago

Alasdair Lumsden wrote:

Some defaults from other OSen for ulimit -n:

MacOS: 2560

Is that zero a typo on the end?
From Tiger & Leopard Server through to Snow Leopard, open files limit is reported as 256 for me.

#5

Updated by Guido Berhörster almost 9 years ago

  • Tracker changed from Bug to Feature
#6

Updated by Julian Wiesener over 8 years ago

  • Category set to OS/Net (Kernel and Userland)
  • Assignee set to Julian Wiesener
  • Difficulty set to Medium
  • Tags set to needs-triage

Currently the way to go would be to execute ulimit commands in /etc/default/login or /etc/profile (both SUNWcs). We should discuss default limits with illumos since it might be unnecessary to go an individual OI patch to implement this.

Also i would prefere if we just add a /etc/default/limits for these configurations.

#7

Updated by Julian Wiesener about 8 years ago

  • Assignee deleted (Julian Wiesener)

apparently i'm not working at the bug

#8

Updated by Ken Mays about 8 years ago

  • Status changed from New to Feedback
  • Target version set to oi_151_stable
#9

Updated by Ken Mays about 8 years ago

  • Due date set to 2011-09-14
  • Assignee set to OI illumos
  • Estimated time set to 8.00 h
#10

Updated by Alasdair Lumsden about 8 years ago

  • Assignee changed from OI illumos to Alasdair Lumsden
  • Estimated time changed from 8.00 h to 4.00 h

I'll work on this when I have some spare time.

Basically I need to do some more research.

#11

Updated by Aurélien Larcher about 5 years ago

Hi,
On current hipster 2014.01 the limit of open files has been raised to 1024:

alarcher@phainos> ulimit -a
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 10
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 29995
virtual memory (kbytes, -v) unlimited

Should this ticket be closed ?

#12

Updated by Ken Mays almost 5 years ago

  • Status changed from Feedback to Closed
  • Target version deleted (oi_151_stable)
  • % Done changed from 0 to 100

Hipster 2014.1 resolves this issue (SunOS openindiana 5.11 illumos-7802d7b i86pc i386 i86pc Solaris, see above). Closing ticket.

Also available in: Atom PDF