Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use Sysbench for performance testing under Centos8

Shulou Source: shulou.com Published: 2022-06-01 17:37:18 09月20日 Update

This article introduces the knowledge of "how to use Sysbench for performance testing under Centos8". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

SysBench is a writable multithreaded benchmark tool based on LuaJIT. It is most commonly used for database benchmarking, but it can also be used to create any complex workload that does not involve a database server.

System environment

Centos8

Install sysbench

Install the Epel source first, and then install sysbench

[root@server1 ~] # rpm-ivh https://mirrors.tuna.tsinghua.edu.cn/epel/epel-release-latest-8.noarch.rpm[root@server1 ~] # yum-y install sysbench uses the sysbench tool to perform CPU benchmarking

To evaluate CPU performance, benchmark the CPU using the following command:

[root@server1] # sysbench-- test=cpu run

The full report statistics will be displayed on the terminal, but what is important here is that total time will be displayed under General statistics to test CPU performance.

You can also get CPU benchmarking options using the following command:

[root@server1] # sysbench-- test=cpu help

The command parameters can be modified according to your requirements. For example, benchmark CPU performance using the following command:

[root@server1] # sysbench-- test=cpu-- cpu-max-prime=20000 run

Benchmark memory using the sysbench tool

To test memory performance, type the following basic command on the terminal:

[root@server1] # sysbench-- test=memory run

Memory performance can be tested by checking the parameters Total operations and the amount of data transferred.

Use the following command to view options related to testing memory performance:

[root@server1 ~] # sysbench-- test=memory help uses the sysbench tool to benchmark Imax O

The iCompo performance test is slightly different from the CPU and memory tests. In the file I RAM O test, you need to create a test file that is larger than the size of the test. The general sequential write Istroke O performance test can be done using the following command:

[root@server1] # sysbench-- test=fileio-- file-test-mode=seqwr run

Use the following command to get more options for the Ithumb O test:

[root@server1] # sysbench-- test=fileio-- file-test-mode=seqwr help

There are many options shown above. Just set the parameter values according to your requirements and test the performance of your Linux system.

After the performance test is complete, delete the test file using the following command:

[root@server1] # sysbench-- this is the end of test=fileio cleanup's "how to use Sysbench for performance testing under Centos8". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Testing performance commands benchmarks memory tools parameters data files more progressive measurable content can make database for knowledge system terminal different Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Shulou Information Xiaomi Microsoft OPPO Reno