The use of tcp/ip pooling

Hello I have made a java multi-threaded program
which uses the XML wrapped classes to call a natural program that wait for 1 sec.
I tried to call from 5 threads in thru the broker where more than 5 Natural RPC instances are active.

I tried to work with a poolsize of 0 and with a poolsize of 10 and compared the average response time of 50 calls within the same thread and that from 5 threads.

The response time with poolsize of 10 was
1147 ms to 1192 ms. The response time with a poolsize of 0 was 1116 to 1182. So poolsize of 0 was a better.

Any explanation ?

I had some offline conversations with Jose regarding this topic and ran some test using his programs.
It turned out that the timing differences are probably caused by having too many parallel threads/processes running on the same machine.

To get a better idea of the performance implications of socket pooling I modified the Java client and server examples of EntireX. Instantiating the Broker object (as well as the BrokerService object) is now inside the inner loop.

Both the client and the server are running on the same Windows 2000 machine while the Broker is running on a different Windows 2000 machine is.

The average response time for 1 non-conversational call (total number of calls 1000)
is 2 ms when socket pooling is enabled and more then 400 ms when socket pooling is disabled.

This is not too surpising because in the first case 1 socket is used for all calls but in the second case 1000 socket connections are established and closed.

Kind regards,