パスワードを忘れた? アカウント作成
15056104 journal
AMD

cyber205の日記: いまどきのBYTEBENCHコンパイル方法

日記 by cyber205

BYTE UNIX BENCHMARK は改良を続けられていて現在も一応メンテナが居る。
現在はGoogleに勤務しているKelly Lucasさんがgithubでソースを公開している。
Linuxシステムにgitが入っていれば、最新版のソースを、
~/src/git$ git clone https://github.com/kdlucas/byte-unixbench.git
Cloning into 'byte-unixbench'...
remote: Enumerating objects: 204, done.
remote: Total 204 (delta 0), reused 0 (delta 0), pack-reused 204
Receiving objects: 100% (204/204), 200.92 KiB | 220.00 KiB/s, done.
Resolving deltas: 100% (105/105), done.
こうやって取得可能。ライセンスはGPL、READMEも付属。
cd byte-unixbench/UnixBench
make all で通常のベンチマークがコンパイル可能。
というか./Runスクリプト走らせれば普通にコンパイルしてベンチ完走まで自動実行。
コンパイル中には1個所、Warningが出る部分があるのだが、どういう意味なのか分からないのと、実害はなさそうなので放置している。

gcc_-o_pgms/execl_-Wall_-pedantic_-O3_-ffast-math_-march=native_-mtune=native_-I_./src_-DTIME_src/execl.c
In_file_included_from_src/execl.c:34:
src/big.c:_In_function_‘dummy’:
src/big.c:196:34:_warning:_‘%02d’_directive_writing_between_2_and_10_bytes_into_a_region_of_size_5_[-Wformat-overflow]
______sprintf(logname,_"masterlog.%02d",_firstuser/MAXCHILD);
__________________________________^~~~
src/big.c:196:23:_note:_directive_argument_in_the_range_[-178956970,_178956970]
______sprintf(logname,_"masterlog.%02d",_firstuser/MAXCHILD);
_______________________^~~~~~~~~~~~~~~~
src/big.c:196:6:_note:_‘sprintf’_output_between_13_and_21_bytes_into_a_destination_of_size_15
______sprintf(logname,_"masterlog.%02d",_firstuser/MAXCHILD);

どうもsprintfのフォーマット指定が桁数的に宜しくないと警告されているようなのだけど、ソースのどの部分をイジればいいのかよく分からないので放置。
計算は普通に通る。

マルチプロセッサ対応になってからは -c オプションでベンチマーク同時実行数を指定できる。例えば6コア12スレッドのRyzenプロセッサなら、
~/src/git/byte-unixbench/UnixBench$ ./Run -c 1 -c 6 -c 12
といった具合。ただし、8スレッド同時実行シェルスクリプト実行テストのように、一部のベンチマークは既にコンカレントなベンチマークで、システムによって処理が適切にCPUへ分配されるので -c オプションで大幅に性能が伸びてきたりはしないようだ。
最近のLinuxで動かすと、LC_ALLのようなLOCALE設定が存在しないと咎められるので、実行時には LC_ALL=C 辺りを変数に指定して動かすと警告を出さずに済む。
どうも、LOCALEによってベンチマークのスコアが変動するらしいので英語圏指定が無難だとか。
~/src/git/byte-unixbench/UnixBench$ LC_ALL=C ./Run -c 1 -c 6 -c 12
こんな感じか。Windows10にLinuxをインストールしている場合には特に出ないようだ。


------------------------------------------------------------------------
Benchmark_Run:_火__1月_05_2021_23:24:49_-_23:52:36
12_CPUs_in_system;_running_1_parallel_copy_of_tests

Dhrystone_2_using_register_variables_______51975383.5_lps___(10.0_s,_7_samples)
Double-Precision_Whetstone_____________________9571.8_MWIPS_(8.9_s,_7_samples)
Execl_Throughput________________________________238.3_lps___(29.7_s,_2_samples)
File_Copy_1024_bufsize_2000_maxblocks________127532.4_KBps__(30.0_s,_2_samples)
File_Copy_256_bufsize_500_maxblocks___________32557.9_KBps__(30.0_s,_2_samples)
File_Copy_4096_bufsize_8000_maxblocks________416717.4_KBps__(30.0_s,_2_samples)
Pipe_Throughput______________________________382489.7_lps___(10.0_s,_7_samples)
Pipe-based_Context_Switching__________________94839.3_lps___(10.0_s,_7_samples)
Process_Creation________________________________304.6_lps___(30.0_s,_2_samples)
Shell_Scripts_(1_concurrent)___________________1692.3_lpm___(60.0_s,_2_samples)
Shell_Scripts_(8_concurrent)____________________484.5_lpm___(60.1_s,_2_samples)
System_Call_Overhead_________________________650749.7_lps___(10.0_s,_7_samples)

