Network performance
Roland Hedberg
roland at catalogix.se
Tue Aug 23 06:01:39 EDT 2005
23 aug 2005 kl. 10.14 skrev Michael Sparks:
> Roland Hedberg wrote:
>
>> I was surprised to find that the performance was equal to what
>> Twisted/XMLRPC did. Around 200 ms per set, not significantly less.
>>
>
> That should tell you two things:
> * Twisted/XMLRPC is as efficient as you can hand craft. (which is a
> good use reason for using it).
I already gathered that much :-)
> * That what you're measuring is overhead - and most likely of
> setup.
Not necessarily! If the number of client - server queries/responses
are large enough the effect of the setup time should be negligible.
Or making testes with different numbers of queries you should be able
to deduce the setup time.
> I'd measure the ping time between your two hosts.
>
> If your ping time is significantly lower - eg you're running on
> localhost - I'd suggest you translate your code to C (and/or post
> your code),
I did the tests on localhost!
And I did post the code!
So, I made another test. I used a server I have already written in C
and which I know quite well how fast it is.
Using a python client I've written that talks to this server, it
takes 0.8 s for the python client to start, connect and send
1000 queries. A C client is a bit faster but not a lot.
This is more in the order of what I'd like to have.
Hmm, not surprising this makes me suspect my python server
implementation :-/
-- Roland
More information about the Python-list
mailing list