惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Spread Privacy
Spread Privacy
P
Palo Alto Networks Blog
P
Proofpoint News Feed
AI
AI
Help Net Security
Help Net Security
S
Securelist
T
Troy Hunt's Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
Cisco Blogs
Scott Helme
Scott Helme
Hacker News - Newest:
Hacker News - Newest: "LLM"
Vercel News
Vercel News
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
B
Blog
GbyAI
GbyAI
Recent Commits to openclaw:main
Recent Commits to openclaw:main
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Proofpoint News Feed
S
Security Affairs
Cisco Talos Blog
Cisco Talos Blog
AWS News Blog
AWS News Blog
T
Tenable Blog
H
Help Net Security
NISL@THU
NISL@THU
F
Fortinet All Blogs
博客园_首页
G
GRAHAM CLULEY
L
LINUX DO - 最新话题
P
Privacy International News Feed
G
Google Developers Blog
博客园 - Franky
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Security Archives - TechRepublic
Security Archives - TechRepublic
The Register - Security
The Register - Security
L
LangChain Blog
aimingoo的专栏
aimingoo的专栏
T
Tor Project blog
P
Privacy & Cybersecurity Law Blog
量子位
C
Cyber Attacks, Cyber Crime and Cyber Security
Forbes - Security
Forbes - Security
S
Secure Thoughts
Simon Willison's Weblog
Simon Willison's Weblog
D
Docker
Recorded Future
Recorded Future
博客园 - 三生石上(FineUI控件)
L
Lohrmann on Cybersecurity
T
Tailwind CSS Blog

秋水逸冰

丽萨主机:双ISP家宽住宅IP VPS/CN2 GIA精品网/G口大带宽 | 秋水逸冰 Linux Kernel 6.18.x 编译版 | 秋水逸冰 思考未来人与 AI 的关系 | 秋水逸冰 3X-UI 面板安装和使用教程 | 秋水逸冰 Xray-UI 面板安装和使用教程 | 秋水逸冰 WCMP (Windows + Caddy + MariaDB + PHP) Nginx for Windows | 秋水逸冰 Aria2 for Windows | 秋水逸冰 Curl for Windows | 秋水逸冰 Wget for Windows | 秋水逸冰 Windows 11 Enterprise LTSC DD 镜像 Windows Server 2025 Datacenter DD 镜像 重新编译 curl 以支持 HTTP3 | 秋水逸冰 tiny10 和 tiny11 23H2 的 Windows DD 镜像 从 Apache httpd 切换到 Caddy2 LCMP (Linux + Caddy + MariaDB + PHP) Windows 11 Pro for Workstations 22H2 DD 镜像 Shadowsocks 编译版 by Teddysun | 秋水逸冰 适用于 UEFI 启动的多个 Windows 系统 DD 镜像 Linux Kernel 5.15.x 编译版 | 秋水逸冰 制作适用于 WSL 的任意 Linux 镜像 Windows 11 Pro for Workstations 21H2 DD 镜像 Windows 10 Enterprise LTSC DD 镜像 Linux Kernel 5.14.x 编译版 | 秋水逸冰 Linux Kernel 5.13.x 编译版 | 秋水逸冰 Windows Server 2022 Datacenter DD 镜像 在 Windows 10 上安装 Rocky Linux 系统 Linux Kernel 5.12.x 编译版 | 秋水逸冰 Linux Kernel 5.11.x 编译版 | 秋水逸冰 在 Windows 10 上安装 CentOS 系统 Linux Kernel 5.10.x 编译版 | 秋水逸冰 Caddy v1.0.5 编译版 | 秋水逸冰 在 Windows 系统里轻松创建自定义服务 | 秋水逸冰 如何在 CentOS 8 下安装 Docker Engine 在 CentOS 7 下构建 Android 编译环境 使用 Docker Buildx 构建多种系统架构镜像 | 秋水逸冰 使用 Docker 快速部署 Shadowsocks-libev + v2ray-plugin 如何使用 FirewallD 开启 IP 白名单 WireGuard 一键安装脚本 | 秋水逸冰 域名那些事儿5 | 秋水逸冰 告别 | 秋水逸冰 Windows Server 2019/2016/2012R2 Datacenter DD 镜像 如何制作 Windows Server 2019 的 DD 镜像 介绍几款 Docker 镜像 | 秋水逸冰 如何启用 Shadowsocks 的多端口 | 秋水逸冰 一键安装KMS服务脚本 | 秋水逸冰 关于免费SSL证书的那些事儿 | 秋水逸冰 使用定时任务cron监视Shadowsocks进程 | 秋水逸冰 LAMP新增Letsencrypt支持 | 秋水逸冰 从编译到二进制安装 | 秋水逸冰 PHP模块一览及简要说明 | 秋水逸冰 使用 GPG 加密 Github Commits 一键安装最新内核并开启 BBR 脚本 | 秋水逸冰 Shadowsocks 一键安装脚本(四合一) | 秋水逸冰 FTP 上传一键脚本ftp_upload.sh | 秋水逸冰 限制 IP 访问 WordPress 登录画面 CentOS 6.10安装Python2.7.18 | 秋水逸冰 一键备份脚本backup.sh | 秋水逸冰 域名那些事儿4 | 秋水逸冰 域名那些事儿3 | 秋水逸冰 LAMP下SSL设置教程 | 秋水逸冰 L2TP/IPSec一键安装脚本 | 秋水逸冰 域名那些事儿2 | 秋水逸冰 一键测试脚本bench.sh | 秋水逸冰 解决pip安装M2Crypto失败的问题 | 秋水逸冰 在CentOS下编译安装GCC | 秋水逸冰 域名那些事儿 | 秋水逸冰 MySQL性能优化的简单说明 | 秋水逸冰 Zend Guard Loader简介及下载链接一览 | 秋水逸冰 Windows和Linux下Whois命令的安装和使用 | 秋水逸冰 LAMP一键安装脚本使用说明 | 秋水逸冰 Windows系统下安装dig命令 | 秋水逸冰 如何在Debian下安装Webmin | 秋水逸冰 Apache下部署SSL教程 | 秋水逸冰 Shadowsocks-go一键安装脚本 | 秋水逸冰 少壮不努力,一生在内地 | 秋水逸冰 Google日语输入法离线安装包 | 秋水逸冰 PHP加速缓存Zend Opcache | 秋水逸冰 CentOS下安装aria2教程 | 秋水逸冰 Linux多线程下载工具Axel | 秋水逸冰 phpMyAdmin导入文件错误的解决办法 | 秋水逸冰 PHP编译安装常见错误总结 | 秋水逸冰 phpMyAdmin从4.1.x升级到4.2.x注意事项 | 秋水逸冰 Debian下shadowsocks-libev一键安装脚本 | 秋水逸冰 CentOS下shadowsocks-libev一键安装脚本 | 秋水逸冰 又一家VPS:Vultr.com | 秋水逸冰 Linux系统中常用操作命令 | 秋水逸冰 Eclipse下搭建Python开发环境 | 秋水逸冰 Shadowsocks Python版一键安装脚本 | 秋水逸冰 Git初学者:msysgit和tortoisegit | 秋水逸冰 CentOS 6下编译PHP出错 | 秋水逸冰 Apache如何开启Gzip压缩 | 秋水逸冰 Linux Shell逻辑运算符和表达式详解 | 秋水逸冰 吐槽腾讯:PC用户也是用户 | 秋水逸冰 Webmin:如何安装Perl模块DBI和DBD-MySQL | 秋水逸冰 CentOS下如何手动添加Swap | 秋水逸冰 安装PHP的PDO MySQL扩展 | 秋水逸冰 Javascript获取URL参数值 | 秋水逸冰 总结我所用过的VPS商家 | 秋水逸冰 Apache索引(目录浏览)的那些事儿 | 秋水逸冰
Linux性能测试UnixBench一键脚本 | 秋水逸冰
秋水逸冰 · 2013-07-29 · via 秋水逸冰

