给你的linux电脑跑个分(unixbench)

简介

第一次碰到unixbench是在看LinusTechTips视频的时候碰到的,那时候没有对这个软件产生兴趣,直到今天在看博客的时候又碰到了这个软件,所以想研究下。百度了下,unixbench 是一个用于测试unix系统性能的工具,源于1995 年,基线系统是“George”,一个工作站:SPARCstation 20‐61,128MB RAM,Solaris2.3,此系统的指数值被设定为10,这个其实和1米的定义一样,米原器的长度有多长1米就有多长 虽然linux服务器大部分都是没有图形环境的,但是UnixBench也包含一些非常简单的2D和3D图形测试。 同时UnixBench是一个基于系统的基准测试工具,不单纯是CPU 内存 或者磁盘测试工具。测试结果不仅仅取决于硬件,也取决于系统、开发库、甚至是编译器。

官网地址

https://github.com/cloudharmony/unixbench

安装

说了那么多,那就先安装一下吧 首先下载下来 wget https://s3.amazonaws.com/cloudbench/software/UnixBench5.1.3.tgz 网速可能比较慢,毕竟是在中国嘛,如果下载不了想要FQ可以联系我,解压 tar -xvf UnixBench5.1.3.tgz cd UnixBench/ 编译一下 make all 如果你不需要测试图形性能的话,可以在编译之前把Makefile中的GRAPHIC_TESTS = defined注释掉

使用

[bboysoul@bboysoul UnixBench]$ ./Run 
make all
make[1]: Entering directory '/home/bboysoul/下载/UnixBench'
Checking distribution of files
./pgms  exists
./src  exists
./testdir  exists
./tmp  exists
./results  exists
make[1]: Leaving directory '/home/bboysoul/下载/UnixBench'
sh: 3dinfo: command not found

   #    #  #    #  #  #    #          #####   ######  #    #   ####   #    #
   #    #  ##   #  #   #  #           #    #  #       ##   #  #    #  #    #
   #    #  # #  #  #    ##            #####   #####   # #  #  #       ######
   #    #  #  # #  #    ##            #    #  #       #  # #  #       #    #
   #    #  #   ##  #   #  #           #    #  #       #   ##  #    #  #    #
    ####   #    #  #  #    #          #####   ######  #    #   ####   #    #

   Version 5.1.3                      Based on the Byte Magazine Unix Benchmark

   Multi-CPU version                  Version 5 revisions by Ian Smith,
                                      Sunnyvale, CA, USA
   January 13, 2011                   johantheghost at yahoo period com

Wide character in print at ./Run line 1511.
Wide character in printf at ./Run line 1542.

1 x Dhrystone 2 using register variables  1

说明一下如果就执行Run就是做一个系统测试,如果执行Run graphics就是执行图形测试,执行Run gindex就是两个测试都执行,测试时间是相当漫长的。

➜  UnixBench ./Run 
make all
make[1]: Entering directory '/home/bboysoul/下载/UnixBench'
Checking distribution of files
./pgms  exists
./src  exists
./testdir  exists
./tmp  exists
./results  exists
make[1]: Leaving directory '/home/bboysoul/下载/UnixBench'
sh: 3dinfo: command not found

   #    #  #    #  #  #    #          #####   ######  #    #   ####   #    #
   #    #  ##   #  #   #  #           #    #  #       ##   #  #    #  #    #
   #    #  # #  #  #    ##            #####   #####   # #  #  #       ######
   #    #  #  # #  #    ##            #    #  #       #  # #  #       #    #
   #    #  #   ##  #   #  #           #    #  #       #   ##  #    #  #    #
    ####   #    #  #  #    #          #####   ######  #    #   ####   #    #

   Version 5.1.3                      Based on the Byte Magazine Unix Benchmark

   Multi-CPU version                  Version 5 revisions by Ian Smith,
                                      Sunnyvale, CA, USA
   January 13, 2011                   johantheghost at yahoo period com

Wide character in print at ./Run line 1511.
Wide character in printf at ./Run line 1542.

1 x Dhrystone 2 using register variables  1 2 3 4 5 6 7 8 9 10

1 x Double-Precision Whetstone  1 2 3 4 5 6 7 8 9 10

1 x Execl Throughput  1 2 3

1 x File Copy 1024 bufsize 2000 maxblocks  1 2 3

1 x File Copy 256 bufsize 500 maxblocks  1 2 3

1 x File Copy 4096 bufsize 8000 maxblocks  1 2 3

1 x Pipe Throughput  1 2 3 4 5 6 7 8 9 10

1 x Pipe-based Context Switching  1 2 3 4 5 6 7 8 9 10

1 x Process Creation  1 2 3

1 x System Call Overhead  1 2 3 4 5 6 7 8 9 10

1 x Shell Scripts (1 concurrent)  1 2 3

1 x Shell Scripts (8 concurrent)  1 2 3
Wide character in printf at ./Run line 1484.

2 x Dhrystone 2 using register variables  1 2 3 4 5 6 7 8 9 10

2 x Double-Precision Whetstone  1 2 3 4 5 6 7 8 9 10

2 x Execl Throughput  1 2 3

2 x File Copy 1024 bufsize 2000 maxblocks  1 2 3

2 x File Copy 256 bufsize 500 maxblocks  1 2 3

2 x File Copy 4096 bufsize 8000 maxblocks  1 2 3

2 x Pipe Throughput  1 2 3 4 5 6 7 8 9 10

2 x Pipe-based Context Switching  1 2 3 4 5 6 7 8 9 10

2 x Process Creation  1 2 3

2 x System Call Overhead  1 2 3 4 5 6 7 8 9 10

2 x Shell Scripts (1 concurrent)  1 2 3

