
Nov. 29, 2007
9:31 a.m.
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