GCEのf1-microのUnix Bench

タイトルの通り、GCE(Google Compute Engine)のf1-micro(無料枠で使えるもの)のベンチマークを取りましたので、 備忘録として貼っておきます。

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

   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

------------------------------------------------------------------------------
   Use directories for:
      * File I/O tests (named fs***) = /home/xxx/byte-unixbench/UnixBench/tmp
      * Results                      = /home/xxx/byte-unixbench/UnixBench/results
------------------------------------------------------------------------------


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

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

   System: db: GNU/Linux
   OS: GNU/Linux -- 4.15.0-1029-gcp -- #31-Ubuntu SMP Thu Mar 21 09:40:28 UTC 2019
   Machine: x86_64 (x86_64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Xeon(R) CPU @ 2.20GHz (4400.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   00:12:07 up 3 days, 11:23,  1 user,  load average: 0.13, 0.03, 0.01; runlevel 2019-04-30

------------------------------------------------------------------------
Benchmark Run: Sat May 04 2019 00:12:07 - 00:43:23
1 CPU in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       19549752.8 lps   (10.1 s, 7 samples)
Double-Precision Whetstone                      965.7 MWIPS (33.6 s, 7 samples)
Execl Throughput                                771.9 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        112448.3 KBps  (30.1 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           37081.8 KBps  (30.1 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        246207.9 KBps  (30.1 s, 2 samples)
Pipe Throughput                              281428.4 lps   (10.2 s, 7 samples)
Pipe-based Context Switching                  66004.8 lps   (10.1 s, 7 samples)
Process Creation                               2366.5 lps   (30.2 s, 2 samples)
Shell Scripts (1 concurrent)                   1486.9 lpm   (60.2 s, 2 samples)
Shell Scripts (8 concurrent)                    205.7 lpm   (60.2 s, 2 samples)
System Call Overhead                         202476.7 lps   (10.1 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   19549752.8   1675.2
Double-Precision Whetstone                       55.0        965.7    175.6
Execl Throughput                                 43.0        771.9    179.5
File Copy 1024 bufsize 2000 maxblocks          3960.0     112448.3    284.0
File Copy 256 bufsize 500 maxblocks            1655.0      37081.8    224.1
File Copy 4096 bufsize 8000 maxblocks          5800.0     246207.9    424.5
Pipe Throughput                               12440.0     281428.4    226.2
Pipe-based Context Switching                   4000.0      66004.8    165.0
Process Creation                                126.0       2366.5    187.8
Shell Scripts (1 concurrent)                     42.4       1486.9    350.7
Shell Scripts (8 concurrent)                      6.0        205.7    342.8
System Call Overhead                          15000.0     202476.7    135.0
                                                                   ========
System Benchmarks Index Score                                         271.8

Amazon Lightsailのベンチマーク(UnixBench)とか貼っておきますね。と比べてみると、かなりパフォーマンスは低いようです。 最後のSystem Benchmarks Index Scoreでは、Lightsailの1971.6に対して、271.8と13%程度の性能です。

/proc/cpuinfoの内容は次の通りでした。

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 79
model name      : Intel(R) Xeon(R) CPU @ 2.20GHz
stepping        : 0
microcode       : 0x1
cpu MHz         : 2200.000
cache size      : 56320 KB
physical id     : 0
siblings        : 1
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf
bogomips        : 4400.00
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

この程度の性能だと、無料ならまだしも、お金を出して使う積極的な理由は見つかりませんね。 一番安い5USD/monthのAmazon Lightsailの方が圧倒的にコスパが良いと感じます。

2019/8/20追記

最後に、自宅のi5-8400上のUbuntuで実行した結果(SSDではなくHDDで実行したので、 その分は差し引いて考えてください)も貼っておきます。これと比較してみると、 上記Lightsailのベンチマークがあまりに良すぎる気がしました。 Pipe Throughput等一部の結果については、i5-8400の2倍以上の性能が出ている項目があります。

GCEの性能はCPUインテンシブな場合、下記i5-8400のシングルコアの1/3位の性能のようですね。

   #    #  #    #  #  #    #          #####   ######  #    #   ####   #    #
   #    #  ##   #  #   #  #           #    #  #       ##   #  #    #  #    #
   #    #  # #  #  #    ##            #####   #####   # #  #  #       ######
   #    #  #  # #  #    ##            #    #  #       #  # #  #       #    #
   #    #  #   ##  #   #  #           #    #  #       #   ##  #    #  #    #
    ####   #    #  #  #    #          #####   ######  #    #   ####   #    #
   
   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

------------------------------------------------------------------------------
   Use directories for:
      * File I/O tests (named fs***) = /home/xxx/test/byte-unixbench/UnixBench/tmp
      * Results                      = /home/xxx/test/byte-unixbench/UnixBench/results
------------------------------------------------------------------------------

Wide character in print at ./Run line 1643.
Wide character in printf at ./Run line 1674.

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 1574.

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

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

6 x Execl Throughput  1 2 3

6 x File Copy 1024 bufsize 2000 maxblocks  1 2 3

6 x File Copy 256 bufsize 500 maxblocks  1 2 3

6 x File Copy 4096 bufsize 8000 maxblocks  1 2 3

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

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

6 x Process Creation  1 2 3

6 x Process Creation  1 2 3

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

6 x Shell Scripts (1 concurrent)  1 2 3

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

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)
   
   System: desktop: GNU/Linux
   OS: GNU/Linux -- 4.15.0-55-generic -- #60-Ubuntu SMP Tue Jul 2 18:22:20 UTC 2019
   Machine: x86_64 (x86_64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz (5616.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 1: Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz (5616.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 2: Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz (5616.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 3: Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz (5616.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 4: Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz (5616.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 5: Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz (5616.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   20:35:51 up 3 days, 21:35,  4 users,  load average: 0.14, 0.35, 0.64; runlevel 2019-08-16

------------------------------------------------------------------------
Benchmark Run: 火  8月 20 2019 20:35:51 - 21:05:45
6 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       48461208.6 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     3479.5 MWIPS (19.7 s, 7 samples)
Execl Throughput                               5194.8 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        570326.6 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          153172.3 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       1859454.1 KBps  (30.0 s, 2 samples)
Pipe Throughput                             1020818.3 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 198110.8 lps   (10.0 s, 7 samples)
Process Creation                               3754.8 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   8822.3 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   1118.2 lpm   (60.0 s, 2 samples)
System Call Overhead                         606405.8 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   48461208.6   4152.6
Double-Precision Whetstone                       55.0       3479.5    632.6
Execl Throughput                                 43.0       5194.8   1208.1
File Copy 1024 bufsize 2000 maxblocks          3960.0     570326.6   1440.2
File Copy 256 bufsize 500 maxblocks            1655.0     153172.3    925.5
File Copy 4096 bufsize 8000 maxblocks          5800.0    1859454.1   3206.0
Pipe Throughput                               12440.0    1020818.3    820.6
Pipe-based Context Switching                   4000.0     198110.8    495.3
Process Creation                                126.0       3754.8    298.0
Shell Scripts (1 concurrent)                     42.4       8822.3   2080.7
Shell Scripts (8 concurrent)                      6.0       1118.2   1863.6
System Call Overhead                          15000.0     606405.8    404.3
                                                                   ========
System Benchmarks Index Score                                        1082.0

------------------------------------------------------------------------
Benchmark Run: 火  8月 20 2019 21:05:45 - 21:35:38
6 CPUs in system; running 6 parallel copies of tests

Dhrystone 2 using register variables      282703793.8 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                    20802.1 MWIPS (19.6 s, 7 samples)
Execl Throughput                              27682.6 lps   (29.8 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        841490.0 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          215572.2 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       2927671.9 KBps  (30.0 s, 2 samples)
Pipe Throughput                             5898172.1 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                1455977.0 lps   (10.0 s, 7 samples)
Process Creation                              65219.2 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                  11364.6 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   6600.7 lpm   (60.0 s, 2 samples)
System Call Overhead                        3353321.0 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0  282703793.8  24224.8
Double-Precision Whetstone                       55.0      20802.1   3782.2
Execl Throughput                                 43.0      27682.6   6437.8
File Copy 1024 bufsize 2000 maxblocks          3960.0     841490.0   2125.0
File Copy 256 bufsize 500 maxblocks            1655.0     215572.2   1302.6
File Copy 4096 bufsize 8000 maxblocks          5800.0    2927671.9   5047.7
Pipe Throughput                               12440.0    5898172.1   4741.3
Pipe-based Context Switching                   4000.0    1455977.0   3639.9
Process Creation                                126.0      65219.2   5176.1
Shell Scripts (1 concurrent)                     42.4      11364.6   2680.3
Shell Scripts (8 concurrent)                      6.0       6600.7  11001.2
System Call Overhead                          15000.0    3353321.0   2235.5
                                                                   ========
System Benchmarks Index Score                                        4370.2