Bing 1.1.3

Unofficial Release

Table of Contents

  1. What is bing ?
  2. Infos on bing
  3. Installing bing
    1. Installing bing on Unix systems
    2. Installing bing on Windows systems
  4. How to use bing
  5. Measurement problems
  6. Packet loss evaluation
  7. Ethernet devices measurement
  8. Possible NTP influence
  9. Possible enhancements

1. What is bing ?

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 -
    François Berjon -
    Julien Boissinot -
    Stéphane Bortzmeyer -
    Jacques Caron -
    Laurent Chemla -
    René Cougnenc -
    Nat Makarevitch -
    Jean-Philippe Nicaise -
    Christian Perrier -
    Bertrand Petit -
    Philippe Regnauld -
    Ollivier Robert -
    Hervé Schauer -
    Christophe Wolfhugel -

Send virtual beers, bug reports, enhancements and flames to :
Pierre Beyssac -

2. Infos on bing

You can subscribe to the "bing-users" mailing list by sending a mail containing :

    subscribe bing-users

The posting address is

3. Installing bing

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.

3.1. Installing bing on Unix systems

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.

3.2. Installing bing on Windows systems

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

4. How to use bing

  1. using 'traceroute', find the IP adresses of the endpoints of the link you want to measure.
  2. try :
    bing -v point1 point2

    where 'point1' is the nearest endpoint. Option '-v' is useful to be warned of any routing problems.
  3. wait a little for the measure to stabilize.
  4. if after a while, the measurement looks weird (typically, negative or amazing throughputs) have a look at the indicated roundtrip times. If they are too small (below a few milliseconds), try to rerun bing with a bigger packet size :
    bing -S 1000 -v point1 point2

  5. CAUTION :
    Do not increase packet size too much, because this could trigger IP fragmentation / reassembly on the link to measure *or* on intermediate links, which messes up the measures completely.
    If you stay below 1400 bytes, you should be safe (except on SLIP links where you should not go over 1000). This depends on the MTU (maximum transmit unit) of the link.
  6. if, after increasing packet size, you still can't get stable results, try to use the -z option. This option fills packets will random data, defeating compressed links.
  7. if you still can't get anything reasonnable, the link you're trying to measure is probably a high-throughput link too far away (network- and throughput-wise) from you, or some weird animal (IP over X25, Frame Relay, ATM, satellite...).
  8. You can try to run bing from a better connected machine (with respect to the target link). If you can't, you can always try to think of a way (I'm sure there are) of improving bing to make it work anyway :-).
  9. Probably the best solution is to find something else to do (I leave it to your choice entirely, suggestions are : go for a walk, eat, drink, be elected).

5. Measurement problems

There are many cases in which the measurements may not be accurate (read: "plain wrong") :

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.

6. Packet loss evaluation

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.

7. Ethernet devices measurement

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.

8. Possible NTP influence

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.

9. Possible enhancements This page is hosted for free by