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

2011-11-30 Thread Chris Torek
In article mailman.2711.1321299276.27778.python-l...@python.org Christian Heimes li...@cheimes.de wrote: Am 14.11.2011 19:28, schrieb Tobias Oberstein: Thanks! This is probably the most practical option I can go. I've just tested: the backported new IO on Python 2.7 will indeed open 32k

Py2.7/FreeBSD: maximum number of open files

2011-11-14 Thread 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: 20 $ sysctl kern.maxvnodes kern.maxvnodes: 20 $ ulimit

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

2011-11-14 Thread Christian Heimes
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: 20

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

2011-11-14 Thread Tobias Oberstein
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.

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

2011-11-14 Thread Christian Heimes
Am 14.11.2011 17:36, schrieb Tobias Oberstein: This is a dedicated machine doing nothing else .. I'm monitoring global FD usage sysctl kern.openfiles and it's way beyond the configured limit $ ulimit -n 20 Apparently you did everything right here. Well, it was worth the try. ;)

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

2011-11-14 Thread Tobias Oberstein
I need 50k sockets + 100 files. Thus, this is even more strange: the Python (a Twisted service) will happily accept 50k sockets, but as soon as you do open() a file, it'll bail out. A limit of 32k smells like a overflow in a signed int. Perhaps your system is able and configured to

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

2011-11-14 Thread Christian Heimes
Am 14.11.2011 18:03, schrieb Tobias Oberstein: This is unbelievable. I've just tested: the bug (in libc) is still there on FreeBSD 8.2 p3 ... both on i386 _and_ amd64. Now I'm f***d;( A last chance: is it possible to compile Python for not using libc fopen(), but the Posix open()?

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

2011-11-14 Thread Jon Clements
On Nov 14, 5:03 pm, Tobias Oberstein tobias.oberst...@tavendo.de wrote: I need 50k sockets + 100 files. Thus, this is even more strange: the Python (a Twisted service) will happily accept 50k sockets, but as soon as you do open() a file, it'll bail out. A limit of 32k smells like

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

2011-11-14 Thread Tobias Oberstein
I need 50k sockets + 100 files. Thus, this is even more strange: the Python (a Twisted service) will happily accept 50k sockets, but as soon as you do open() a file, it'll bail out. A limit of 32k smells like a overflow in a signed int. Perhaps your system is able and

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

2011-11-14 Thread Christian Heimes
Am 14.11.2011 18:46, schrieb Tobias Oberstein: I just confirmed that the bug is even there for FreeBSD 9 RC1 ! This is most unfortunate. Seriously. W00t, that sucks! You could migrate to another BSD (NetBSD) or Linux ... :) I am running out of options, since I am willing to make my stuff

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

2011-11-14 Thread Tobias Oberstein
I just confirmed that the bug is even there for FreeBSD 9 RC1 ! This is most unfortunate. Seriously. W00t, that sucks! You could migrate to another BSD (NetBSD) or Linux ... :) No, thanks;) I am running out of options, since I am willing to make my stuff Python 3 compatible, but

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

2011-11-14 Thread Christian Heimes
Am 14.11.2011 19:28, schrieb Tobias Oberstein: Thanks! This is probably the most practical option I can go. I've just tested: the backported new IO on Python 2.7 will indeed open 32k files on FreeBSD. It also creates the files much faster. The old, non-monkey-patched version was getting