UnixBench是一款开源的用于测试Unix、BSD、Linux系统基本性能的工具,比较通用于Linux系统VPS性能测试,主要测试项目有:系统调用、读写、进程、图形化测试、2D、3D、管道、运算、C库等系统基准性能提供测试数据。
一、脚本命令
如果你想使用UnixBench测试你的服务器性能,请使用SSH工具连接你的服务器后执行下面命令。脚本默认使用UnixBench5.1.3版本,因为大多VPS都没有显卡或者是集成显卡,不需要进行图像性能测试,所以作者注释了关于graphic的测试项。此脚本运行测试时间大约10-30分钟,跑分结束后得分越高性能越好。
wget --no-check-certificate https://github.com/wn789/unixbench/blob/master/unixbench.sh chmod +x unixbench.sh ./unixbench.sh
二、测试效果
======================================================================== BYTE UNIX Benchmarks (Version 5.1.3) System: vmu8i5vg.hostflyte.com: GNU/Linux OS: GNU/Linux -- 3.10.0-862.6.3.el7.x86_64 -- #1 SMP Tue Jun 26 16:32:21 UTC 2018 Machine: x86_64 (x86_64) Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8") CPU 0: Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz (5200.0 bogomips) x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET 02:55:47 up 3 days, 10:29, 1 user, load average: 0.00, 0.17, 0.39; runlevel 3 ------------------------------------------------------------------------ Benchmark Run: Mon May 20 2019 02:55:47 - 03:24:31 1 CPU in system; running 1 parallel copy of tests Dhrystone 2 using register variables 20693875.6 lps (10.0 s, 7 samples) Double-Precision Whetstone 3391.4 MWIPS (10.0 s, 7 samples) Execl Throughput 1960.6 lps (30.0 s, 2 samples) File Copy 1024 bufsize 2000 maxblocks 306812.9 KBps (30.0 s, 2 samples) File Copy 256 bufsize 500 maxblocks 85444.0 KBps (30.0 s, 2 samples) File Copy 4096 bufsize 8000 maxblocks 820093.2 KBps (30.0 s, 2 samples) Pipe Throughput 489059.0 lps (10.0 s, 7 samples) Pipe-based Context Switching 101501.3 lps (10.0 s, 7 samples) Process Creation 6539.4 lps (30.0 s, 2 samples) Shell Scripts (1 concurrent) 2674.3 lpm (60.0 s, 2 samples) Shell Scripts (8 concurrent) 364.4 lpm (60.1 s, 2 samples) System Call Overhead 427380.5 lps (10.0 s, 7 samples) System Benchmarks Index Values BASELINE RESULT INDEX Dhrystone 2 using register variables 116700.0 20693875.6 1773.3 Double-Precision Whetstone 55.0 3391.4 616.6 Execl Throughput 43.0 1960.6 456.0 File Copy 1024 bufsize 2000 maxblocks 3960.0 306812.9 774.8 File Copy 256 bufsize 500 maxblocks 1655.0 85444.0 516.3 File Copy 4096 bufsize 8000 maxblocks 5800.0 820093.2 1414.0 Pipe Throughput 12440.0 489059.0 393.1 Pipe-based Context Switching 4000.0 101501.3 253.8 Process Creation 126.0 6539.4 519.0 Shell Scripts (1 concurrent) 42.4 2674.3 630.7 Shell Scripts (8 concurrent) 6.0 364.4 607.4 System Call Overhead 15000.0 427380.5 284.9 ======== System Benchmarks Index Score 584.6 ======= Script description and score comparison completed! =======
本脚本适用于CentOS的下载脚本、
wget http://github.itzmx.com/1265578519/unixbench/master/5.1.3/unixbench.sh -O unixbench.sh; sh unixbench.sh
注:系统基准指数得分单核心分数为1000的为优秀,双核心为2000的优秀,以此类推,800为普通,低于500的是垃圾可以扔了
本文标题:【脚本】Linux系统服务器性能跑分测试脚本/UnixBench一键跑分测试脚本
本文链接:https://zhong-er.com/post/25.html
版权声明:本文使用「署名-非商业性使用-相同方式共享 4.0 国际」创作共享协议,转载或使用请遵守署名协议。
评论