System_Benchmarks_Index_Values_______________BASELINE_______RESULT____INDEX
Dhrystone_2_using_register_variables_________116700.0___51975383.5___4453.8
Double-Precision_Whetstone_______________________55.0_______9571.8___1740.3
Execl_Throughput_________________________________43.0________238.3_____55.4
File_Copy_1024_bufsize_2000_maxblocks__________3960.0_____127532.4____322.1
File_Copy_256_bufsize_500_maxblocks____________1655.0______32557.9____196.7
File_Copy_4096_bufsize_8000_maxblocks__________5800.0_____416717.4____718.5
Pipe_Throughput_______________________________12440.0_____382489.7____307.5
Pipe-based_Context_Switching___________________4000.0______94839.3____237.1
Process_Creation________________________________126.0________304.6_____24.2
Shell_Scripts_(1_concurrent)_____________________42.4_______1692.3____399.1
Shell_Scripts_(8_concurrent)______________________6.0________484.5____807.4
System_Call_Overhead__________________________15000.0_____650749.7____433.8
___________________________________________________________________========
System_Benchmarks_Index_Score_________________________________________360.5

------------------------------------------------------------------------
Benchmark_Run:_火__1月_05_2021_23:52:36_-_00:20:28
12_CPUs_in_system;_running_6_parallel_copies_of_tests

Dhrystone_2_using_register_variables______261668204.0_lps___(10.0_s,_7_samples)
Double-Precision_Whetstone____________________52698.6_MWIPS_(8.9_s,_7_samples)
Execl_Throughput________________________________720.8_lps___(30.0_s,_2_samples)
File_Copy_1024_bufsize_2000_maxblocks________122540.3_KBps__(30.0_s,_2_samples)
File_Copy_256_bufsize_500_maxblocks___________30004.5_KBps__(30.0_s,_2_samples)
File_Copy_4096_bufsize_8000_maxblocks________398225.9_KBps__(30.0_s,_2_samples)
Pipe_Throughput_____________________________1517337.4_lps___(10.0_s,_7_samples)
Pipe-based_Context_Switching_________________446095.7_lps___(10.0_s,_7_samples)
Process_Creation________________________________738.1_lps___(30.0_s,_2_samples)
Shell_Scripts_(1_concurrent)___________________4401.8_lpm___(60.1_s,_2_samples)
Shell_Scripts_(8_concurrent)____________________638.2_lpm___(60.2_s,_2_samples)
System_Call_Overhead________________________1588348.9_lps___(10.0_s,_7_samples)

System_Benchmarks_Index_Values_______________BASELINE_______RESULT____INDEX
Dhrystone_2_using_register_variables_________116700.0__261668204.0__22422.3
Double-Precision_Whetstone_______________________55.0______52698.6___9581.6
Execl_Throughput_________________________________43.0________720.8____167.6
File_Copy_1024_bufsize_2000_maxblocks__________3960.0_____122540.3____309.4
File_Copy_256_bufsize_500_maxblocks____________1655.0______30004.5____181.3
File_Copy_4096_bufsize_8000_maxblocks__________5800.0_____398225.9____686.6
Pipe_Throughput_______________________________12440.0____1517337.4___1219.7
Pipe-based_Context_Switching___________________4000.0_____446095.7___1115.2
Process_Creation________________________________126.0________738.1_____58.6
Shell_Scripts_(1_concurrent)_____________________42.4_______4401.8___1038.2
Shell_Scripts_(8_concurrent)______________________6.0________638.2___1063.6
System_Call_Overhead__________________________15000.0____1588348.9___1058.9
___________________________________________________________________========
System_Benchmarks_Index_Score_________________________________________843.2

------------------------------------------------------------------------
Benchmark_Run:_水__1月_06_2021_00:20:28_-_00:48:26
12_CPUs_in_system;_running_12_parallel_copies_of_tests

Dhrystone_2_using_register_variables______403777714.5_lps___(10.0_s,_7_samples)
Double-Precision_Whetstone____________________92749.1_MWIPS_(8.8_s,_7_samples)
Execl_Throughput________________________________721.5_lps___(29.9_s,_2_samples)
File_Copy_1024_bufsize_2000_maxblocks________117854.3_KBps__(30.0_s,_2_samples)
File_Copy_256_bufsize_500_maxblocks___________30271.0_KBps__(30.0_s,_2_samples)
File_Copy_4096_bufsize_8000_maxblocks________393143.3_KBps__(30.0_s,_2_samples)
Pipe_Throughput_____________________________2307971.6_lps___(10.0_s,_7_samples)
Pipe-based_Context_Switching_________________638199.9_lps___(10.0_s,_7_samples)
Process_Creation________________________________732.8_lps___(30.0_s,_2_samples)
Shell_Scripts_(1_concurrent)___________________4238.9_lpm___(60.1_s,_2_samples)
Shell_Scripts_(8_concurrent)____________________546.1_lpm___(60.5_s,_2_samples)
System_Call_Overhead________________________1948408.4_lps___(10.0_s,_7_samples)

