Unixbench-cross-platform running score

UnixBench is a performance testing tool under Unix-like systems (Unix, BSD, Linux), an open source tool, widely used to test the performance of Linux system hosts. The main test items of UnixBench are: system call, read and write, process, graphical test, 2D, 3D, pipeline, calculation, C library and other system benchmark performance to provide test data

Test items

  • Dhrystone 2 using register variables: This item is used to test string handling. Because there is no floating point operation, it is very popular in hardware and software design, compiler and linker options, and code optimazaton. , The impact on the memory cache (cache memory), wait states (wait states), integer data types (integer data types)
  • Double-Precision Whetstone: This item tests the speed and efficiency of floating-point operations. This test includes several modules, each of which includes a set of operations for scientific computing. A wide range of C functions: sin, cos, sqrt, exp, log are used for integer and floating point mathematical operations, array access, conditional branch and program calls. This test tests both integer and floating point arithmetic operations
  • Execl Throughput: This test examines the number of execl system calls that can be executed per second. The execl system call is a member of the exec function family. It is the front end of the execve() function like other similar commands
  • File copy: Test the rate of data transfer from one file to another. Each test uses a different size buffer. This test counts the number of file read, write, and copy operations within the specified time (the default is 10s) for file read, write, and copy operations
  • Pipe Throughput: Pipe is the easiest way to communicate between processes. Pipe throughtput here refers to the number of times a process can write 512 bytes of data to a pipe in one second and then read it back. It should be noted that pipe throughtput has no corresponding real existence in actual programming
  • Pipe-based Context Switching: This tests the number of times that two processes (every second) exchange a growing integer through a pipe. This point is very similar to some applications in real programming. This test program first creates a child process, and then conducts two-way pipeline transmission with this child process.
  • Process Creation: Test the number of times a process can create a child process and then withdraw the child process per second (the child process must exit immediately). The focus of process creation is the creation and memory allocation of a new process control block (process control block), that is, a sharp focus on memory bandwidth. Generally speaking, this test is used to compare different implementations of the system call created by the operating system process
  • System Call Overhead: Test the cost of entering and leaving the operating system kernel, that is, the cost of a system call. It uses a small program that repeatedly calls the getpid function to achieve this goal
  • Shell Scripts: Test the number of times a process can start n copies of a shell script concurrently in one second, n generally takes the value 1, 2, 4, 8. (I take 1, 8 in the test). This script performs a series of transformation operations on a data file (transformation)

download

You can get all the source code on GitHub, compile it yourself

git clone https://github.com/kdlucas/byte-unixbench.git

Compile

ARM processor

sed -i 's/-mtune=native//' Makefile
sed -i 's/-march=native//' Makefile
sed -i 's/$field eq "bogomips"/$field eq "bogomips" or $field eq "BogoMIPS" /g' Run

CPU multi-core integer running instructions:

./Run -c 4 dhry2reg

CPU multi-core floating-point running instructions:

./Run -c 4 whetstone

X86 processor

make

The remaining instructions are the same as above

One-click script

Test preparation:

yum -y install wget       // for CentOS
apt-get -y install wget   // for Debian / Ubuntu

testing method:

wget --no-check-certificate https://github.com/zq/unixbench/raw/master/unixbench.sh
chmod +x unixbench.sh
./unixbench.sh

Guess you like

Origin blog.csdn.net/kelxLZ/article/details/111881731