当前位置:网站首页>Kernel performance analysis summary
Kernel performance analysis summary
2022-08-10 06:14:00 【Liu Shigang】
# Kernel performance analysis summary
1.unixbench
a. Test Introduction
UnixBench originated in 1995, the baseline system is "George", a workstation: SPARCstation 20‐61, 128MB RAM, Solaris 2.3, the index value of this system is set to 10, so if the final result of a systemA score of 520 means this system runs 52 times faster than the baseline system.
UnixBench also supports multi-CPU system testing, the default behavior is to test twice, the first is a process test, the second is N tests, N is equal to the number of CPUs.This design is for the following goals:
Test the single-task performance of the system
Test the multi-task performance of the system
Test the parallel processing ability of the system
UnixBench is a system-based benchmarking tool, not just aCPU memory or disk test tool.Test results depend not only on hardware, but also on system, development libraries, and even compilers.
Dhrystone test
The test focuses on string processing, no floating point operations.This test is used to test linker compilation, code optimization, memory caching, wait states, integer data types, etc. Hardware and software design will greatly affect the test results.
Whetstone Test
This test is used to test the efficiency and speed of floating point operations.This test project contains several typical performance modules of scientific computing, including a large number of C language functions, sin cos sqrt exp and log and mathematical operations using integer and floating point.Contains array access, conditional branches, and procedure calls.
Execl Throughput test
(execl throughput, where execl is a very important function of Unix-like system, non-office software excel)
This test measures the number of execl function calls per second.execl is part of the exec family of functions and replaces the current graphics processing with new graphics processing.There are many commands that are very similar to the front-end execve() function commands.
File Copy Test
This test measures the transfer of file data from one file to another, using a large amount of cache.Including file reading, writing, and copying tests, the test indicator is the number of characters that are rewritten, read, and copied within a certain period of time (10 seconds by default).
Pipe Throughput (pipe throughput) test
Pipe is simple communication between processes.The pipe throughput test measures the number of times a process writes 512 bits to a pipe and reads it back in one second.There is a gap between pipeline throughput testing and actual programming.
Pipe-based Context Switching (pipe-based context interaction) test
This test measures the number of times two processes switch through the pipe and increase throughput in multiples.Pipe-based context switching is very similar to real programs.The test program spawns a child thread for bidirectional pipe communication.
Process Creation Test
This test measures the number of times a process can spawn child threads and exit immediately.The new process really creates process blocking and memory usage, so the test program uses memory bandwidth directly.This test is used for typical relatively large number of operating system process creation operations.
Shell Scripts test
The shell script test is used to measure the number of times a process can start and stop shell scripts in one minute, usually tests 1, 2, 3, 4, 8 common copies of shell scripts,A shell script is a set of scripts that transform data files.
System Call Overhead Test
This test measures the overhead of entering and leaving the system kernel, eg, the overhead of system calls.The program simply repeats the getpid call (returns the calling process id).The metric consumed is the execution time of calls entering and leaving the kernel.
b.Run usage
Run [ -q | -v ] [-i ] [-c [-c …]] [test …]
Option description:
| -q | Do not show the test process |
|---|---|
| -v | Show test process |
| -i | Number of executions, minimum 3 times, default 10 |
| -c | n copies of each test in parallel (parallel tasks) |
Note: The -c option can be used to execute multiple times, such as:
Run -c 1 -c 4 means to execute twice, the first time a single copy, the second test task of 4 copies.
For the performance test strategy of the multi-cpu system, it is necessary to count the performance enhancement of single task, multitask and parallel.
Take a PC with 4 CPUs as an example, it needs to be tested twice, 4 CPUs are to execute 4 copies in parallel,
Run -q -c 1 -c 4
Test results The score of a single parallel task is 171.3, and the score of 4 parallel tasks is 395.7.You need to pay attention to this value when comparing tests.
c. Result display

Reference blog: https://www.cnblogs.com/chenshengkai/p/12761467.html
2.netperf network performance
a.install
$ wget -c "https://codeload.github.com/HewlettPackard/netperf/tar.gz/netperf-2.5.0" -O netperf-2.5.0.tar.gz$ tar xvf netperf-2.5.0.tar.gz$ cd netperf-netperf-2.5.0/$ ./configure$ make && make install$ netperf -h #There is output indicating that the installation was successfulb.use
1. Server startup
$ netserverStarting netserver with host 'IN(6)ADDR_ANY' port '12865' and family AF_UNSPEC$ ss -lnt #Listen on port 128652. Test client startup
$ netperf -H 192.168.1.180MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.1.180 (192.168.1.180) port 0 AF_INETRecv Send SendSocket Socket Message ElapsedSize Size Size Time Throughputbytes bytes bytes secs. 10^6bits/sec87380 16384 16384 10.47 86.40Throughput: 86.4 * 10^6 bits/sec
Convert it to 10Mbit/s (86.40/8=10.8*1000000bps=10Mbit/s)
边栏推荐
猜你喜欢
随机推荐
STM32F407ZG GPIO输入相关实验
在Unity中判断游戏物体是否在游戏屏幕范围之内
动态规划、背包问题 6/25 110-115
动态规划、背包问题 6/23 101-105
lua小工具-保留指定位数的小数
Unity中暂停、继续播放、杀死、正放、倒放Dotween动画
Unity中Xml简介以及通过脚本读取Xml文本中的内容
C#对MySQL数据库进行增删改查操作(该操作还有防止MySQL注入功能)
lua的模块与类
Share a professional TA's "Shader Reference"
STM32单片机手机APP蓝牙高亮RGB彩灯控制板任意颜色亮度调光
剑指 Offer(第 2 版)7/5 5-8
STM32单片机RGB红蓝调光植物补光系统红光蓝光PWM调色调节亮度
ASP.NET有关于文件上传、下载、全选、删除选中重要干货(亲测有效)
Flutter的生命周期
51单片机室内环境甲醛PM2.5光照温度湿度检测及窗帘加湿消毒控制系统
视差映射:更逼真的纹理细节表现(上):为什么要使用视差映射
markdown类图学习
STM32F407ZG 看门狗 IWDG & WWDG
在Unity中让主摄像机发射一条射线,判断射线在游戏场景中所碰撞的游戏物体名字和标签名称(亲测有效)