unixbench

UnixBench是一个类unix系(Unix,BSD,Linux)统下的性能测试工具,一个开源工具,被广泛用与测试linux系统主机的性能。Unixbench的主要测试项目有:系统调用、读写、进程、图形化测试、2D、3D、管道、运算、C库等系统基准性能提供测试数据。

最新版本UnixBench5.1.3,包含system和graphic测试,如果你需要测试graphic,则需要修改Makefile,不要注释掉”GRAPHIC_TESTS = defined”,同时需要系统提供x11perf命令gl_glibs库。
下面的脚本使用了最新版UnixBench5.1.3来测试,注释了关于graphic的测试项(大多数VPS都是没有显卡或者是集显,所以图像性能无需测试),运行10-30分钟后(根据CPU内核数量,运算时间不等)得出分数,越高越好。

测试方法:

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

测试项目:
Dhrystone 2 using register variables
此项用于测试 string handling,因为没有浮点操作,所以深受软件和硬件设计(hardware and software design)、编译和链接(compiler and linker options)、代码优化(code optimazaton)、对内存的cache(cache memory)、等待状态(wait states)、整数数据类型(integer data types)的影响。

Double-Precision Whetstone
这一项测试浮点数操作的速度和效率。这一测试包括几个模块,每个模块都包括一组用于科学计算的操作。覆盖面很广的一系列 c 函数:sin,cos,sqrt,exp,log 被用于整数和浮点数的数学运算、数组访问、条件分支(conditional branch)和程序调用。此测试同时测试了整数和浮点数算术运算。

Execl Throughput
此测试考察每秒钟可以执行的 execl 系统调用的次数。 execl 系统调用是 exec 函数族的一员。它和其他一些与之相似的命令一样是 execve() 函数的前端。

File copy
测试从一个文件向另外一个文件传输数据的速率。每次测试使用不同大小的缓冲区。这一针对文件 read、write、copy 操作的测试统计规定时间(默认是 10s)内的文件 read、write、copy 操作次数。

