Home/Misc | Wine | Bing | Distributed Computing | Fun | Links |
Bing is a point-to-point bandwidth measurement tool (hence the 'b'), based on ping.
Bing determines the real (raw, as opposed to available or average) throughput on a link by measuring ICMP echo requests roundtrip times for different packet sizes for each end of the link.
Suppose we are on host A and want to know the throughput between L1 and L2, two extremities of a point-to-point link.
A ----( the Internet )--- L1 --- L2
If we know the rtt (roundtrip time) between A and L1, and the rtt between A and L2, we can deduce the rtt between L1 and L2.
If we do that for two different packet sizes, we can compute the raw capacity (bps) of the link.
Note that bing can also be used to have an idea of ethernet cards performance.
Many thanks to the following people for their help, hints, support, and real beers :
Marc Baudoin - babafou@ensta.fr François Berjon - fcb@gwynedd.frmug.fr.net Julien Boissinot - jb@spia.freenix.fr Stéphane Bortzmeyer - bortzmeyer@cnam.fr Jacques Caron - jcaron@pressimage.net Laurent Chemla - laurent@brasil.frmug.fr.net René Cougnenc - rene@renux.frmug.fr.net Nat Makarevitch - nat@nataa.frmug.fr.net Jean-Philippe Nicaise - nicky@fdn.fr Christian Perrier - perrier@onera.fr Bertrand Petit - elrond@imladris.frmug.fr.net Philippe Regnauld - regnauld@tetard.freenix.fr Ollivier Robert - roberto@keltia.freenix.fr Hervé Schauer - herve@hsc.fr.net Christophe Wolfhugel - wolf@pasteur.fr
Send virtual beers, bug reports, enhancements and flames to :
Pierre Beyssac - pb@fasterix.freenix.fr
You can subscribe to the "bing-users" mailing list by sending a mail containing :
subscribe bing-usersto majordomo@freenix.fr.
The posting address is bing-users@freenix.fr
The provided source has been compiled and run on :
Linux 2.0.28 SunOS 4.1.3 SunOS 5 (Solaris 2.5) AIX 2 (BOSX 2 actually) OSF1 V2.0 (DEC Alpha) Windows 95 Windows NT 3.51 and 4.0 on i386
It is expected to compile and run with minor changes in the Makefile on many more platforms.
You should first edit the Makefile to adjust it to your system. There are few options and if your host is in the list above the lines to uncomment are already listed. If this is not the case you will have to make a few tries but it should not be very difficult. Send me the options that you had to change together with your "uname -s -r" so that I can add it to the list.
Then (on all systems) :
$ make $ su root # make install
bing, like ping, needs to be installed setuid root to be able to make its own ICMP packets.
To compile bing you must also get the icmp package. This is a package which provides the required include files and libraries to send and receive ICMP messages.
You may also have to modify the file makefile.nt so that ICMP_DIR points to the place where you have put the ICMP package.
Then the command below should be enough: nmake -f makefile.nt
There are options you may add to this command line to customise the result. All options are disabled by default:
and commands
There are many cases in which the measurements may not be accurate (read: "plain wrong") :
-----------------<--- | | | ( somewhere ) | ^ | | A ---( the Internet )--> L1 ---> L2
I have been objected that high-bandwidth links with dedicated routers might be impossible to measure, due to the way these devices work.
Fast routers are designed in such a way that, when receiving a packet, they decode the header as soon as possible, even before the packet is completely received. They can thus decide on an outgoing route for the packet and might even (I'm not sure about that) begin resending it before receiving it completely.
This should not directly interfere with ICMP ECHO_REQUEST packets because these packets must be locally processed and this is generally done entirely by software at a lower priority when the packet has been completely received.
Moreover, since bing only considers minimal round-trip times in its throughput calculations, you only have to expect that some ICMP ECHO_REQUESTs will be processed by the router as soon as they are received, which should happen often enough if the router is not saturated.
Knowing the packet losses on A-L1 and on A-L2, it should be possible to compute the loss between L1 and L2 :
A --- L1 --- L2 a b A-L1 packet loss = a A-L2 packet loss = ab L1-L2 packet loss = ab / a
Bing attempts to calculate it, but the results are generally not significant.
This might sound surprising, since ethernet throughput is known to be 10Mbps !
By running bing between two machines on an ethernet, you can evaluate the CPU overhead induced by memory copies and polled I/O.
For example, between two Sparc 2 running SunOS 4.1.3, I generally get around 9Mbps. Between two PCs running FreeBSD with NE2000 clones, expect around 4 or 5Mbps (or a little more depending on processor speed). Between two PCs with 3C509 cards, I get about 7Mbps.
Though I never got any evidence of it, it is possible that running bing on a NTP-synchronized machine introduces a bias in the measurements, when the NTP daemon makes a small correction while bing is waiting for an echo reply packet (almost all the time).
I suppose this should mainly have an effect when measuring fast and far away links, which are difficult or impossible to measure anyway.
Home/Misc | Wine | Bing | Distributed Computing | Fun | Links |
fgouget@free.fr | This page is hosted for free by Free.fr |