Re: Client and server on same computer


On 05/31/2007 09:55 AM, Daniel Janzon wrote:
> Dag Bakke wrote:
>> On 05/30/2007 08:09 PM, Daniel Janzon wrote:
>>  
>>> Hello!
>>>
>>> Does anyone know a neat way to run the iperf server and client on the
>>> same computer? The computer has two ethernet cards (eth0 and eth1). It
>>> would be nice to be able to test equipment using a single station.
>>>
>>>     
>> What exactly did you intend to test?
>>   
> 
> Wifi equipment.  I want to have a test station where you connect
> a wifi router on one interface and a wifi usb adapter on another.
> Then a button is clicked and test suite is run.
> 
>> You can run iperf within QEMU, and bridge the qemu instances to physical
>> ethernet ports. With qemu, you can have a bunch of virtual hosts.
>>
>>   
> 
> Say I associate eth0 with one virtual host and eth1 with another.
> Will not the traffic between the virtual hosts still bypass the
> physical cables between the interfaces and just run through the
> kernel of the machine hosting the virtual hosts?

No. Because the real host has no IPaddress associated with the
interfaces used by the virtual hosts. For QEMU, make sure you manually
set a unique MACaddress on the virtual interface.


>> For proper results, you probably need two separate hosts *doing nothing
>> but running iperf*. You don't want your results to be flawed because
>> your host cpu is busy doing something (anything) else. BTDTGTTS.
>>   
> 
> This would be a dedicated machine. If the speed of the ethernet
> card(s)  is significantly higher than the equipment under test,
> I don't see how it could be a problem using a single machine.


You may be in for a surprise. Any other traffic running over the same
PCI-bus as your network card or consuming CPU cycles will likely affect
your results negatively. What is the bandwidth of the bus the network
interface sits on, and what devices share that bus?

Even modern hardware can have problems filling a 100mbps link with small
packets. (Too many interrupts to handle.) Certain GbE interfaces
struggles really hard to receive 300 Mbps for any packetsize, and will
definitely not be able to transmit that much.


Benchmarking is tricky business. Some general advice:

- Figure out exactly what you want to measure, and under what conditions.
(bandwidth, latency, traffic-types, packet rate, interference, etc)

- Figure out a test which is repeatable and representative for the
scenario you are testing for.
(testing for VoIP with QoS? iperf -u -S 184 -l 200)

- Establish a baseline. (How well does my test tools perform when
shortcircuited?
(In this case: when running iperf between two dedicated machines
back-to-back.)

- Can/should I tune my tools?
(The IP stack has many tuneable parameters.)

- Make sure the bottleneck is in the equipment you want to test, not in
the test tools. At any point in time.

- Understand the limitations of your test tools and how they may affect
the results.


I got carried away.... Benchmarking can be fun.   :-)


Dag B.



Other Mailing lists | Author Index | Date Index | Subject Index | Thread Index