System_Benchmarks_Index_Values_______________BASELINE_______RESULT____INDEX
Dhrystone_2_using_register_variables_________116700.0__403777714.5__34599.6
Double-Precision_Whetstone_______________________55.0______92749.1__16863.5
Execl_Throughput_________________________________43.0________721.5____167.8
File_Copy_1024_bufsize_2000_maxblocks__________3960.0_____117854.3____297.6
File_Copy_256_bufsize_500_maxblocks____________1655.0______30271.0____182.9
File_Copy_4096_bufsize_8000_maxblocks__________5800.0_____393143.3____677.8
Pipe_Throughput_______________________________12440.0____2307971.6___1855.3
Pipe-based_Context_Switching___________________4000.0_____638199.9___1595.5
Process_Creation________________________________126.0________732.8_____58.2
Shell_Scripts_(1_concurrent)_____________________42.4_______4238.9____999.7
Shell_Scripts_(8_concurrent)______________________6.0________546.1____910.2
System_Call_Overhead__________________________15000.0____1948408.4___1298.9
___________________________________________________________________========
System_Benchmarks_Index_Score_________________________________________974.7

性能INDEX値は随時変更されていて、現在はSPARC Station 20-61が基準スコアに採用されている。アーキテクチャはsun4mで、CPUはSuperScalarSPARC/60MHzだそうだ。
>128MBのRAMを搭載したSPARCstation20-61、SPARCストレージアレイ、およびSolaris2.3が新しいベースラインです。それぞれで10.0と評価されています
ベンチを回してスコアが"10"なら、このSPARC機と同じ性能ということらしい。
Solaris 2.4を稼働させているSPARC機が15~20(1.5倍から2倍速い)、
Linux 1.3.45を使っていた頃の486DX2-66(Compaq製)が9.1を叩き出す。
(SS20-61比で90%以上の性能。PCUNIXが流行るわけだ)
Pentium 75MHz程度のPCだと20なので、Solaris 2.4で動くSPARCと同等と。
(なるほど、PCUNIXが…以下略)

「グラフィクスベンチマーク機能」
後にビデオまわりの性能を測定する機能が追加されたのだけど、これが結構いろいろコンパイルに追加ライブラリが必要。「libx11-dev xlibmesa-glu-dev xibext-dev」辺りを追加すると、aptなら必要な他のライブラリも一緒にインストールされる。
libx11-dev : libpthread-stubs0-dev libx11-dev libxau-dev libxcb1-dev libxdmcp-dev x11proto-core-dev x11proto-dev xorg-sgml-doctools xtrans-dev
xlibmesa-glu-dev : libegl-dev libgl-dev libgl1-mesa-dev libgles-dev libgles1 libglu1-mesa-dev libglvnd-dev libglx-dev libopengl-dev libopengl0
xlibext-dev : x11proto-xext-dev
先日スコアを計測したCore i7 920@2.67GHzで軽く走らせてみるとこんな感じ。
X-windowのドライバはnouveauを使用。ビデオカードは GigabyteのRadeon入り。
> Subsystem: Gigabyte Technology Co., Ltd Cedar [Radeon HD 5000/6000/7350/8350 Series]

------------------------------------------------------------------------
Benchmark_Run:_Wed_Jan_06_2021_12:20:46_-_12:38:35
8_CPUs_in_system;_running_1_parallel_copy_of_tests

2D_graphics:_aa_polygons_______________________2689.7_score_(51.2_s,_2_samples)
2D_graphics:_ellipses___________________________820.0_score_(52.6_s,_2_samples)
2D_graphics:_images_and_blits_________________64956.6_score_(55.8_s,_2_samples)
2D_graphics:_rectangles________________________3648.1_score_(57.8_s,_2_samples)
2D_graphics:_text____________________________173176.7_score_(38.2_s,_2_samples)
2D_graphics:_windows____________________________123.8_score_(54.1_s,_2_samples)
3D_graphics:_gears_______________________________60.0_fps___(20.0_s,_2_samples)

2D_Graphics_Benchmarks_Index_Values__________BASELINE_______RESULT____INDEX
2D_graphics:_aa_polygons_________________________15.0_______2689.7___1793.1
2D_graphics:_ellipses____________________________15.0________820.0____546.7
2D_graphics:_images_and_blits____________________15.0______64956.6__43304.4
2D_graphics:_rectangles__________________________15.0_______3648.1___2432.1
2D_graphics:_text________________________________15.0_____173176.7_115451.1
2D_graphics:_windows_____________________________15.0________123.8_____82.6
___________________________________________________________________========
2D_Graphics_Benchmarks_Index_Score___________________________________3153.8

3D_Graphics_Benchmarks_Index_Values__________BASELINE_______RESULT____INDEX
3D_graphics:_gears_______________________________33.4_________60.0_____18.0
___________________________________________________________________========
3D_Graphics_Benchmarks_Index_Score_____________________________________18.0

------------------------------------------------------------------------
Benchmark_Run:_Wed_Jan_06_2021_12:38:35_-_12:38:35
8_CPUs_in_system;_running_8_parallel_copies_of_tests

2Dのベンチマークにはx11perfを使っているらしい。
3Dのベンチマークはgearsの表示が採用されている。

この議論は、cyber205 (4374)によって ログインユーザだけとして作成されたが、今となっては 新たにコメントを付けることはできません。
typodupeerror

日本発のオープンソースソフトウェアは42件 -- ある官僚

読み込み中...