[Twisted-Python] RE: Question about Descriptors and SelectReactor

Alec Matusis matusis at yahoo.com
Tue Apr 7 14:17:25 EDT 2009


> However I am using Linux. The Twisted documentation is recommending
> that it may be better to use pollreactor

I would be actually quite curious to know the rationale of choosing select()
over epoll() these days.
epoll() scales like O(1) with the number of file descriptors, it is very
performant, stable, and has no limitation on the overall number of fds on
linux (except for your /proc and ulimit -n settings). I'd use epoll reactor,
unless you have some very specialized requirement.

> -----Original Message-----
> From: twisted-python-bounces at twistedmatrix.com [mailto:twisted-python-
> bounces at twistedmatrix.com] On Behalf Of Andrew Francis
> Sent: Tuesday, April 07, 2009 10:13 AM
> To: twisted-python at twistedmatrix.com
> Subject: [Twisted-Python] RE: Question about Descriptors and
> SelectReactor
> 
> 
> Hi Alec and Drew:
> 
> Thanks for answering my question. From reading an excerpt of Steven's
> "UNIX Network Programming," it implies that the FD_SETSIZE is defined
> in the kernel. If you want a bigger FD_SETSIZE, you need to recompile
> the kernel. At least that is the case in BSD 4.4 UNIX.
> 
> However I am using Linux. The Twisted documentation is recommending
> that it may be better to use pollreactor.
> 
> Cheers,
> Andrew
> 
> --- On Tue, 4/7/09, twisted-python-request at twistedmatrix.com <twisted-
> python-request at twistedmatrix.com> wrote:
> 
> > From: twisted-python-request at twistedmatrix.com <twisted-python-
> request at twistedmatrix.com>
> > Subject: Twisted-Python Digest, Vol 61, Issue 10
> > To: twisted-python at twistedmatrix.com
> > Date: Tuesday, April 7, 2009, 9:00 AM
> > Send Twisted-Python mailing list
> > submissions to
> >     twisted-python at twistedmatrix.com
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> >     http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
> > or, via email, send a message with subject or body 'help'
> > to
> >     twisted-python-request at twistedmatrix.com
> >
> > You can reach the person managing the list at
> >     twisted-python-owner at twistedmatrix.com
> >
> > When replying, please edit your Subject line so it is more
> > specific
> > than "Re: Contents of Twisted-Python digest..."
> >
> >
> > Today's Topics:
> >
> >    1. RE: Question about Descriptors and
> > SelectReactor (Alec Matusis)
> >    2. trac server error (Johann Borck)
> >
> >
> > ---------------------------------------------------------------------
> -
> >
> > Message: 1
> > Date: Mon, 6 Apr 2009 18:25:45 -0700
> > From: "Alec Matusis" <matusis at yahoo.com>
> > Subject: RE: [Twisted-Python] Question about Descriptors
> > and
> >     SelectReactor
> > To: "'Twisted general discussion'" <twisted-python at twistedmatrix.com>
> > Message-ID: <009701c9b71f$ca82aac0$5f880040$@com>
> > Content-Type: text/plain;
> > charset="utf-8"
> >
> > > I would say a function of the operating system - or
> > specifically
> > > ulimit on a *nix system.
> >
> > I do not think this is correct, on linux: ulimit -n is the
> > number of fds that can be written/read by a process, but the
> > 1024 limit on select is actually hard-compiled into the
> > kernel and can be changed only in the headers with kernel
> > recompilation.
> >
> > > -----Original Message-----
> > > From: twisted-python-bounces at twistedmatrix.com
> > [mailto:twisted-python-
> > > bounces at twistedmatrix.com]
> > On Behalf Of Drew Smathers
> > > Sent: Monday, April 06, 2009 8:40 AM
> > > To: Twisted general discussion
> > > Subject: Re: [Twisted-Python] Question about
> > Descriptors and
> > > SelectReactor
> > >
> > > On Sat, Apr 4, 2009 at 6:04 PM, Andrew Francis
> <andrewfr_ice at yahoo.com>
> > > wrote:
> > > >
> > > > Hi:
> > > >
> > > > Perhaps this question has been asked before but
> > is there a limit to
> > > the number of descriptors the SelectReactor can
> > handle? Is this a
> > > function of the operating system?
> > > >
> > >
> > > I would say a function of the operating system - or
> > specifically
> > > ulimit on a *nix system.
> > >
> > > -Drew
> > >
> > > _______________________________________________
> > > Twisted-Python mailing list
> > > Twisted-Python at twistedmatrix.com
> > > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
> 
> 
> 
> 
> 
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python






More information about the Twisted-Python mailing list