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

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

How to test server performance: a selection of several open source benchmarks
A photo - Peter Balcerzak β€” CC BY SA

NetPerf

This is a tool for estimating network throughput. It was developed by engineers from Hewlett-Packard. Tool includes two executables: netserver and netclient. To run the test, they need to be run on different machines. By default, netperf uses port 12865, but this can be changed using the -p flag. The utility works with TCP and UDP over BSD Sockets, DLPI, Unix Domain Sockets and IPv6.

Netperf is now part of the benchmarking toolkit flent. It is also used by a fairly large number of IT companies, e.g. Red Hat. This is how the description of the netperf service looks like in one of the examples for evaluating the performance of OpenShift:

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 says that netperf is distributed under a special Hewlett-Packard license. However, the author of the utility - Rick Jones (Rick Jones) - claims that it is framed in the best traditions of open source. We also note that recently updates for netperf have become quite rare. Perhaps this is due to the maturity of the product.

netperf has analogues - for example, hyperf2 ΠΈ hyperf3. They also allow you to test network throughput. The development of iperf3 started after the iperf2 repository fell into disrepair. The new version is written from scratch and is incompatible with the previous implementation, although it contains part of its code. Interestingly, after the release of iperf3, work on iperf2 began to boil again. As a result, two tools possess similar, but at the same time different functionality. For example, iperf2 is multi-threaded, and iperf3 is works with only one stream.

hard info

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

HardInfo offers several tests. For example, CPU Blowfish - evaluates processor performance using block symmetric encryption cryptographic algorithms. Eat CPU N-Queens β€” test from combinatorics. The system solves the chess problem of placing N queens on a board of N x N cells. She arranges the pieces so that none of them can attack the others. Also worth noting is FPU FFT - a test for fast calculation of the discrete Fourier transform and FPU Raytracing - calculation of ray tracing when rendering a 3D scene.

The result in most tests is given in seconds and, accordingly, the smaller it is, the better. All reports are shown in HTML and txt formats.

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

Note that sometimes there are bugs in the system. Known for occasional segmentation fault, problems with displaying USB devices and several other.

ApacheBench

A tool for stress testing HTTP servers. ApacheBench (AB) was designed to test Apache, but it can run on any other server. The tool is preinstalled on many Linux distributions.

How to test server performance: a selection of several open source benchmarks
A photo - Victor Freitas β€” unsplash

The utility "bombards" servers with a large number of requests. To run, enter the following command:

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

It will send one hundred GET requests (maximum ten of them will be transmitted at the same time) to the test resource. At the output, the system will show the average request processing time, the total amount of data transferred, throughput and the number of errors.

Today, a large community has gathered around the utility. appear regularly on the web fresh guides on how to set up and use ApacheBench.

Note that AB has an analogue - Apache jMeterbut with great potential. For example, it allows you to generate requests from multiple computers, controlling the process from one of them. The program also implements virtual user authorization mechanisms, user sessions are supported. This tool is used by many IT companies, including cloud providers such as Qualys.

How to test server performance: a selection of several open source benchmarksWe provide a service in 1cloud "Private cloud". This is a virtual infrastructure rental with the ability to quickly customize the park virtual servers.
How to test server performance: a selection of several open source benchmarksOur cloud built on iron Cisco, Dell, NetApp. The equipment is located in several data centers: DataSpace (Moscow), SDN/Xelent (St. Petersburg), Ahost (Alma-Ata).

Source: habr.com

Add a comment