How To Install sockperf on CentOS 7

In this tutorial we learn how to install sockperf on CentOS 7. sockperf is Network benchmarking utility for testing latency and throughput

Introduction

In this tutorial we learn how to install sockperf on CentOS 7.

What is sockperf

sockperf is a network benchmarking utility over socket API that was designed for testing performance (latency and throughput) of high-performance systems (it is also good for testing performance of regular networking systems as well). It covers most of the socket API calls and options. Specifically, in addition to the standard throughput tests, sockperf, does the following * Measure latency of each discrete packet at sub-nanosecond resolution (using TSC register that counts CPU ticks with very low overhead). * Does the above for both ping-pong mode and for latency under load mode. This means that we measure latency of single packets even under load of millions Packets Per Second (without waiting for reply of packet before sending subsequent packet on time) * Enable spike analysis by providing histogram, with various percentiles of the packets’ latencies (for example max, 99% percentile, and more), (this is in addition to average and standard deviation). Also, sockperf provides full log with all packet’s tx/rx times that can be further analyzed with external tools, such as MS-Excel or matplotlib - All this without affecting the benchmark itself. * Support MANY optional settings for good coverage of socket API and network configurations, while still keeping very low overhead in the fast path to allow cleanest results.

We can use yum or dnf to install sockperf on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install sockperf.

Install sockperf on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install sockperf using yum by running the following command:

sudo yum -y install sockperf

Install sockperf on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install sockperf using dnf by running the following command:

sudo dnf -y install sockperf

How To Uninstall sockperf on CentOS 7

To uninstall only the sockperf package we can use the following command:

sudo dnf remove sockperf

References

Summary

In this tutorial we learn how to install sockperf on CentOS 7 using yum and dnf.