回忆之城
生命在于折腾
posts - 575,comments - 9,trackbacks - 0

                                           UNXIBENCH5

一、             概述

    UNIXBENCH也是linuxunix测试系统基准性能的经典工具,UNIXBENCH测试包含了系统调用、读写、进程、2D3D、管道、运算、C库等系统基准性能,它的优点在于提供了对系统性能的一种评价体系,为系统评分,如此方便对系统作对比测试;但UNIXBENCH在网络性能测试欠缺。

二、             测试内容

    unixbench5测试内容包含了system2d3dmisc测试项。system测试系统的一些基本功能;2d测试2D图形加速;3d测试3D加速;misc测试诸如字符,整型等测试。详情见下面。

  system:

    dhry2reg         Dhrystone 2 using register variables

    whetstone-double Double-Precision Whetstone

    syscall          System Call Overhead

    pipe             Pipe Throughput

    context1         Pipe-based Context Switching

    spawn            Process Creation

    execl            Execl Throughput

    fstime-w         File Write 1024 bufsize 2000 maxblocks

    fstime-r         File Read 1024 bufsize 2000 maxblocks

    fstime           File Copy 1024 bufsize 2000 maxblocks

    fsbuffer-w       File Write 256 bufsize 500 maxblocks

    fsbuffer-r       File Read 256 bufsize 500 maxblocks

    fsbuffer         File Copy 256 bufsize 500 maxblocks

    fsdisk-w         File Write 4096 bufsize 8000 maxblocks

    fsdisk-r         File Read 4096 bufsize 8000 maxblocks

    fsdisk           File Copy 4096 bufsize 8000 maxblocks

    shell1           Shell Scripts (1 concurrent) (runs "looper 60 multi.sh 1")

    shell8           Shell Scripts (8 concurrent) (runs "looper 60 multi.sh 8")

    shell16          Shell Scripts (8 concurrent) (runs "looper 60 multi.sh 16")

