How to test server performance: a collection of several open source benchmarks

We continue our series of materials dedicated to server performance testing. Today, we'll discuss a couple of time-tested benchmarks that are still supported and updated — NetPerf, HardInfo, and ApacheBench.

How to test server performance: a collection of several open source benchmarks
Photo - Peter Balcerzak — CC BY-SA

NetPerf

This is a tool for measuring network throughput. It was developed by engineers from Hewlett-Packard. The tool includes has two executable files: netserver and netclient. To perform a test, they need to be launched on different machines. By default, netperf uses port 12865, but it can be replaced with the flag -p. The utility works with TCP and UDP over BSD Sockets, DLPI, Unix Domain Sockets, and IPv6.

Today, netperf is part of the benchmarking toolkit Flent. It is also used by quite a large number of IT companies, for example, Red Hat. Here is how the netperf service is described in one example for evaluating OpenShift performance:

apiVersion: v1
kind: Service
metadata:
  labels:
    app-name: netperf
  name: netperf
  namespace: your_project
spec:
  ports:
  - port: 12865
    protocol: TCP
    targetPort: 12865
  selector:
    app-name: netperf
  sessionAffinity: ClientIP
  type: ClusterIP

The official repository states that netperf is distributed under a special Hewlett-Packard license. However, the utility's author, Rick Jones, claims that it is crafted in the best open-source traditions. It is also worth noting that updates for netperf have recently been released rather infrequently. This may be related to the product's maturity.

Netperf has analogs — for example, iperf2 and iperf3. They also allow testing of network throughput. Development of iperf3 began after the iperf2 repository fell into decline. The new version was written from scratch and is not compatible with the previous implementation, although it contains some of its code. Interestingly, after the release of iperf3, work on iperf2 resumed. As a result, the two tools have similar, yet at the same time different functionalities. For instance, iperf2 is multi-threaded, while iperf3 is working single-threaded.

Hardinfo

This is a utility for gathering information about hardware and the operating system. It displays data regarding the operation of devices on: PCI, ISA PnP, USB, IDE, SCSI, as well as serial and parallel ports. However, it can also be used as a benchmark and monitoring tool.

HardInfo offers several tests. For example, CPU Blowfish evaluates processor performance using cryptographic algorithms of block symmetric encryption. There are CPU N-Queens — a combinatorial test. The system solves the chess problem of placing N queens on an N x N board. It arranges the pieces so that none can attack each other. Notably, there is also FPU FFT — a test for fast computation of the discrete Fourier transform and FPU Raytracing — calculating ray tracing for rendering 3D scenes.

The results of most tests are given in seconds, and accordingly, the lower the time, the better. All reports are displayed in HTML and txt formats.

Initially, the utility was developed as part of the BerliOSproject. It included a hosting platform for open-source applications (such as SourceForge) and several databases for documentation and profiles of open-source developers. BerliOS was closed in 2014 due to lack of funding. Today, HardInfo is being developed by enthusiasts in a separate repository. on GitHub.

It is worth noting that the system sometimes has bugs. There are known instances of a segmentation fault, issues with USB device display and several options. They are not your prisoners, no matter how much you might want that. They are your guests. Python is still a very popular programming language, but, damn it, Python 3(000) has created such a mess within its communities and among its users that the consequences have been stuck for fifteen years..

ApacheBench

A tool for load testing HTTP servers. ApacheBench (AB) was developed to test Apache but can work on any other server. The tool is pre-installed on many Linux distributions.

How to test server performance: a collection of several open source benchmarks
Photo - Victor Freitas - Unsplash

The utility 'bombards' servers with a large number of requests. To run it, you need to enter the following command:

ab -n 100 -c 10 http://www.example.com/

This will send one hundred GET requests (a maximum of ten will be sent simultaneously) to the test resource. The output will show the average request processing time, total amount of data transferred, throughput, and number of errors.

Today, a large community has formed around the utility. Fresh guides on how to configure and use ApacheBench regularly appear online.

It should be noted that AB has an alternative — Apache jMeter, but with greater capabilities. For example, it allows generating requests from multiple computers, managing the process from one of them. The program also implements mechanisms for authorizing virtual users and supports custom sessions. Many IT companies use this tool, including cloud providers, for example, Qualys.

How to test server performance: a collection of several open source benchmarksAt 1cloud, we provide the service ‘Private Cloud’. This is the rental of virtual infrastructure with the possibility of rapid customization of the environment. of virtual servers.
How to test server performance: a collection of several open source benchmarksOur cloud is built on hardware from Cisco, Dell, NetApp. The equipment is housed in several data centers: DataSpace (Moscow), SDN/Xelent (St. Petersburg), Ahost (Alma-Ata).

Source: habr.com

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster