Optimizing sockets to 1000 requests/sec? (Was: Sockets and messaging services)

Duncan Grisby dgrisby at uk.research.att.com
Thu Nov 15 07:54:33 EST 2001


In article <Xns9159AE8C5388gmcmhypernetcom at 199.171.54.213>,
Gordon McMillan  <gmcm at hypernet.com> wrote:

>So 1000 / sec is quite possible, but you'll never get there with blocking 
>sockets.

This isn't a direct comparison, but I've done some experiments with
CORBA calls using omniORBpy. I did some tests with two 500MHz Pentium
3 machines running RedHat 6.2 Linux, connected by 100Mbit/s switched
Ethernet.

With client and server on the same machine, communicating via TCP
loopback, I get:

  Threads in client  Calls per second

         1              3122
         5              3145
        10              2825 / 2096
        20              2801 / 2988
        50              2739 / 2820
       100              2625 / 2342

between the two machines, the results are:

  Threads in client  Calls per second

         1              2314
         5              5033
        10              5035 / 5068
        20              4861 / 5001
        50              4570 / 4632
       100              4125 / 4258

There are two results for each test with > 5 threads, since by default
omniORB limits the number of TCP connections a client will open to a
particular server to 5. There are therefore only ever 5 threads active
in the server. The second figure in each test is the result of telling
the clients to open an unlimited number of TCP connections.

Each invocation is a request/reply, so a single threaded client across
the network is bound by the network latency; clients with more threads
allow there to be multiple calls in flight at once, so throughput is
better.

Anyway, as you can see, a target of 1000 calls per second is easy to
meet :-)

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --



More information about the Python-list mailing list