Embedded TCP/IP stack  3.9.4
FNET Throughput Benchmark Quick Start

FNET project comes with the throughput benchmark tool for measuring TCP and UDP performance between two systems. It`s also possible to use it for stress tests.
The throughput benchmark uses the transmitter and receiver application. The responsibility of the transmitter is to push packets to the network as soon as possible while the responsibility of the receiver is to receive packets as soon as possible. Receiver is acting as a server and transmitter is acting as a client.

A user is able to specify a used protocol (TCP or UDP), message size, number of messages to be sent, local/remote IP address, listening/remote port, message interval (in microseconds), thread priority and other parameters.

Requirements

Tools used during this quick start:

Step by step

Follow these steps to run the FNET Throughput benchmark:

  • Prepare your evaluation board according to your board User Manual.
  • Use USB or RS-232 male/female DB-9 serial cable to connect your PC (through COM port) to the evaluation board.
  • Connect the evaluation board to an Ethernet network.
  • Power the board up.
  • Invoke the terminal program on the PC to which the evaluation board is connected and configure it to:
    • Bits per second: 115200.
    • Data bits: 8.
    • Parity: none.
    • Stop bits: 1.
    • Flow control: None.

      fnet_serial_setup.jpg
      Serial port setup
  • Start FBENCH Throughput Benchmark tool. You can find it in the:
    fnet\fnet_tools\fbench.exe 
    
    or on http://fbench.sf.net

    fnet_bench.jpg
    FBENCH Throughput Benchmark tool
Prepare the FNET Throughput Benchmark application:
  • Open the project:
    fnet\fnet_demos\boards\<board_name>\bench\<compiler_name>\
    
  • In the IDE choose the Release target.
  • Compile the project.
  • Flash the program to the board.
  • Now the Benchmark application is ready to be used.
  • Reset the board, press the RESET button on the board.
  • In your terminal program window you should see the FNET Benchmark welcome message:
    Parameters loaded from Flash.
    
    ************************************************
     FNET Throughput Benchmark
    ************************************************
     FNET TCP/IP Stack for MCF52259
     Version 2.0.0
     Built Oct 12 2012 at 15:49:35 by CW
    ************************************************
     Interface        : eth0
     IPv4 Address     : 192.168.0.22 <manual>
     IPv6 Address     : fe80::204:9fff:fe15:4931 <autoconfigurable>
     IPv4 Subnet mask : 255.255.255.0
     IPv4 Gateway     : 0.0.0.0
     MAC Address      : 00:04:9f:15:49:31
     Link Status      : connected
     TX Packets       : 4
     RX Packets       : 0
     Free Heap        : 36464
     DHCP Client      : disabled
    
     Enter 'help' for command list.
    ************************************************
    
    BENCH> 
    
  • The Benchmark application is now ready to accept user commands. Enter the help command to display a list of all commands available within the shell of the Benchmark application:
    BENCH> help
    >   help                                 - Display this help message
    >    set [<parameter> <value>]           - Set parameter
    >    get [<parameter>]                   - Get parameters
    >   info                                 - Show detailed status
    >   dhcp [release]                       - Start DHCP client
    >   save                                 - Save parameters to the FLASH
    >  reset                                 - Reset the board
    >benchrx [tcp|udp]                       - Receiver Benchmark
    >benchtx <receiver IP>[tcp|udp[<message size>
            [<number of messages>[<number of iterations>]]]- Transmitter Benchmark
    BENCH>
    

Receiver Benchmark

The Receiver Benchmark command has the following syntax:

benchrx [tcp|udp]
  • TCP Receiver test:
    • In the terminal window enter the benchrx command:
      BENCH> benchrx
      ************************************************
       TCP RX Test
      ************************************************
       IPv4 Address     : 192.168.0.22
       IPv6 Address     : fe80::204:9fff:fe15:4931
       Local Port       : 7007
      Press [Ctr+C] to cancel.
      ************************************************
      Waiting. 
      
    • In the Benchmark tool choose the TCP protocol and set the remote IP address that is assigned to your board. Changing of other parameters is optional. After parameters are set, press the [Connect/Send] button.

      fnet_bench_rx_tcp.jpg
      TCP RX Test
    • In your terminal program window you should see:
      Receiving from 192.168.0.5:56243
      Results:
              12720000 bytes in 2.1 seconds = 48457 Kbits/sec
      
      Waiting.
      
    • The test application continues waiting for new tests till you press [Ctr+C].
  • UDP Receiver test:
    • In the terminal window enter the benchrx udp command:
      BENCH> benchrx udp
      ************************************************
       UDP RX Test
      ************************************************
       IPv4 Address     : 192.168.0.22
       IPv6 Address     : fe80::204:9fff:fe15:4931
       Local Port       : 7007
      Press [Ctr+C] to cancel.
      ************************************************
      Waiting.
      
    • In the Benchmark tool choose the UDP protocol and set the remote IP address that is assigned to your board. Changing of other parameters is optional. After parameters are set, press the [Connect/Send] button.

      fnet_bench_rx_udp.jpg
      UDP RX Test
      Note
      The amount of data, received by the remote side, is putted to square brackets. It helps to determine the amount of data was lost during UDP transfer.
      - In your terminal program window you should see:  
      
      Receiving from 192.168.0.5:63961
      Results:
              11936448 bytes in 3.4 seconds = 28085 Kbits/sec
      
      Waiting.
      
    • The test application continues waiting for new tests till you press [Ctr+C].
Note
  • The benchmark application supports IPv6 too.
  • Your embedded platform can be not enough fast to process all the received packets causing buffer overflow and eventually packet drops for UDP protocol. Increasing the message delay (in microseconds) parameter helps to throttle the server transmission rate which helps to avoid significant packet loss.

Transmitter Benchmark

Transmitter Benchmark command has following syntax:

benchtx <receiver IP> [tcp|udp [<message size> [<number of messages> [<number of iterations>]]]
  • TCP Transmitter test:
    • In the Benchmark tool choose the TCP protocol and the local IP address (if you have several installed networking interface on your PC). Changing of other parameters is optional. After parameters are set, press the [Listen/Receive] button.

      fnet_bench_tx_tcp.jpg
      TCP TX Test
    • In the terminal window enter the benchtx <receiver IP> command:
      BENCH> benchtx 192.168.0.5
      ************************************************
       TCP TX Test
      ************************************************
       Remote IP Addr   : 192.168.0.5
       Remote Port      : 7007
       Message Size     : 1472
       Num. of messages : 10000
       Num. of iterations : 1
      Press [Ctr+C] to cancel.
      ************************************************
      Connecting.
      Sending.
      Results:
              14720000 bytes in 3.7 seconds = 31827 Kbits/sec
      
      Test completed.
      BENCH>
      
    • The test application continues waiting for new tests till you press the [Stop] button:

      fnet_bench_tx_tcp_close.jpg
      Stop the TCP TX Test
  • UDP Transmitter test:
    • In the Benchmark tool choose the UDP protocol and the local IP address (if you have several installed networking interface on your PC). Changing of other parameters is optional. After parameters are set, press the [Listen/Receive] button.

      fnet_bench_tx_udp.jpg
      UDP TX Test
    • In the terminal window enter the benchtx <receiver IP> udp command:
      BENCH> benchtx 192.168.0.5 udp
      ************************************************
       UDP TX Test
      ************************************************
       Remote IP addr   : 192.168.0.5
       Remote port      : 7007
       Message size     : 1472
       Number of messages : 10000
       Number of iterations : 1
      Press [Ctr+C] to cancel.
      ************************************************
      Connecting.
      Sending.
      REMOTE BYTES = 14321088
      Results:
              14720000 [14321088] bytes in 1.4 seconds = 84114 [81834] Kbits/sec
      
      Test completed.
      BENCH>
      
      Note
      The amount of data, received by the remote side, is putted to square brackets. It helps to determine the amount of data was lost during UDP transfer.
    • The test application continues waiting for new tests till you press the [Stop] button:

      fnet_bench_tx_udp_close.jpg
      Stop the UDP TX Test

      Note
      The benchmark application supports IPv6 too.

© 2005-2017 by Andrey Butok. http://fnet.sourceforge.net