2d:

    2d-rects         2D graphics: rectangles

    2d-lines         2D graphics: lines

    2d-circle        2D graphics: circles

    2d-ellipse       2D graphics: ellipses

    2d-shapes        2D graphics: polygons

    2d-aashapes      2D graphics: aa polygons

    2d-polys         2D graphics: complex polygons

    2d-text          2D graphics: text

    2d-blit          2D graphics: images and blits

    2d-window        2D graphics: windows

 

  3d:

    ubgears          3D graphics: gears

 

  misc:

    C                C Compiler Throughput ("looper 60 $cCompiler cctest.c")

    arithoh          Arithoh (huh?)

    short            Arithmetic Test (short) (this is arith.c configured for

                     "short" variables; ditto for the ones below)

    int              Arithmetic Test (int)

    long             Arithmetic Test (long)

    float            Arithmetic Test (float)

    double           Arithmetic Test (double)

    dc               Dc: sqrt(2) to 99 decimal places (runs

                     "looper 30 dc < dc.dat", using your system's copy of "dc")

    hanoi            Recursion Test -- Tower of Hanoi

    grep             Grep for a string in a large file, using your system's

                     copy of "grep"

    sysexec          Exercise fork() and exec().

 

 

 

三、            安装

    unixbench5包含systemgraphic测试,如果你需要测试graphic,则需要修改Makefile,不要注释掉"GRAPHIC_TESTS = defined,同时需要系统提供x11perf命令gl_glibs库。

    进入源包,执行

    make

四、            快速使用

   执行system测试方法:Run

   执行graphic测试方法:Run graphics

   执行system,graphics测试方法:Run gindex

 

五、            详细使用方法

1.    Run用法

     Run [ -q | -v ] [-i <n> ] [-c <n> [-c <n> ...]] [test ...]

选项说明:

-q 

不显示测试过程

-v

显示测试过程

-i <count>

执行次数,最低3次,默认10

-c <n>

每次测试并行ncopies(并行任务)

备注-c选项可以用来执行多次,如:

    Run -c 1 -c 4表示执行两次,第一次单个copies,第二次4copies的测试任务。

test

arithmetic       Runs arithoh, short, int, long, float, double,

                     and whetstone-double

    dhry             Alias for dhry2reg

    dhrystone        Alias for dhry2reg

    whets            Alias for whetstone-double

    whetstone        Alias for whetstone-double

    load             Runs shell1, shell8, and shell16

    misc             Runs C, dc, and hanoi

    speed            Runs the arithmetic and system groups

    oldsystem        Runs execl, fstime, fsbuffer, fsdisk, pipe, context1,

                     spawn, and syscall

    system           Runs oldsystem plus shell1, shell8, and shell16

    fs               Runs fstime-w, fstime-r, fstime, fsbuffer-w,

                     fsbuffer-r, fsbuffer, fsdisk-w, fsdisk-r, and fsdisk

    shell            Runs shell1, shell8, and shell16

 

    index            Runs the tests which constitute the official index:

                     the oldsystem group, plus dhry2reg, whetstone-double,

                     shell1, and shell8

                     See "The BYTE Index" below for more information.

    graphics         Runs the tests which constitute the graphics index:

                     2d-rects, 2d-ellipse, 2d-aashapes, 2d-text, 2d-blit,

                     2d-window, and ubgears

    gindex           Runs the index and graphics groups, to generate both

                     sets of index results

 

    all              Runs all tests

 

 

2.    测试说明

    对于多cpu系统的性能测试策略,需要统计单任务,多任务及其并行的性能增强。

4cpuPC为例,需要测试两次,4CPU就是要并行执行4copies

       Run -q -c 1 -c 4

3.    测试结果:

 BYTE UNIX Benchmarks (Version 5.1.2)

 

   System: localhost.localdomain: GNU/Linux

   OS: GNU/Linux -- 2.6.36.3newspec+ -- #5 SMP PREEMPT Wed Nov 30 13:46:30 CST 2011

   Machine: mips64 (mips64)

   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")

   CPU 0: ICT Loongson-3A V0.5 FPU V0.1 (0.0 bogomips)

         

   CPU 1: ICT Loongson-3A V0.5 FPU V0.1 (0.0 bogomips)

         

   CPU 2: ICT Loongson-3A V0.5 FPU V0.1 (0.0 bogomips)                        

         

   CPU 3: ICT Loongson-3A V0.5 FPU V0.1 (0.0 bogomips)

         

   12:07:50 up  3:27,  3 users,  load average: 1.61, 1.07, 0.94; runlevel 5

 

------------------------------------------------------------------------

Benchmark Run:   4 17 2012 12:07:50 - 12:35:51

4 CPUs in system; running 1 parallel copy of tests

 

Dhrystone 2 using register variables        1820525.3 lps   (10.0 s, 7 samples)

Double-Precision Whetstone                      352.7 MWIPS (10.0 s, 7 samples)

Execl Throughput                                739.7 lps   (29.8 s, 2 samples)

File Copy 1024 bufsize 2000 maxblocks         75780.3 KBps  (30.0 s, 2 samples)

File Copy 256 bufsize 500 maxblocks           27969.7 KBps  (30.0 s, 2 samples)

File Copy 4096 bufsize 8000 maxblocks         89566.6 KBps  (30.0 s, 2 samples)

Pipe Throughput                              208836.4 lps   (10.0 s, 7 samples)

Pipe-based Context Switching                  65757.7 lps   (10.0 s, 7 samples)

Process Creation                               2263.6 lps   (30.0 s, 2 samples)

Shell Scripts (1 concurrent)                    923.0 lpm   (60.1 s, 2 samples)

Shell Scripts (8 concurrent)                    206.6 lpm   (60.2 s, 2 samples)

System Call Overhead                         299206.2 lps   (10.0 s, 7 samples)

 

System Benchmarks Index Values               BASELINE       RESULT    INDEX

Dhrystone 2 using register variables         116700.0    1820525.3    156.0

Double-Precision Whetstone                       55.0        352.7     64.1

Execl Throughput                                 43.0        739.7    172.0

File Copy 1024 bufsize 2000 maxblocks          3960.0      75780.3    191.4

File Copy 256 bufsize 500 maxblocks            1655.0      27969.7    169.0

File Copy 4096 bufsize 8000 maxblocks          5800.0      89566.6    154.4

Pipe Throughput                               12440.0     208836.4    167.9

Pipe-based Context Switching                   4000.0      65757.7    164.4

Process Creation                                126.0       2263.6    179.7

Shell Scripts (1 concurrent)                     42.4        923.0    217.7

Shell Scripts (8 concurrent)                      6.0        206.6    344.4

System Call Overhead                          15000.0     299206.2    199.5

                                                                   ========

System Benchmarks Index Score                                         171.3

 

------------------------------------------------------------------------

Benchmark Run:   4 17 2012 12:35:51 - 13:04:03

4 CPUs in system; running 4 parallel copies of tests

 

Dhrystone 2 using register variables        7135020.6 lps   (10.0 s, 7 samples)

Double-Precision Whetstone                     1387.4 MWIPS (10.0 s, 7 samples)

Execl Throughput                               2658.2 lps   (29.8 s, 2 samples)

File Copy 1024 bufsize 2000 maxblocks        102436.7 KBps  (30.0 s, 2 samples)

File Copy 256 bufsize 500 maxblocks           33850.5 KBps  (30.0 s, 2 samples)

File Copy 4096 bufsize 8000 maxblocks        121124.7 KBps  (30.0 s, 2 samples)

Pipe Throughput                              815411.4 lps   (10.0 s, 7 samples)

Pipe-based Context Switching                 255881.9 lps   (10.0 s, 7 samples)

Process Creation                               5750.4 lps   (30.0 s, 2 samples)

Shell Scripts (1 concurrent)                   1617.7 lpm   (60.1 s, 2 samples)

Shell Scripts (8 concurrent)                    159.2 lpm   (60.7 s, 2 samples)

System Call Overhead                        1083489.3 lps   (10.0 s, 7 samples)

 

System Benchmarks Index Values               BASELINE       RESULT    INDEX

Dhrystone 2 using register variables         116700.0    7135020.6    611.4

Double-Precision Whetstone                       55.0       1387.4    252.2

Execl Throughput                                 43.0       2658.2    618.2

File Copy 1024 bufsize 2000 maxblocks          3960.0     102436.7    258.7

File Copy 256 bufsize 500 maxblocks            1655.0      33850.5    204.5

File Copy 4096 bufsize 8000 maxblocks          5800.0     121124.7    208.8

Pipe Throughput                               12440.0     815411.4    655.5

Pipe-based Context Switching                   4000.0     255881.9    639.7

Process Creation                                126.0       5750.4    456.4

Shell Scripts (1 concurrent)                     42.4       1617.7    381.5

Shell Scripts (8 concurrent)                      6.0        159.2    265.3

System Call Overhead                          15000.0    1083489.3    722.3

                                                                   ========

System Benchmarks Index Score                                         395.7

 

4.结果分析

       从上面的测试结果可以看出,但个并行的任务的得分为171.3,4个并行任务的得分为395.7。对比测试时需要关注这个值。

六、            高级用法

       unixbench也是一种灵活的测试框架,测试人员可以根据需求添加测试项。

       未完

七、            备注

posted on 2014-04-07 20:35 回忆之城 阅读(4682) 评论(0)  编辑 收藏 引用 所属分类: unix/linux
只有注册用户登录后才能发表评论。