Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #15673 > unrolled thread

Re: Py2.7/FreeBSD: maximum number of open files

Started byChristian Heimes <lists@cheimes.de>
First post2011-11-14 17:25 +0100
Last post2011-11-14 17:25 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Py2.7/FreeBSD: maximum number of open files Christian Heimes <lists@cheimes.de> - 2011-11-14 17:25 +0100

#15673 — Re: Py2.7/FreeBSD: maximum number of open files

FromChristian Heimes <lists@cheimes.de>
Date2011-11-14 17:25 +0100
SubjectRe: Py2.7/FreeBSD: maximum number of open files
Message-ID<mailman.2699.1321287931.27778.python-list@python.org>
Am 14.11.2011 16:57, schrieb Tobias Oberstein:
> I am trying to convince Python to open more than 32k files .. this is on FreeBSD.
> 
> Now I know I have to set appropriate limits .. I did:
> 
> $ sysctl kern.maxfiles
> kern.maxfiles: 204800
> $ sysctl kern.maxfilesperproc
> kern.maxfilesperproc: 200000
> $ sysctl kern.maxvnodes
> kern.maxvnodes: 200000
> $ ulimit
> unlimited
> 
> Here is what happens with a Python freshly built from sources .. it'll tell me I can open 200k files .. but will bail out at 32k:

I'm not familiar with BSD but Linux has similar Kernel options. The
kernel options might be *global* flags to set the total upper limit of
open file descriptors for the entire system, not for a single process.
Also on Linux "ulimit" doesn't display the fd limit. You have to use
"ulimit -n".

Why do you need more than 32k file descriptors anyway? It's an insanely
high amount of FDs. Most programs need less than 100 and the default
value of 1024 on my Linux servers is usually high enough. I've never
increased the fd limit over 8192 and our biggest installation servers
more than 80 TB data in about 20 to 25 million files.

Christian

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web