Pipe Throughput
管道(pipe)是进程间交流的最简单方式,这里的 Pipe throughtput 指的是一秒钟内一个进程可以向一个管道写 512 字节数据然后再读回的次数。需要注意的是,pipe throughtput 在实际编程中没有对应的真实存在。

Pipe-based Context Switching
这个测试两个进程(每秒钟)通过一个管道交换一个不断增长的整数的次数。这一点很向现实编程中的一些应用,这个测试程序首先创建一个子进程,再和这个子进程进行双向的管道传输。

Process Creation
测试每秒钟一个进程可以创建子进程然后收回子进程的次数(子进程一定立即退出)。process creation 的关注点是新进程进程控制块(process control block)的创建和内存分配,即一针见血地关注内存带宽。一般说来,这个测试被用于对操作系统进程创建这一系统调用的不同实现的比较。

System Call Overhead
测试进入和离开操作系统内核的代价,即一次系统调用的代价。它利用一个反复地调用 getpid 函数的小程序达到此目的。

Shell Scripts
测试一秒钟内一个进程可以并发地开始一个 shell 脚本的 n 个拷贝的次数,n 一般取值 1,2,4,8。(我在测试时取 1, 8)。这个脚本对一个数据文件进行一系列的变形操作(transformation)。

下面是我的一个512MB,2核,OpenVZ的VPS的跑分结果:

   BYTE UNIX Benchmarks (Version 5.1.3)

   System: vpn: GNU/Linux
   OS: GNU/Linux -- 2.6.32-042stab076.8 -- #1 SMP Tue May 14 20:38:14 MSK 2013
   Machine: i686 (i386)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Xeon(R) CPU L5520 @ 2.27GHz (4533.6 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 1: Intel(R) Xeon(R) CPU L5520 @ 2.27GHz (4533.6 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   09:41:17 up 31 days,  9:21,  1 user,  load average: 0.23, 0.05, 0.02; runlevel 3

------------------------------------------------------------------------
Benchmark Run: Mon Jul 29 2013 09:41:17 - 10:09:29
2 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       17172222.3 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     2600.2 MWIPS (10.0 s, 7 samples)
Execl Throughput                               4152.8 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        622759.5 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          172634.3 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       1218236.9 KBps  (30.0 s, 2 samples)
Pipe Throughput                             1416230.5 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 206509.4 lps   (10.0 s, 7 samples)
Process Creation                               8568.6 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   3145.9 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    528.3 lpm   (60.0 s, 2 samples)
System Call Overhead                        1528474.7 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   17172222.3   1471.5
Double-Precision Whetstone                       55.0       2600.2    472.8
Execl Throughput                                 43.0       4152.8    965.8
File Copy 1024 bufsize 2000 maxblocks          3960.0     622759.5   1572.6
File Copy 256 bufsize 500 maxblocks            1655.0     172634.3   1043.1
File Copy 4096 bufsize 8000 maxblocks          5800.0    1218236.9   2100.4
Pipe Throughput                               12440.0    1416230.5   1138.4
Pipe-based Context Switching                   4000.0     206509.4    516.3
Process Creation                                126.0       8568.6    680.0
Shell Scripts (1 concurrent)                     42.4       3145.9    742.0
Shell Scripts (8 concurrent)                      6.0        528.3    880.5
System Call Overhead                          15000.0    1528474.7   1019.0
                                                                   ========
System Benchmarks Index Score                                         960.4

------------------------------------------------------------------------
Benchmark Run: Mon Jul 29 2013 10:09:29 - 10:39:56
2 CPUs in system; running 2 parallel copies of tests

Dhrystone 2 using register variables       16851634.7 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     5182.9 MWIPS (10.0 s, 7 samples)
Execl Throughput                               4101.9 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        635244.9 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          174430.2 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       1219982.0 KBps  (30.0 s, 2 samples)
Pipe Throughput                             1387297.9 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 196296.1 lps   (10.0 s, 7 samples)
Process Creation                              10889.9 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   4073.7 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    550.5 lpm   (60.2 s, 2 samples)
System Call Overhead                        1538517.4 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   16851634.7   1444.0
Double-Precision Whetstone                       55.0       5182.9    942.3
Execl Throughput                                 43.0       4101.9    953.9
File Copy 1024 bufsize 2000 maxblocks          3960.0     635244.9   1604.2
File Copy 256 bufsize 500 maxblocks            1655.0     174430.2   1054.0
File Copy 4096 bufsize 8000 maxblocks          5800.0    1219982.0   2103.4
Pipe Throughput                               12440.0    1387297.9   1115.2
Pipe-based Context Switching                   4000.0     196296.1    490.7
Process Creation                                126.0      10889.9    864.3
Shell Scripts (1 concurrent)                     42.4       4073.7    960.8
Shell Scripts (8 concurrent)                      6.0        550.5    917.5
System Call Overhead                          15000.0    1538517.4   1025.7
                                                                   ========
System Benchmarks Index Score                                        1058.3

参考链接:
http://blog.sina.com.cn/s/blog_7695e9f40100yimf.html

转载请注明:秋水逸冰 » Linux性能测试UnixBench一键脚本