The cart is empty

Ensuring network infrastructure is not only reliable but also meets performance requirements is crucial in today's technology landscape. This article focuses on implementing automated testing of network throughput and latency between servers running on the CentOS 7 operating system, a popular Linux distribution suitable for servers.

Testing Tools

For the purpose of this article, we will focus on two main tools widely used for testing network throughput and latency on CentOS 7: iperf3 and ping.

  • iperf3: A command-line tool for testing network throughput between two endpoints. It allows measuring maximum TCP and UDP network throughput.

  • ping: A basic tool for testing network connection latency. It measures the time taken to transmit small packets of data between a host and a target system.

Installing Tools

  1. Installing iperf3

    • Open a terminal on your CentOS 7 server.
    • Run the command sudo yum install epel-release -y to add the EPEL repository.
    • Install iperf3 using sudo yum install iperf3 -y.
  2. Installing and Configuring ping

    • Ping is already pre-installed on most CentOS 7 distributions, so no additional installation is needed.

Configuration and Running Tests

  1. Throughput Testing with iperf3

    • On the server that will act as the throughput testing server, run iperf3 -s.
    • On the client from which you want to test throughput to the server, run iperf3 -c <Server_IP_address>.
    • After the test completes, you will see results including information about the maximum achieved throughput.
  2. Latency Testing with ping

    • Run the command ping <Target_server_IP_address> from your terminal.
    • Ping will send data packets to the target server and display statistics, including average latency.

Automating Tests

Automation of tests can be achieved using bash scripts that periodically execute the above tests and save results to log files for later analysis.

  • Create a bash script containing commands to run iperf3 and ping tests with necessary parameters.
  • Schedule the script using cron for periodic execution.

 

Implementing automated testing of network throughput and latency between servers on CentOS 7 helps ensure your network infrastructure is reliable and meets performance requirements. By using tools like iperf3 and ping, you can easily monitor and analyze your network's performance, enabling you to make necessary adjustments for optimization.