2 x Shell Scripts (8 concurrent)  1 2 3
Wide character in printf at ./Run line 1484.

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: bboysoul: GNU/Linux
   OS: GNU/Linux -- 4.12.8-300.fc26.x86_64 -- #1 SMP Thu Aug 17 15:30:20 UTC 2017
   Machine: x86_64 (x86_64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Pentium(R) CPU G4400 @ 3.30GHz (6624.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 1: Intel(R) Pentium(R) CPU G4400 @ 3.30GHz (6627.9 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   09:13:46 up 47 min,  1 user,  load average: 0.21, 0.09, 0.13; runlevel 5

------------------------------------------------------------------------
Benchmark Run: 三 8月 30 2017 09:13:46 - 09:43:58
2 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       41945638.2 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     4354.7 MWIPS (11.2 s, 7 samples)
Execl Throughput                               6251.3 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        979539.2 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          279011.5 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       2398064.4 KBps  (30.0 s, 2 samples)
Pipe Throughput                             2201090.2 lps   (10.1 s, 7 samples)
Pipe-based Context Switching                 266281.9 lps   (10.0 s, 7 samples)
Process Creation                              11583.2 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   5999.6 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   1203.2 lpm   (60.0 s, 2 samples)
System Call Overhead                        3421506.1 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   41945638.2   3594.3
Double-Precision Whetstone                       55.0       4354.7    791.8
Execl Throughput                                 43.0       6251.3   1453.8
File Copy 1024 bufsize 2000 maxblocks          3960.0     979539.2   2473.6
File Copy 256 bufsize 500 maxblocks            1655.0     279011.5   1685.9
File Copy 4096 bufsize 8000 maxblocks          5800.0    2398064.4   4134.6
Pipe Throughput                               12440.0    2201090.2   1769.4
Pipe-based Context Switching                   4000.0     266281.9    665.7
Process Creation                                126.0      11583.2    919.3
Shell Scripts (1 concurrent)                     42.4       5999.6   1415.0
Shell Scripts (8 concurrent)                      6.0       1203.2   2005.3
System Call Overhead                          15000.0    3421506.1   2281.0
                                                                   ========
System Benchmarks Index Score                                        1678.5

------------------------------------------------------------------------
Benchmark Run: 三 8月 30 2017 09:43:58 - 10:13:14
2 CPUs in system; running 2 parallel copies of tests

Dhrystone 2 using register variables       76917222.0 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     8686.9 MWIPS (11.3 s, 7 samples)
Execl Throughput                               9869.9 lps   (29.3 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks       1248520.7 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          411350.0 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       3442009.0 KBps  (30.0 s, 2 samples)
Pipe Throughput                             4419527.8 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 705824.9 lps   (10.0 s, 7 samples)
Process Creation                              25434.8 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   8799.9 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   1485.6 lpm   (60.0 s, 2 samples)
System Call Overhead                        5259380.8 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   76917222.0   6591.0
Double-Precision Whetstone                       55.0       8686.9   1579.4
Execl Throughput                                 43.0       9869.9   2295.3
File Copy 1024 bufsize 2000 maxblocks          3960.0    1248520.7   3152.8
File Copy 256 bufsize 500 maxblocks            1655.0     411350.0   2485.5
File Copy 4096 bufsize 8000 maxblocks          5800.0    3442009.0   5934.5
Pipe Throughput                               12440.0    4419527.8   3552.7
Pipe-based Context Switching                   4000.0     705824.9   1764.6
Process Creation                                126.0      25434.8   2018.6
Shell Scripts (1 concurrent)                     42.4       8799.9   2075.5
Shell Scripts (8 concurrent)                      6.0       1485.6   2476.0
System Call Overhead                          15000.0    5259380.8   3506.3
                                                                   ========
System Benchmarks Index Score                                        2820.4

Have Fun

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

发表于

我来说两句

0 条评论
登录 后参与评论

相关文章

来自专栏Flutter&Dart

DartVM服务器开发(第二十二天)--RestfulApi封装

阅读该文章之前,我会默认的认为你已经看过我之前的文章,并知道如何使用数据库,开启服务器等!

23430
来自专栏ImportSource

Spring Boot下的TDD(测试驱动开发)

首先来看下TDD三原则吧: You are not allowed to write any production code unless it is to m...

2K110
来自专栏王硕

原 建立共享存储实验记录

379120
来自专栏Java后端技术

slf4j介绍以及实现原理窥探

  slf4j(全称是Simple Loging Facade For Java)是一个为Java程序提供日志输出的统一接口,并不是一个具体的日志实现方案,就好...

9720
来自专栏玩转JavaEE

Spring常用配置(二)

按:最近公众号文章主要是整理一些老文章,主要是个人CSDN上的博客,也会穿插一些新的技术点。 ---- OK,上篇博客我们介绍了Spring中一些常见的配置,上...

36230
来自专栏一个会写诗的程序员的博客

《Spring Boot极简教程》第9章 Spring Boot集成Scala混合Java开发参考资料

本章我们使用Spring Boot集成Scala混合Java开发一个Web性能测试平台。

21720
来自专栏walterlv - 吕毅的博客

Introducing MSTestEnhancer to make unit test result easy to read

发布于 2018-03-05 06:21 更新于 2018-08...

8810
来自专栏逆向技术

COM_第四讲_保存GUID_优化使用代码

    优化以前的代码,让使用者更方便 一丶 优化思路 1.我们可以将我们写的GUID(类工厂的ID)保存到注册表中,并且保存一下DLL的文件路径,遍历注册表去...

23400
来自专栏冷冷

Spring Cloud Gateway 聚合swagger文档

关于pigX:全网最新的微服务脚手架,Spring Cloud Finchley、oAuth2的最佳实践

50040
来自专栏Java架构师进阶

nginx性能优化及测试

处理器: Intel Xeon E5-2609 v2 @ 2.50GHz        *2 

17940

扫码关注云+社区

领取腾讯云代金券