Embedded TCP/IP stack  4.1.0
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:
    ************************************************
     FNET Throughput Benchmark
    ************************************************
     FNET TCP/IP Stack for MK64FN1
     Version 4.1.0
     Built Feb 15 2018 at 15:50:38 by IAR
    
     Enter '?' for command list.
    ************************************************
    [FAPP] Application parameters loaded from Flash.
    BENCH>
    
  • The Benchmark application is now ready to accept user commands. Enter the ? command to display a list of all commands available within the shell of the Benchmark application:
    BENCH> ?
    >         ?                                     - Display this help message
    >       set [<parameter> <value>]               - Set parameter
    >       get [<parameter>]                       - Get parameters
    >      info [-n <if name>]                      - Show interface info
    >      stat [-n <if name>]                      - Show interface statistics
    >     dhcpc [-n <if name>] [release|autoip]     - Start DHCPv4 client
    >    autoip [-n <if name>] [release]            - Start Auto-IP service
    >      save                                     - Save parameters to the FLASH
    >     reset                                     - Reset the board
    >   benchtx [-n <if name>] -a <remote ip> [tcp|udp] [-m <message size>] [-mn <number of messages>] - Benchmark transmitter
    >   benchrx [[-n <if name>] [-a <if ip address>] [tcp|udp]] | release - Benchmark receiver
    BENCH>
    

Receiver Benchmark

The Receiver Benchmark command has the following syntax:

benchrx [[-n <if name>] [-a <if ip address>] [tcp|udp]] | release
  • TCP Receiver test:
    • In the terminal window enter the benchrx command:
      BENCH> benchrx
      ************************************************
       Benchmark server started.
       IPv4 Address         : 192.168.0.108
       IPv6 Address         : fe80::211:22ff:fe33:4455
       Protocol             : TCP
       Local Port           : 7007
      ************************************************
      BENCH>
      
    • 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:
      [BENCH] Receiving from 192.168.0.200 port = 61199
      
      [BENCH] 12.720000 MBytes in 2.26 Seconds = 45.025 Mbit/sec
      
    • The benchmark server/receiver continues waiting for new tests till you release it by:
      BENCH> benchrx release
      
  • UDP Receiver test:
    • In the terminal window enter the benchrx udp command:
      BENCH> benchrx udp
      ************************************************
       Benchmark server started.
       IPv4 Address         : 192.168.0.108
       IPv6 Address         : fe80::211:22ff:fe33:4455
       Protocol             : UDP
       Local Port           : 7007
      ************************************************
      BENCH>
      
    • 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
    • In your terminal program window you should see:
      [BENCH] Receiving from 192.168.0.200 port = 50643
      
      [BENCH] 12.478321 MBytes in 1.66 Seconds = 60.136 Mbit/sec
      
    • The test application continues waiting for new tests till you release it by:
      BENCH> benchrx release
      
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 [-n <if name>] -a <remote ip> [tcp|udp] [-m <message size>] [-mn <number of messages>]
  • 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:
      BENCH> benchtx -a 192.168.0.200
      ************************************************
       Benchmark client started.
       Protocol             : TCP
       Remote IP Addr       : 192.168.0.200
       Remote Port          : 7007
       Message Size         : 1472
       Num. of messages     : 10000
      Press [Ctr+C] to cancel.
      ************************************************
      
      [BENCH] 14.720000 MBytes in 2.48 Seconds = 47.483 Mbit/sec
      BENCH>
      
    • The test PC 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:
      BENCH> benchtx -a 192.168.0.200 udp
      ************************************************
       Benchmark client started.
       Protocol             : UDP
       Remote IP Addr       : 192.168.0.200
       Remote Port          : 7007
       Message Size         : 1472
       Num. of messages     : 10000
      Press [Ctr+C] to cancel.
      ************************************************
      
      [BENCH] 14.720000 MBytes in 1.26 Seconds = 93.459 Mbit/sec
      
      BENCH>
      
      - The test PC application continues waiting for new tests till you press the @c [Stop] button:
      


      fnet_bench_tx_udp_close.jpg
      Stop the UDP TX Test

      Note
      The benchmark application supports IPv6 too.

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