user1217050
user1217050

Reputation: 1

TCP IP Performance on the same machine

When I run a TCP server and client on the same machine what I am observing is that the client send time (that is timestampT1 , send() , timestampT2 ; timestampT2 - timestampT1 ) is significantly higher in the tail percentiles than if I run the same server on a different machine.

With all TCP parameters, software and machine specs being equal if client takes 10 mirco sec in the mean and 20-25 mircoseconds in the 90-99th percentile for 1 million sends in case of server and client on different boxes , it takes 10 microsec in the mean and 70-100 microseconds in the 90-99th percentile for server and client on same box.

I have tried playing with interuupt isolation, socket send buffer sizing and CPU pinning with no significant improvements. This is RHEL 5.6.

Any possible explanation for this ?

Upvotes: 0

Views: 1189

Answers (1)

synthesizerpatel
synthesizerpatel

Reputation: 28036

Heisenberg uncertainty principle in a broad sense. More specifically, if you have two programs on a computer where one is sending data and the other is analyzing it - then you're taxing the CPU with two tasks, where as if your monitoring program is running on a different computer - your sender has the benefit of not having to compete with anyone else and will always be faster.

Don't test network throughput with both programs on the same machine.

Upvotes: 2

Related Questions