LoginSignup
3
1

More than 5 years have passed since last update.

ZEAM開発ログ v.0.3.6 Mac Pro (Mid 2010) をグレードアップしてGPU駆動ベンチマークを実行してみた

Last updated at Posted at 2018-08-29

はじめに

ZACKYこと山崎進です。未明まで徹夜で研究助成申請書を書いていました。これから始発の新幹線に乗ってSWESTへ移動します。寝てしまうと乗り損ねてしまうので,寝ないようにこの記事を書いています。

「ZEAM開発ログ 目次」はこちら

fukuoka.ex #13「夏のfukuoka.ex祭=技術のパラダイムシフト」で登壇しました!

今までのまとめと,micro Elixir / ZEAM の構想のお披露目をしました。

ZEAM開発ログ第4回〜Pythonを捨ててElixirに移行する日

zeam-fukuoka.ex-20180824.png

さて本題

今回は Mac Pro (Mid 2010) のCPUユニットを入手したので,グレードアップしてGPU駆動ベンチマークを実行してみました。

使用した機材の仕様

Mac Pro (Mid 2010)

  • Processor:
    • グレードアップ前: 2.8 GHz Quad-Core Intel Xeon (プロセッサ数 1,物理コア数 4,論理コア数8)
    • グレードアップ後: 2 x 3.46 GHz 6-Core Intel Xeon (プロセッサ数 2,物理コア数 6 x 2,論理コア数 12 x 2)
  • Memory: 16 GB 1066 MHz DDR3
  • Graphics: ATI Radeon HD 5770 1024MB
  • SSD (BlackMagic)
    • Write 473.9MB/s
    • Read 507.4MB/s

CPUが最強構成になりました。

参考: iMac Pro (2017)

  • Processor: 2.3 GHz Intel Xeon W (プロセッサ数 1,物理コア18,論理コア36)
  • Memory: 32 GB 2666 MHz DDR4
  • Graphics: Radeon Pro Vega 64 16368MB
  • SSD (BlackMagic)
    • Write 2980.3MB/s
    • Read 2465.1MB/s

CPUとGPUは最高性能の構成,メモリとSSDは標準構成です。

ベンチマーク結果

Elixir 1.7.2 での実行結果です。

Mac Pro (Mid 2010)

グレードアップ前:

$ elixir -v
Erlang/OTP 21 [erts-10.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]

Elixir 1.7.2 (compiled with Erlang/OTP 21)
stages benchmarks1 benchmarks3 benchmarks8
pure Elixir pure Elixir Elixir/Rustler
loop inlining inside of Flow.map loop, passing by list, with Window
1 47.653314 37.392453 7.726425
2 23.946650 19.162682 25.177824
4 13.690849 12.417391 19.870013
8 12.361272 13.123296 18.489603
16 12.178206 11.210884 19.965729
32 12.540539 10.591330 22.487094
64 12.470190 10.878797 28.189323
128 12.262785 11.103630 38.555434
benchmarks_g2 benchmarks_t1 benchmarks_empty
Elixir/Rustler Elixir/Rustler Elixir/Rustler
OpenCL(GPU), inlining rayon Ruslter empty
2.423294 1.784261 1.313502
Rust CPU Rust OpenCL Rust rayon
Rust Rust Rust
CPU(1), loop OpenCL(GPU), inlining CPU(multi), loop
2.926270 1.545693 0.669060

グレードアップ後:

$ elixir -v
Erlang/OTP 21 [erts-10.0] [source] [64-bit] [smp:24:24] [ds:24:24:10] [async-threads:1] [hipe]

Elixir 1.7.2 (compiled with Erlang/OTP 21)
stages benchmarks1 benchmarks3 benchmarks8
pure Elixir pure Elixir Elixir/Rustler
loop inlining inside of Flow.map loop, passing by list, with Window
1 40.904522 32.825059 6.467740
2 18.963229 16.029738 22.610193
4 10.753609 9.113769 17.479965
8 6.362842 6.490303 18.599809
16 5.778699 5.820455 17.680624
32 6.820108 6.515120 19.793970
64 7.082667 6.924904 26.567416
128 7.124302 7.131452 39.737620
benchmarks_g2 benchmarks_t1 benchmarks_empty
Elixir/Rustler Elixir/Rustler Elixir/Rustler
OpenCL(GPU), inlining rayon Ruslter empty
1.733477 1.267730 1.842386
Rust CPU Rust OpenCL Rust rayon
Rust Rust Rust
CPU(1), loop OpenCL(GPU), inlining CPU(multi), loop
2.456480 0.900843 0.365043
  • pure Elixir で 1.82〜2.11 倍の速度向上
  • Rustler / GPU で 1.40 倍の速度向上
  • Rustler / CPU(m) で 1.41 倍の速度向上
  • Rust / GPU で 1.72 倍の速度向上
  • Rust / CPU(m) で 1.83 倍の速度向上

参考: iMac Pro (2017)

$ elixir -v
Erlang/OTP 21 [erts-10.0] [source] [64-bit] [smp:36:36] [ds:36:36:10] [async-threads:1] [hipe] [sharing-preserving]

Elixir 1.7.2 (compiled with Erlang/OTP 21)
stages benchmarks1 benchmarks3 benchmarks8
pure Elixir pure Elixir Elixir/Rustler
loop inlining inside of Flow.map loop, passing by list, with Window
1 22.823357 17.263715 4.577052
2 11.232475 8.647210 13.938190
4 5.954148 5.409378 10.471390
8 3.954989 4.129163 9.647276
16 4.225692 4.130425 10.081226
32 4.311388 3.965232 11.729024
64 4.157024 3.902033 15.635729
128 4.008359 4.323282 23.133601
benchmarks_g2 benchmarks_t1 benchmarks_empty
Elixir/Rustler Elixir/Rustler Elixir/Rustler
OpenCL(GPU), inlining rayon Ruslter empty
1.23860 0.67441 0.81719
Rust CPU Rust OpenCL Rust rayon
Rust Rust Rust
CPU(1), loop OpenCL(GPU), inlining CPU(multi), loop
1.212508 0.707200 0.251875

おわりに

やはり pure Elixir の方がCPUグレードアップの恩恵は大きかったです! またCPUだけでなくGPUも速くなっているのが興味深かったです。

というわけで,次回は「ZEAM開発ログ v.0.3.7 Windows PC サーバーでGPU駆動ベンチマークを実行してみた」をお送りします。お楽しみに!

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1