Re: wrong parameters?
On Fri, 6 Feb 2004, Aldo Febro wrote:
> I was trying to send traffic from client -> server using the following specification:
> - constant streaming UDP traffic
> - payload size 160 bytes
> - sending 50 packets per seconds
> - let it run for 1 hour
> - format output in kbps
> - display report every 1 sec interval
> - iperf v 1.7, running on Windows 2000 box
> - client and server is separated by T1 running PPP
> On the server side, I use the following parameters:
> iperf -s -u -f k -i 1
This is a correct usage for the specified test.
> On the client side:
> iperf -c server_name -u -l 160 -n 50 -t 3600 -f k -i 1
This however is not what you want. First you are confused about the (-n)
option. There are 2 ways to signal the end of a test. Either after a
certain amount of time (-t) or after a certain amount of data is
transfered (-n). You are telling it to end after sending 50 bytes, but
then you tell it to run for 1 hour so it ignores (-n 50). Yes there is a
bug in the docs for the (-n) parameter that needs to get fixed or maybe it
was I forget, but it should be bytes not packets.
Second, Iperf's UDP transfer speed is controlled by only one parameter,
the bandwidth (-b) parameter. Also Iperf will only report application or
payload data. This is because it is anyone's guess as to the size of the
lower level headers. We can not determine if you are using ethernet or ATM
or something else. Or if your machine is adding IP options or something.
So if you want about 50 packets / second. Then you would specify:
iperf -c server_name -u -b 64k -l 160 -t 3600 -f k -i 1
Since, 50 pkts/s * 160 bytes/pkt = 8000 bytes/s * 8bits/byte = 64k (kilo
bits are measured with 1000 bits since that is what equipment is measured
> I got the following results from the server:
> [ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
>  0.0- 1.0 sec 127 KBytes 1043 Kbits/sec 2.438 ms 0/ 815 (0%)
>  1.0- 2.0 sec 128 KBytes 1052 Kbits/sec 2.444 ms 0/ 822 (0%)
>  2.0- 3.0 sec 128 KBytes 1052 Kbits/sec 2.353 ms 0/ 822 (0%)
> My problem:
> 1) iperf should only send 50 packets per second, but instead it sent around 800 packets per second
> 2) The bandwidth should be around 77kbps. But the reported bandwidth is 1043 Kbits/sec.
The above commandline should yield better results. If you want line level
throughput numbers you will have to adjust for the headers by taking Iperf
results and multiplying by 194/160, for the given situation only. You may
notice that during some reporting intervals there may be 50, 49, or 51
packets sent and this is due to scheduling and the granularity of the
> My calculation is as follows:
> L2 header (PPP) : 6 bytes
> IP header : 20 bytes
> UDP header : 8 bytes
> Payload size :160 bytes
> TOTAL packet size:194 bytes
> 50 packets per seconds * 194 bytes = 9700 bytes
> To put in in kbps = 9700 bytes * 8 = 77,600 bps (77kbps)
> So, I wonder whether my logic is correct? or the parameters used was
> wrong? or iperf is not the right tool to achieve this?
> Any input will be appreciated, and thanks in advance for any help on this!
Everything looks good, just got a little mixed up on the parameters. Iperf
will do this job and I don't know of anything that would be similar.