Benchmarks for servers on Linux: a selection of open source tools

We continue to talk about tools for evaluating CPU performance on Linux machines. Today in the material: temci, uarch-bench, likwid, perf-tools and llvm-mca.

More benchmarks:

Benchmarks for servers on Linux: a selection of open source tools
A photo - Lukas blazek β€” unsplash

temci

This is a tool for estimating the execution time of two programs. In fact, it allows you to compare the execution time of two applications. The utility was authored by German student Johannes Bechberger, who developed it as part of his bachelor's thesis in 2016. today tool spreads licensed under the GNU General Public License.

Johannes wanted to create a tool that would allow the performance of a computer system to be measured in a controlled environment. Therefore, one of the main features of temci is the ability to customize the test environment. For example, can: change the settings of the CPU frequency control manager, disable hyper-threading and L1 and L2 caches, turn off turbo mode on Intel processors, etc. For benchmarking, temci uses tools team, perf_stat ΠΈ getrusage.

This is what the utility looks like in the first case:

# compare the run times of two programs, running them each 20 times
> temci short exec "sleep 0.1" "sleep 0.2" --runs 20
Benchmark 20 times                [####################################]  100%
Report for single runs
sleep 0.1            (   20 single benchmarks)
     avg_mem_usage mean =           0.000, deviation =   0.0
     avg_res_set   mean =           0.000, deviation =   0.0
     etime         mean =      100.00000m, deviation = 0.00000%
     max_res_set   mean =         2.1800k, deviation = 3.86455%
     stime         mean =           0.000, deviation =   0.0
     utime         mean =           0.000, deviation =   0.0

sleep 0.2            (   20 single benchmarks)
     avg_mem_usage mean =           0.000, deviation =   0.0
     avg_res_set   mean =           0.000, deviation =   0.0
     etime         mean =      200.00000m, deviation = 0.00000%
     max_res_set   mean =         2.1968k, deviation = 3.82530%
     stime         mean =           0.000, deviation =   0.0
     utime         mean =           0.000, deviation =   0.0

Based on the results of benchmarking, the system generates convenient report with diagrams, tables and graphs, which distinguishes temci from similar solutions.

Of the shortcomings of temci, its "youth" stands out. Because of this, he does not support all hardware and software configurations. For example, it is difficult to run under macOS, and some functions are not available on a system with an ARM processor. In the future, the situation may change, as the author is actively developing the project, and the number of stars on GitHub is gradually increasing - not so long ago temci even discussed in the comments on Hacker News.

uarch-bench

A utility for evaluating the performance of low-level CPU functions, developed by engineer Travis Downes (Travis Downs). Recently he has been blogging Performance Matters on GitHub Pages, which talks about benchmarking tools and other things related to them. In general, uarch-bench is just starting to gain popularity, but already quite often упоминаСтся Hacker News residents in thematic threads as a go-to benchmarking tool.

Uarch-bench allows you to evaluate memory performance, parallel data loading speed and cleanup work YMM registers. How the benchmarking results generated by the program look can be found in the official repository at the bottom of the page.

It is worth noting that uarch-bench, like temci, disconnects the Intel Turbo Boost feature (it automatically increases the processor clock speed under load) so that the test results are consistent.

So far, the project is in the early stages of development, so uarch-bench does not have detailed documentation, and bugs may occur in its work - for example, difficulties are known running on Ryzen. Only benchmarks for x86 architectures are also supported. The author promises to add more functionality in the future and invites you to join the development.

liquid

This is a set of tools for evaluating the performance of Linux machines with Intel, AMD and ARMv8 processors. It was created under the auspices of the German Federal Ministry of Education and Research in 2017 and transferred to open source.

Among the likwid tools, we can single out likwid-powermeter, which displays information from RAPL registers about the power consumed by the system, as well as likwid-setFrequencies, which allows you to control the processor frequency. For a complete list, you can find in repository.

The tool is used by HPC research engineers. For example, with likwid works a group of specialists from the Regional Computing Center of the University of Erlangen - Nuremberg (RRZE) in Germany. She is also actively involved in the development of this set of tools.

Benchmarks for servers on Linux: a selection of open source tools
A photo - Clem Onojeghuo β€” unsplash

perf-tools

This tool for analyzing the performance of Linux servers presented Brendan Gregg. He is one of the developers DTrace - a dynamic tracing framework for debugging applications in real time.

Perf-tools is based on the perf_events and ftrace kernel subsystems. Their utilities allow you to analyze I / O latency (iosnoop), track system call arguments (unccount, funcslower, funcgraph and functrace) and collect file cache hit statistics (cachestat). In the latter case, the command looks like this:

# ./cachestat -t
Counting cache functions... Output every 1 seconds.
TIME HITS MISSES DIRTIES RATIO BUFFERS_MB CACHE_MB
08:28:57 415 0 0 100.0% 1 191
08:28:58 411 0 0 100.0% 1 191
08:28:59 362 97 0 78.9% 0 8
08:29:00 411 0 0 100.0% 0 9

A fairly large community has formed around the tool (almost 6k stars on GitHub). And there are companies that actively use perf-tools, for example Netflix. But the tool is being finalized and modified (although updates have been released quite rarely lately). Therefore, errors may occur in its work - the author writes that sometimes perf-tools causes kernel panic.

llvm-mca

A utility that predicts how much computing resources the machine code will need on different CPUs. She evaluates Instructions Per Cycle (IPC) and the load on the hardware that an application generates.

llvm-mca was introduced in 2018 as part of the project LLVM, which is developing a universal system for analyzing, transforming and optimizing programs. It is known that the authors of llvm-mca were inspired by the software performance analysis solution IACA from Intel and sought to create an alternative to it. And according to users, the output of the tool (their markup and quantity) really resembles IACA - an example can be found here. However, llvm-mca only accepts AT&T syntax, so to work with it, most likely, you will have to use converters.

What we write about on our blogs and social networks:

Benchmarks for servers on Linux: a selection of open source tools "Mat. Wall Street Model" or How to Optimize Cloud Costs

Benchmarks for servers on Linux: a selection of open source tools How to secure your Linux system: 10 tips
Benchmarks for servers on Linux: a selection of open source tools Risk minimization: how not to lose your data

Benchmarks for servers on Linux: a selection of open source tools Books for those who are already involved in system administration or are just planning to start
Benchmarks for servers on Linux: a selection of open source tools Selection: five books and one networking course

Benchmarks for servers on Linux: a selection of open source toolsWe at 1cloud.ru offer a free service "DNS hosting". You can manage DNS records with us in a single personal account.

Source: habr.com

Add a comment