[Twisted-Python] CPU choice for big twisted server.

matusis at matusis.com matusis at matusis.com
Thu Mar 15 11:05:20 MDT 2007


Yes, we are getting 2x dual core, to run 4 instances of the server per box
(they are load-balanced). 
Incidentally, does Twisted API have anything for load-balancing? We have
implemented it ourselves.

I will switch to epoll and report the load difference with poll here.

> -----Original Message-----
> From: twisted-python-bounces at twistedmatrix.com [mailto:twisted-python-
> bounces at twistedmatrix.com] On Behalf Of Andy Gayton
> Sent: Wednesday, March 14, 2007 6:46 PM
> To: Twisted general discussion
> Subject: Re: [Twisted-Python] CPU choice for big twisted server.
> 
> Alec Matusis wrote:
> > I am running a poll reactor with Twisted 2.2 on 2.6.11 kernel.
> > "top" currently shows 80-90% CPU utilization for this twistd process.
> > We have not switched to epoll Twisted 2.5 yet, although we are
> planning to.
> 
> Being async, a twisted server can only make use of a single processor.
> With dual core chips, it can only use one of the cores.
> 
> No matter what hardware you throw at it, you'll eventually max out that
> core.
> 
> If you're planning to scale out a lot more, you'll want to structure
> things so you can load balance several (1 process per core) twisted
> processes running the service.
> 
> cheers,
> Andy.
> 
> 
> _______________________________________________
> 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