XMLRPC Server
Brian Quinlan
brian at sweetapp.com
Tue Feb 6 15:00:48 EST 2007
Fredrik Lundh wrote:
> well, if you're talking pure CGI, you need to start the interpreter,
> import the required modules, connect to the database, unmarshal the
> xml-rpc request, talk to the database, marshal the response, and shut
> down, in less than 30 milliseconds.
>
> just importing the CGI module (or the database module) can take longer
> than that...
The original performance specification was "...receive up to 2000 calls
per minute". I don't believe that means that a call has to be serviced
in under 30ms (wall-clock time) but total CPU time would have to be
<30ms in order to not fall behind under a constant 2000 requests/second
load. So we can probably remove database connection and communication
time (i.e. IO-bound components). Still, it's a lot tighter than I though
it would be:
% time python -c "import SimpleXMLRPCServer; import MySQLdb"
real 0m0.144s
user 0m0.046s
sys 0m0.064s
So it's already almost 4x too slow. But I'm running this on Ubuntu,
running on VMWare on my 1.6GHz Pentium-M laptop. I would assume that a
beefy server would do a lot better.
Cheers,
Brian
More information about the Python-list
mailing list