io_adapter_benchmarkコマンドは、OBServerノードからバックアップメディアへの読み書きパフォーマンスを検証するために使用されます。本記事では、io_adapter_benchmarkコマンドのいくつかの使い方について説明します。
説明
ob_adminコマンドを実行する前に、
export OB_ADMIN_LOG_DIR=<your_log_path>を実行して、ob_adminの実行ログの保存ディレクトリを指定できます。your_log_pathは実際の状況に応じて置き換え、対応するディレクトリが存在することを確認してください。OceanBaseデータベースV4.3.5では、
io_adapter_benchmarkコマンドはV4.3.5 BP3バージョンで更新されました。以前のバージョンのコマンドについては、io_adapter_benchmarkを参照してください。
コマンドの紹介
io_adapter_benchmarkコマンドで-hオプションを使用して、コマンドの使用方法の説明を出力できます。
./ob_admin io_adapter_benchmark -h
出力結果は次のとおりです:
Usage: io_adapter_benchmark command [command args] [options]
commands:
-h, --help display this message.
options:
-d, --file-path-prefix required, absolute file path with file prefix
-s, --storage-info required, oss/cos should provide storage info
-p, --type specifies the test type, the values can be auto-run, write, append, multi, read, del, is_exist, read_user_provided
-t, --thread-num thread num
-r, --max-task-run-times max task run times for each thread, default is 10
-l, --time-limit time limit in second
-o, --object-size object size, default is 2097152, 2M
-n, --object-num object num, default is 10
-f, --fragment-size for read operations, 'fragment-size' denotes the expected size of data to be read, while for append/multipart write tasks, it specifies the size of each individual pwrite operation.
--write-size specifies the object size in put task when type is auto-run, default is 2097152, 2M
--append-size specifies the object size in append-write task when type is auto-run, default is 67108864, 64M
--append-fragment-size specifies the fragment size in append-write task when type is auto-run, default is 0, denote each time random
--multi-size specifies the object size in multi-write task when type is auto-run, default is 67108864, 64M
--multi-fragment-size specifies the fragment size in multi-write task when type is auto-run, default is 2097152, 2M
-j, --is-adaptive use adative interface
-c, --clean-after-execution clean after execution
-e, --s3_url_encode_type set S3 protocol url encode type
-i, --sts_credential set sts credential
-a enable obdal
samples:
test nfs device:
ob_admin io_adapter_benchmark -d'file:///home/admin/backup_info'
test object device:
ob_admin io_adapter_benchmark -d'oss://home/admin/backup_info' -s'host=xxx.com&access_id=111&access_key=222'
ob_admin io_adapter_benchmark -d's3://home/admin/backup_info' -s'host=xxx.com&access_id=111&access_key=222®ion=333' -e'compliantRfc3986Encoding'
ob_admin io_adapter_benchmark -d'oss://home/admin/backup_info' -s'host=xxx.com&role_arn=xxx'-i'sts_url=xxx&sts_ak=aaa&sts_sk=bbb'
各オプションの説明は以下のとおりです:
| オプション | 説明 |
|---|---|
| -d/--file-path-prefix | テストディレクトリを指定します。絶対ファイルパスで、ファイル名のプレフィックスを含める必要があります。 |
| -s/--storage-info | オブジェクトストレージ検証情報を指定します。 |
| -p/--type | テストタイプを指定します。有効な値は auto-run、write、append、multi、read、del、is_exist、read_user_provided です。各値の詳細については、以下の値の説明を参照してください。 |
| -t/--thread-num | 並列スレッド数を設定します。 |
| -r/--max-task-run-times | 1つのスレッドがタスクを実行する回数を設定します。デフォルト値は10です。 |
| -l/--time-limit | 総実行時間制限を設定します。 |
| -o/--object-size | オブジェクトのサイズを設定します。デフォルトは2097152バイト(2MB)です。 |
| -n/--object-num | オブジェクト数を設定します。デフォルトは10です。 |
| -f/--fragment-size | read操作では、このオプションで1回の読み取りデータのサイズを指定します。append/multipart write操作では、このオプションで1回の書き込みデータのサイズを指定します。 |
| --write-size | -p/--type が auto-run に指定されている場合に使用されます。putタスク内のオブジェクトサイズを指定します。デフォルトは2097152バイト(2MB)です。 |
| --append-size | -p/--type が auto-run に指定されている場合に使用されます。追加書き込みタスク内のオブジェクトサイズを指定します。デフォルトは67108864バイト(64MB)です。 |
| --append-fragment-size | -p/--type が auto-run に指定されている場合に使用されます。追加書き込みタスク内のフラグメントサイズを指定します。デフォルト値は 0 で、これは毎回ランダムであることを意味します。 |
| --multi-size | -p/--type が auto-run に指定されている場合に使用されます。multipart writeファイルのオブジェクトサイズを指定します。デフォルトは67108864バイト(64MB)です。 |
| --multi-fragment-size | -p/--type が auto-run に指定されている場合に使用されます。追加書き込みタスク内のフラグメントサイズを指定します。デフォルト値は 0 で、これは毎回ランダムであることを意味します。 |
| -j/--is-adaptive | 自動適応インターフェースを使用するかどうかを設定します。値は不要です。コマンド実行時にこのオプションを指定すると、自動適応インターフェースが使用されることを示します。 |
| -c/--clean-after-execution | タスク完了後にディレクトリをクリーンアップするかどうかを設定します。値は不要です。コマンド実行時にこのオプションを指定すると、タスク完了後にディレクトリをクリーンアップすることを示します。 |
| -e/--s3_url_encode_type | S3プロトコルのURLエンコードタイプを設定します。 |
| -i/--sts_credential | STS (Security Token Service, 一時セキュリティトークンサービス)資格情報を設定します。 |
| -a | obdalを有効にするかどうかを設定します。obdalは、opendalに基づいて開発されたオブジェクトストレージ統合フレームワークです。値は不要です。コマンド実行時にこのオプションを指定すると、obdalが有効になります。 |
-p/--typeオプションでサポートされる値の説明は以下のとおりです:
| 値 | 意味 |
|---|---|
auto-run |
ワンクリック実行モードで、以下のテストを順番に実行します:
|
write |
普通のファイルへの書き込みを表します。各スレッドが個別のディレクトリに書き込みます。 |
append |
追記書き込みを表します。 |
multi |
分割アップロードを表します。 |
read |
ファイルの読み取りを表します。readタスクを実行するには、まずデータを書き込む必要があります。 |
del |
データの削除を表します。各スレッドが個別のディレクトリ内のデータを削除します。設定されたスレッド数は書き込み時のスレッド数と等しくなければなりません。 |
is_exist |
指定されたパスのメタ情報を並列で読み取ります。 |
read_user_provided |
指定されたファイルを並列で読み取ります。 |
例
一括実行
./ob_admin io_adapter_benchmark -d'oss://oss_bucket/test_path' -s'host=xxx.com&access_id=xxx&access_key=xxx'
ここでは簡単な例を示していますが、-t オプションで並列度を指定し、-r オプションで各スレッドが実行する回数を指定し、-n オプションで読み込むファイルの数を指定することができます(この数は -r オプションより大きくできません)。これらのオプションを設定すると、一括実行中のすべてのテストに適用されます。
コマンドを実行した後、出力は次のようになります:
succ to open, filename=/home/admin/log/ob_admin_log/ob_admin.log, fd=6, wf_fd=2
succ to open, filename=/home/admin/log/ob_admin_log/ob_admin_rs.log, fd=7, wf_fd=2
------------------------------{Testing}------------------------------
| Task Config|{thread_num:4, max_task_runs:10, time_limit_s:-1, obj_size:2097152, obj_num:10, fragment_size:-1, is_adaptive:false, BenchmarkTaskTypeStr[type_]:"NORMAL_WRITE"}
| Task work path|oss://oss_bucket/test_path/test_io_device_2025-04-10-10:36:09/write
| Status|SUCCESS
| Total operation num|40
| Total execution time|1.217186 s
| Total user time|0.325087 s
| Total system time|0.054429 s
| CPU usage for 100MB/s BW|47.439500% per 100MB/s
| Total throughput bytes|83886080
| Total QPS|32.862685
| Per Thread QPS|8.215671
| Total BW|65.725370 MB/s
| Per Thread BW|16.431342 MB/s
| Total Op Time Map|total_entry=40, min_ms=63, th_50_ms=81, th_90_ms=119, th_99_ms=181, th_999_ms=181, max_ms=197
| Open Time Map|Empty Time Map
| Close Op Time Map|Empty Time Map
------------------------------{Testing}------------------------------
| Task Config|{thread_num:4, max_task_runs:10, time_limit_s:-1, obj_size:2097152, obj_num:10, fragment_size:16384, is_adaptive:false, BenchmarkTaskTypeStr[type_]:"READ"}
| Task work path|oss://oss_bucket/test_path/test_io_device_2025-04-10-10:36:09/write
| Status|SUCCESS
| Total operation num|40
| Total execution time|0.360966 s
| Total user time|0.024254 s
| Total system time|0.005977 s
| CPU usage for 100MB/s BW|483.696000% per 100MB/s
| Total throughput bytes|655360
| Total QPS|110.813761
| Per Thread QPS|27.703440
| Total BW|1.731465 MB/s
| Per Thread BW|0.432866 MB/s
| Total Op Time Map|total_entry=40, min_ms=17, th_50_ms=28, th_90_ms=37, th_99_ms=41, th_999_ms=41, max_ms=48
| Open Time Map|Empty Time Map
| Close Op Time Map|Empty Time Map
------------------------------{Testing}------------------------------
| Task Config|{thread_num:4, max_task_runs:10, time_limit_s:-1, obj_size:2097152, obj_num:10, fragment_size:2097152, is_adaptive:false, BenchmarkTaskTypeStr[type_]:"READ"}
| Task work path|oss://oss_bucket/test_path/test_io_device_2025-04-10-10:36:09/write
| Status|SUCCESS
| Total operation num|40
| Total execution time|0.427612 s
| Total user time|0.074748 s
| Total system time|0.080815 s
| CPU usage for 100MB/s BW|19.445375% per 100MB/s
| Total throughput bytes|83886080
| Total QPS|93.542744
| Per Thread QPS|23.385686
| Total BW|187.085489 MB/s
| Per Thread BW|46.771372 MB/s
| Total Op Time Map|total_entry=40, min_ms=20, th_50_ms=39, th_90_ms=48, th_99_ms=67, th_999_ms=67, max_ms=83
| Open Time Map|Empty Time Map
| Close Op Time Map|Empty Time Map
------------------------------{Testing}------------------------------
| Task Config|{thread_num:4, max_task_runs:10, time_limit_s:-1, obj_size:67108864, obj_num:10, fragment_size:-1, is_adaptive:false, BenchmarkTaskTypeStr[type_]:"APPEND_WRITE"}
| Task work path|oss://oss_bucket/test_path/test_io_device_2025-04-10-10:36:09/append
| Status|SUCCESS
| Total operation num|40
| Total execution time|26.289182 s
| Total user time|1.519549 s
| Total system time|1.215221 s
| CPU usage for 100MB/s BW|10.682695% per 100MB/s
| Total throughput bytes|2684354560
| Total QPS|1.521538
| Per Thread QPS|0.380385
| Total BW|97.378458 MB/s
| Per Thread BW|24.344614 MB/s
| Total Op Time Map|total_entry=40, min_ms=1831, th_50_ms=2462, th_90_ms=2822, th_99_ms=3008, th_999_ms=3008, max_ms=3576
| Open Time Map|total_entry=40, min_ms=0, th_50_ms=0, th_90_ms=0, th_99_ms=0, th_999_ms=0, max_ms=0
| Close Op Time Map|total_entry=40, min_ms=0, th_50_ms=0, th_90_ms=0, th_99_ms=0, th_999_ms=0, max_ms=0
------------------------------{Testing}------------------------------
| Task Config|{thread_num:4, max_task_runs:10, time_limit_s:-1, obj_size:67108864, obj_num:10, fragment_size:2097152, is_adaptive:false, BenchmarkTaskTypeStr[type_]:"READ"}
| Task work path|oss://oss_bucket/test_path/test_io_device_2025-04-10-10:36:09/append
| Status|SUCCESS
| Total operation num|40
| Total execution time|2.459746 s
| Total user time|0.112226 s
| Total system time|0.119849 s
| CPU usage for 100MB/s BW|29.009375% per 100MB/s
| Total throughput bytes|83886080
| Total QPS|16.261842
| Per Thread QPS|4.065460
| Total BW|32.523683 MB/s
| Per Thread BW|8.130921 MB/s
| Total Op Time Map|total_entry=40, min_ms=95, th_50_ms=215, th_90_ms=254, th_99_ms=280, th_999_ms=280, max_ms=338
| Open Time Map|Empty Time Map
| Close Op Time Map|Empty Time Map
------------------------------{Testing}------------------------------
| Task Config|{thread_num:4, max_task_runs:10, time_limit_s:-1, obj_size:67108864, obj_num:10, fragment_size:2097152, is_adaptive:false, BenchmarkTaskTypeStr[type_]:"MULTIPART_WRITE"}
| Task work path|oss://oss_bucket/test_path/test_io_device_2025-04-10-10:36:09/multi
| Status|SUCCESS
| Total operation num|40
| Total execution time|18.631304 s
| Total user time|1.902340 s
| Total system time|1.163696 s
| CPU usage for 100MB/s BW|11.976703% per 100MB/s
| Total throughput bytes|2684354560
| Total QPS|2.146924
| Per Thread QPS|0.536731
| Total BW|137.403158 MB/s
| Per Thread BW|34.350789 MB/s
| Total Op Time Map|total_entry=40, min_ms=1754, th_50_ms=1856, th_90_ms=1921, th_99_ms=1969, th_999_ms=1969, max_ms=1984
| Open Time Map|total_entry=40, min_ms=15, th_50_ms=19, th_90_ms=27, th_99_ms=38, th_999_ms=38, max_ms=43
| Close Op Time Map|total_entry=40, min_ms=46, th_50_ms=62, th_90_ms=85, th_99_ms=92, th_999_ms=92, max_ms=119
------------------------------{Testing}------------------------------
| Task Config|{thread_num:4, max_task_runs:10, time_limit_s:-1, obj_size:67108864, obj_num:10, fragment_size:2097152, is_adaptive:false, BenchmarkTaskTypeStr[type_]:"READ"}
| Task work path|oss://oss_bucket/test_path/test_io_device_2025-04-10-10:36:09/multi
| Status|SUCCESS
| Total operation num|40
| Total execution time|0.573971 s
| Total user time|0.060743 s
| Total system time|0.069399 s
| CPU usage for 100MB/s BW|16.267750% per 100MB/s
| Total throughput bytes|83886080
| Total QPS|69.689932
| Per Thread QPS|17.422483
| Total BW|139.379864 MB/s
| Per Thread BW|34.844966 MB/s
| Total Op Time Map|total_entry=40, min_ms=36, th_50_ms=47, th_90_ms=73, th_99_ms=77, th_999_ms=77, max_ms=117
| Open Time Map|Empty Time Map
| Close Op Time Map|Empty Time Map
普通ファイルの書き込み
./ob_admin io_adapter_benchmark -d 'oss://oss_bucket/test_path' \
-s 'host=xxx.com&access_id=111&access_key=222' \
-o 100 \ # オブジェクトサイズを100バイトに設定
-t 4 \ # 4スレッド並列処理
-r 10 \ # 1つのスレッドが書き込むオブジェクト数の上限は10個
-p 'write' \
-c \
上記のコマンドは、oss_bucket/test_path ディレクトリで通常ファイルの書き込みパフォーマンステストを実行します。4つのスレッド(-t 4 で指定)が並行してこのディレクトリにオブジェクトを書き込みます。各オブジェクトのサイズは100バイト(-o 100 で指定)です。各スレッドが10個のオブジェクトを書き込んだ後(-r 10 で指定)、書き込みが停止します。テスト完了後にディレクトリがクリアされます(-c で指定)。
コマンドの実行結果は次のとおりです:
succ to open, filename=/root/log/ob_admin.log, fd=5, wf_fd=2
succ to open, filename=/root/log/ob_admin_rs.log, fd=6, wf_fd=2
------------------------------{Testing}------------------------------
| Task Config|{thread_num:4, max_task_runs:10, time_limit_s:-1, obj_size:100, obj_num:10, fragment_size:2097152, is_adaptive:false, BenchmarkTaskTypeStr[type_]:"NORMAL_WRITE"}
| Task work path|oss://oss_bucket/test_path
| Status|SUCCESS
| Total operation num|40
| Total execution time|0.244780 s
| Total user time|0.014648 s
| Total system time|0.003975 s
| CPU usage for 100MB/s BW|48819.077120% per 100MB/s
| Total throughput bytes|4000
| Total QPS|163.412043
| Per Thread QPS|40.853011
| Total BW|0.015584 MB/s
| Per Thread BW|0.003896 MB/s
| Total Op Time Map|total_entry=40, min_ms=12, th_50_ms=16, th_90_ms=29, th_99_ms=77, th_999_ms=77, max_ms=78
| Open Time Map|Empty Time Map
| Close Op Time Map|Empty Time Ma
ファイル追記書き込み
./ob_admin io_adapter_benchmark -d 'oss://home/admin/backup_info' \
-s 'host=xxx.com&access_id=111&access_key=222' \
-o 100 \ # オブジェクトサイズを100バイトに設定
-t 4 \ # 4スレッド並列
-r 10 \ # 1スレッドが書き込むオブジェクト数の上限は10個
-p 'append' \
-f 10 \ # 1つのオブジェクトを書き込む際、1回ごとに10バイトをappendし、合計10回で1つのオブジェクト(この例では100バイト)の書き込みを完了する
コマンドの実行結果は次のとおりです:
succ to open, filename=/tmp/ob_admin.log, fd=3, wf_fd=2
succ to open, filename=/tmp/ob_admin_rs.log, fd=4, wf_fd=2
------------------------------{Testing}------------------------------
| Task Config|{thread_num:4, max_task_runs:10, time_limit_s:-1, obj_size:2097152, obj_num:-1, fragment_size:1048576, is_adaptive:false, type:1}
| Task work path|oss://home/admin/backup_info
| Status|SUCCESS
| Total operation num|40
| Total execution time|5.685847 s
| Total user time|0.776306 s
| Total system time|0.073172 s
| CPU usage for 100MB/s BW|106.184750% per 100MB/s
| Total throughput bytes|83886080
| Total QPS|7.035012
| Per Thread QPS|1.758753
| Total BW|14.070023 MB/s
| Per Thread BW|3.517506 MB/s
| Total Op Time Map|total_entry=40, min_ms=364, th_50_ms=419, th_90_ms=704, th_99_ms=754, th_999_ms=754, max_ms=963
| Open Time Map|total_entry=40, min_ms=0, th_50_ms=3, th_90_ms=3, th_99_ms=3, th_999_ms=3, max_ms=3
| Close Op Time Map|total_entry=40, min_ms=103, th_50_ms=112, th_90_ms=123, th_99_ms=124, th_999_ms=124, max_ms=125
パーティションアップロード
./ob_admin io_adapter_benchmark -d 'oss://home/admin/backup_info' \
-s 'host=xxx.com&access_id=111&access_key=222' \
-o 100 \ # オブジェクトサイズを100バイトに設定
-t 4 \ # 4スレッド並列
-r 10 \ # 1つのスレッドが書き込むオブジェクト数の上限は10個
-p 'multi' \
-f 10 \ # 1回の書き込みサイズは10バイト、これは1つのオブジェクト(この例では100バイト)に10回の書き込み操作が含まれるということに相当します
現在のオブジェクトストレージのパーティションアップロード実装では、各partが8MBに集計されるまで実際に1つのパーティションには書き込まれません。つまり、書き込み回数はpart数とは一致しません。
コマンドを実行した後の出力は次のとおりです:
succ to open, filename=/tmp/ob_admin.log, fd=3, wf_fd=2
succ to open, filename=/tmp/ob_admin_rs.log, fd=4, wf_fd=2
------------------------------{Testing}------------------------------
| Task Config|{thread_num:4, max_task_runs:10, time_limit_s:-1, obj_size:2097152, obj_num:-1, fragment_size:1048576, is_adaptive:false, type:2}
| Task work path|oss://home/admin/backup_info
| Status|SUCCESS
| Total operation num|40
| Total execution time|7.135682 s
| Total user time|0.765570 s
| Total system time|0.095029 s
| CPU usage for 100MB/s BW|107.574875% per 100MB/s
| Total throughput bytes|83886080
| Total QPS|5.605631
| Per Thread QPS|1.401408
| Total BW|11.211262 MB/s
| Per Thread BW|2.802815 MB/s
| Total Op Time Map|total_entry=40, min_ms=314, th_50_ms=411, th_90_ms=762, th_99_ms=833, th_999_ms=833, max_ms=1002
| Open Time Map|total_entry=40, min_ms=43, th_50_ms=50, th_90_ms=57, th_99_ms=99, th_999_ms=99, max_ms=102
| Close Op Time Map|total_entry=40, min_ms=269, th_50_ms=357, th_90_ms=708, th_99_ms=781, th_999_ms=781, max_ms=900
ファイルの読み込み
ob_admin io_adapter_benchmark -d 'oss://home/admin/backup_info' \
-s 'host=xxx.com&access_id=111&access_key=222' \
-o 100 \ # オブジェクトサイズを100バイトに設定
-t 4 \ # 4スレッド並列処理
-r 10 \ # 1スレッドあたりのread操作上限を10個に設定
-p 'read' \
-f 10 \ # 1回のread操作で読み取るデータサイズ。ランダムに10バイトデータを読み込むことを意味します。
\ # 全オブジェクトを読み取る必要がある場合は、-f'obj_size'と設定できます。
-j 1 \ # バックアップディレクトリがS3/OBS形式の場合、-j'1'を設定する必要があります。
-n 10 \ # データ書き込み時に、1スレッドあたりの書き込みオブジェクト数を10に設定
上記コマンドを実行する際は、まずデータを書き込む必要があり、読み取りタスクを実行する前に -n オプションを使用して各スレッドがすでに書き込んだオブジェクト数(書き込みタスクコマンドにおける -r の対応する値)を指定し、並列数(-t)は書き込みデータ時の指定された並列数を超えてはなりません。
説明
複数の書き込みコマンドを実行した場合、読み取りコマンドで -d で指定された対応するディレクトリ内の最新の書き込みコマンドを基準とします。つまり、-n と -r の両方を対応するコマンドに基づいて設定する必要があります。
コマンド実行後の出力は次のとおりです:
succ to open, filename=/tmp/ob_admin.log, fd=3, wf_fd=2
succ to open, filename=/tmp/ob_admin_rs.log, fd=4, wf_fd=2
------------------------------{Testing}------------------------------
| Task Config|{thread_num:4, max_task_runs:20, time_limit_s:-1, obj_size:2097152, obj_num:10, fragment_size:1048576, is_adaptive:true, type:3}
| Task work path|oss://home/admin/backup_info
| Status|SUCCESS
| Total operation num|80
| Total execution time|2.970364 s
| Total user time|0.289431 s
| Total system time|0.217354 s
| CPU usage for 100MB/s BW|63.348125% per 100MB/s
| Total throughput bytes|83886080
| Total QPS|26.932726
| Per Thread QPS|6.733182
| Total BW|26.932726 MB/s
| Per Thread BW|6.733182 MB/s
| Total Op Time Map|total_entry=80, min_ms=114, th_50_ms=132, th_90_ms=164, th_99_ms=356, th_999_ms=356, max_ms=389
| Open Time Map|Empty Time Map
| Close Op Time Map|Empty Time Map
データの削除
ob_admin io_adapter_benchmark -d 'oss://home/admin/backup_info' \
-s 'host=xxx.com&access_id=111&access_key=222' \
-t 4 \ # 4 スレッドによる並列処理
-p 'del' \
-j 1 \ # バックアップディレクトリがS3/OBS形式の場合、-j '1'を設定する必要があります。
-r 10 \ # 書き込み時に指定した書き込み数と等しくなければなりません
上記のコマンドを実行する際は、各スレッドが単一のディレクトリ内のデータを削除するため、設定されたスレッド数(-t)が書き込み時に設定した並列数と等しい必要があります。
説明
複数の書き込みコマンドを実行した場合、読み取りコマンドで -d に指定された対応するディレクトリ内の最新の書き込みコマンドが適用されます。つまり、-t と -r の両方を対応するコマンドに基づいて設定する必要があります。
コマンドの実行後、出力結果は次のようになります:
succ to open, filename=/tmp/ob_admin.log, fd=3, wf_fd=2
succ to open, filename=/tmp/ob_admin_rs.log, fd=4, wf_fd=2
------------------------------{Testing}------------------------------
| Task Config|{thread_num:4, max_task_runs:20, time_limit_s:-1, obj_size:-1, obj_num:-1, fragment_size:-1, is_adaptive:true, type:4}
| Task work path|oss://home/admin/backup_info
| Status|SUCCESS
| Total operation num|80
| Total execution time|2.136603 s
| Total user time|0.155563 s
| Total system time|0.014127 s
| Total CPU usage|7.942046%
| Total throughput bytes|0
| Total QPS|37.442613
| Per Thread QPS|9.360653
| Total BW|0.000000 MB/s
| Per Thread BW|0.000000 MB/s
| Total Op Time Map|total_entry=80, min_ms=77, th_50_ms=94, th_90_ms=105, th_99_ms=159, th_999_ms=159, max_ms=166
| Open Time Map|Empty Time Map
| Close Op Time Map|Empty Time Map
指定パスのメタ情報の並列読み取り
ob_admin io_adapter_benchmark -d 'oss://home/admin/backup_info' \
-s 'host=xxx.com&access_id=111&access_key=222' \
-t 4 \ # 4スレッド並列
-p 'is_exist' \
-r 100 \ # 単一スレッドで100回読み取り
コマンド実行後の出力は次のとおりです:
------------------------------{Testing}------------------------------
| Task Config|{thread_num:4, max_task_runs:100, time_limit_s:-1, obj_size:2097152, obj_num:10, fragment_size:-1, is_adaptive:false, type_str:"IS_EXIST"}
| Task work path|oss://home/admin/backup_info
| Status|SUCCESS
| Total operation num|400
| Total execution time|8.711115 s
| Total user time|0.122446 s
| Total system time|0.034527 s
| Total CPU usage|1.801985%
| Total throughput bytes|0
| Total QPS|45.918347
| Per Thread QPS|11.479587
| Total BW|0.000000 MB/s
| Per Thread BW|0.000000 MB/s
| Total Op Time Map|total_entry=400, min_ms=33, th_50_ms=35, th_90_ms=41, th_99_ms=51, th_999_ms=147, max_ms=5074
| Open Time Map|Empty Time Map
| Close Op Time Map|Empty Time Map
指定ファイルの並行読み取り
ob_admin io_adapter_benchmark -d 'oss://home/admin/backup_info' \
-s 'host=xxx.com&access_id=111&access_key=222' \
-t 4 \ # 4スレッド並列処理
-p 'read_user_provided'
-r 100 \ # 単一スレッドによる100回の読み取り
-o 100 \ # ファイルサイズのヒント。実際のファイルサイズ以下でなければなりません。
-f 50 \ # 単回読み取りサイズ。-oパラメータ指定サイズ以下でなければなりません。
コマンドの実行結果は次のとおりです:
succ to open, filename=/tmp/ob_admin.log, fd=3, wf_fd=2
succ to open, filename=/tmp/ob_admin_rs.log, fd=4, wf_fd=2
------------------------------{Testing}------------------------------
| Task Config|{thread_num:4, max_task_runs:20, time_limit_s:-1, obj_size:2097152, obj_num:10, fragment_size:1048576, is_adaptive:true, type:3}
| Task work path|oss://home/admin/backup_info
| Status|SUCCESS
| Total operation num|80
| Total execution time|2.970364 s
| Total user time|0.289431 s
| Total system time|0.217354 s
| CPU usage for 100MB/s BW|63.348125% per 100MB/s
| Total throughput bytes|83886080
| Total QPS|26.932726
| Per Thread QPS|6.733182
| Total BW|26.932726 MB/s
| Per Thread BW|6.733182 MB/s
| Total Op Time Map|total_entry=80, min_ms=114, th_50_ms=132, th_90_ms=164, th_99_ms=356, th_999_ms=356, max_ms=389
| Open Time Map|Empty Time Map
| Close Op Time Map|Empty Time Map