Sunil
Sunil

Reputation: 807

Suggestions to Increase tcp level throughput

we have an application requirement where we'll be receiving messages from around 5-10 clients at a rate of 500KB/sec and doing some internal logic then distrubuting the received messages among 30-35 other network entities.

What all the tcp level or thread level optimizations are suggested ?

Upvotes: 1

Views: 144

Answers (2)

superTyphoon
superTyphoon

Reputation: 150

Sometimes programmers can "shoot themselves in the foot". One example is attempting to increase a linux user-space application's socket buffer size with setsockopt/SO_RCVBUF. On recent Linux distributions, this deactivates auto-tuning of the receive window, leading to poorer performance than what would have been seen had we not pulled the trigger.

Upvotes: 1

Amardeep AC9MF
Amardeep AC9MF

Reputation: 19044

~4Mbits/sec (8 x 500KB/sec) per TCP connection is well within the capability of well written code without any special optimizations. This assumes, of course, that your target machine's clock rate is measured in GHz and isn't low on RAM.

When you get into the range of 60-80 Mbits/sec per TCP connection, then you begin to hit some bottlenecks that might need profiling and countermeasures.

So to answer your question, unless you're seeing trouble, no TCP or thread optimizations are suggested.

Upvotes: 0

Related Questions