[Twisted-Python] Advise for heavy concurrency

Manlio Perillo manlio_perillo at libero.it
Thu Nov 29 02:31:10 MST 2007


Alec Matusis ha scritto:
> Here is one tip:
> 
> If you have a dual Xeon 5140 (4 cores) machine and run 4 twisted epoll servers in a similar (but not exactly similar situation), it chokes at 30000 clients.
> 
> The machine is CPU-bound, and the for loop that loops over clients to send your packets is a performance hog.
> We are now considering using pyrex for that for loop, or rewriting it with C and libevent.
> 

You can also consider nginx, if you want to write a server in C
(or in the D language).

It is a web server, but its core is usable as a framework for generic 
servers (in fact nginx has also a POP3/IMAP4 proxy server).

nginx has many appealing features, like integrated garbage collector, 
and multi process workers.



Manlio Perillo






More information about the Twisted-Python mailing list