[Twisted-Python] Twisted Web server (and possibly other applications) slow performance with many connections

Greg Lappen greg at paperfree.net
Wed Dec 17 08:31:39 EST 2003


Jp-

I can't tell if  you're being sarcastic or not.....

I was under the impression that twisted was designed for a large number 
of connections, but scales poorly if the application is CPU intensive.

Greg
On Dec 17, 2003, at 12:41 AM, Jp Calderone wrote:

> On Wed, Dec 17, 2003 at 06:26:09AM +0100, Michal Pasternak wrote:
>> Hi,
>>
>> I'm testing a bit the performance of Twisted Web, using puf(1) 
>> downloader
>> and loopback interface. Puf is something like wget(1), only it can do 
>> many
>> simultaneous connections. When the maximum connection no. is small (1 
>> - 40
>> connections at once), Twisted Web works very good, providing a 
>> reasonable
>> page generation time (thus, data transfer rate) and eating my CPU.
>>
>> But if I raise the simultaneous connection number to something above 
>> 40,
>> data transfer rate and CPU usage fall.
>>
>> Is it intended behaviour?
>
>   Yes.  Twisted was specifically designed to scale poorly with smallish
> numbers of concurrent connections.
>
>> I don't think I'll ever have to program a site, which has to serve 
>> more,
>> than 40 connections at once, but in case this happens, I'd like to 
>> know.
>>
>> Regards,
>> -- 
>> Michal Pasternak :: http://pasternak.w.lub.pl :: http://winsrc.sf.net
>>
>> _______________________________________________
>> 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