[Twisted-Python] dramatic slowdown in pbbenchclient.py / pbbenchserver.py

russ russt at agilityfund.com
Wed Jan 26 11:48:48 MST 2005


Hello, there's a dramatic slowdown in the number of calls per second in 
the pbbenchclient.py /  pbbenchserver.py programs 
(http://twistedmatrix.com/documents/current/examples/) if I just change 
the number of deferred calls from two to three, and make the connection 
between two different computers.  With the stock program, I get around 
900 cps, with the modified one, I get around 5 cps.  I'm a newbie, so 
maybe something is going on that I'm not understanding.  Anyway, here 
are the pseudo-diffs in pbbenchclient.py:

<< hostname = 'localhost'
 >> hostname = '192.168.0.2'

and

<< d1 = self.persp.callRemote("simple")
<< d2 = self.persp.callRemote("complexTypes")
<< defer.DeferredList(l).addCallback(self.callLoop)

 >> l=[self.persp.callRemote("simple") for x in range(3)]
 >> defer.DeferredList(l).addCallback(self.callLoop)

The slowdown only appears between two different computers.  If I run it 
on a single computer I get 700 cps.  If I run it between two separate 
computers but with one or two simultaneous deferreds, then there's only 
a very minor slowdown.  I'm running on windows 2000 with 
Twisted-1.3.0.win32-py2.3.exe. 

What do you think?  Is this a strange behaviour of twisted or is there 
something screwed up with my networking?

Cheers, -Russ






More information about the Twisted-Python mailing list