Algorithm - UDP Throughput Calculation
- From: "mastermagrath" <mbaxter1@xxxxxxxxxx>
- Date: 17 Nov 2005 05:44:32 -0800
Hi all,
Wonder can anyone help. After using perl happily i am turning my
attention to Java as a better language for GUI development. However i
came across a strange thing that i'm sure i'll come up against in Java
given that i'll be using the same algorithm. I had written a udp tool
that streams x packets/sec of x bytes long to a server i also wrote.
The server basically listens to the relevent port and calculates the
average receive rate of the UDP packets.
The way i did this in the server was to essentially take a time tick
when the first packet was received - the start time. Using an averaging
window of 10 packets, once the 10th packet is received (not including
the very first one) the time is ticked again. The elapsed time is then
the difference in the 2 ticks. The received throughput is then the
total number of bytes in the 10 packets divided by the elapsed time.
When i run this it works fine and the transmit rate versus the received
rate match up pretty well for any packet size. The trouble is as i
increase the sent packet rate the calculated receive rate in the server
gets progressively less than the real throughput. There are no dropped
packets however. So lets say i choose a send rate of 1000 bytes/sec by
sending
1 x 1000byte UDP packet every second, the measured rate at the server
is very close.
If i keep the same rate but this time use 20 x 50byte UDP packets every
second the measured rate is much lower abut again i know there are no
dropped packets.
I guess my question is, is there a particular algorithm programmers use
to calculate this?
Thanks in advance
.
- Follow-Ups:
- Re: Algorithm - UDP Throughput Calculation
- From: Roedy Green
- Re: Algorithm - UDP Throughput Calculation
- From: Gordon Beaton
- Re: Algorithm - UDP Throughput Calculation
- Prev by Date: Re: Differences between C++ and Java
- Next by Date: Re: Deserialization bug: NullPointerException thrown during HashMap.hash()
- Previous by thread: non static compile time constant .vs. static in tomcat
- Next by thread: Re: Algorithm - UDP Throughput Calculation
- Index(es):
Relevant Pages
|