Patrick Lam <yahoo_mail@nospam_tom.com> wrote:
> I need to calculate the throughput of a TCP server having multiple
> connections running concurrently. I tried to add the number of
> bytes received per connection to a global variable to keep track of
> the total number of bytes received by the server. However, a
> printout of the global variable eventually only shows the number of
> bytes received per connection (because the number seems to be
> inversely proportional to the number of connections). I did use
> mutex to guard the global variable when I need to write things to
> it.
I presume you mean an application server being accessed via TCP
connections?
Can you expand a bit on the "eventually only shows" bit? Are you
ramping the number of TCP connections and comparing each time?
How do your rates compare with "link-rate" for your setup?
> What is happening here?
> How is this (i.e., calculating the throughput of a TCP server)
> usually done?
Summing the octets (bytes) as you assert you are doing. Some may look
at bytes received, some may look at bytes sent, some may look at both.
rick jones
--
firebug n, the idiot who tosses a lit cigarette out his car window
these opinions are mine, all mine; HP might not want them anyway...

feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...