You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2020/07/28 17:51:12 UTC
[kudu] 04/04: [benchmarks] add GetTableLocations scenarios
This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 4bee886c2cb092531a7af0f49420471a2203af2b
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Mon Jul 27 19:12:12 2020 -0700
[benchmarks] add GetTableLocations scenarios
Added a few benchmarks for GetTableLocationsBenchmark-based scenarios
from table_locations-itest.
Change-Id: Ifeaaadf2a30f15c7ad0b8cd99fe22d06fb225ebc
Reviewed-on: http://gerrit.cloudera.org:8080/16245
Tested-by: Kudu Jenkins
Reviewed-by: Grant Henke <gr...@apache.org>
---
src/kudu/scripts/benchmarks.sh | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/src/kudu/scripts/benchmarks.sh b/src/kudu/scripts/benchmarks.sh
index 25468c4..bd63a36 100755
--- a/src/kudu/scripts/benchmarks.sh
+++ b/src/kudu/scripts/benchmarks.sh
@@ -65,6 +65,9 @@ BLOCKING_QUEUE_NON_SYMMETRIC_TEST=BlockingQueueNonSymmetric
GET_TABLE_SCHEMA_RPC=GetTableSchemaTestRpc
GET_TABLE_SCHEMA_DIRECT_CALL=GetTableSchemaTestDirectCall
+GET_TABLE_LOCATIONS_RPC=GetTableLocationsTestRpc
+GET_TABLE_LOCATIONS_DIRECT_CALL=GetTableLocationsTestDirectCall
+
LOG_DIR_NAME=build/latest/bench-logs
OUT_DIR_NAME=build/latest/bench-out
HTML_FILE="benchmarks.html"
@@ -323,6 +326,29 @@ run_benchmarks() {
--gtest_filter='*/ConcurrentGetTableSchemaTest.DirectMethodCall/*' \
&> $LOGDIR/${GET_TABLE_SCHEMA_DIRECT_CALL}$i.log
done
+
+ # Run GetTableLocationsBenchmark, with and without cache.
+ for capacity_mb in 0 32 do ;
+ for i in $(seq 1 $NUM_SAMPLES) ; do
+ KUDU_ALLOW_SLOW_TESTS=true ./build/latest/bin/table_locations-itest \
+ --gtest_filter=TableLocationsTest.GetTableLocationsBenchmark \
+ --rpc_num_service_threads=8 \
+ --benchmark_num_threads=12 \
+ --table_locations_cache_capacity_mb=$capacity_mb \
+ &> $LOGDIR/${GET_TABLE_LOCATIONS_RPC}_${capacity_mb}_$i.log
+ done
+ done
+
+ # Run GetTableLocationsBenchmarkFunctionCall, with and without cache.
+ for capacity_mb in 0 32 do ;
+ for i in $(seq 1 $NUM_SAMPLES) ; do
+ KUDU_ALLOW_SLOW_TESTS=true ./build/latest/bin/table_locations-itest \
+ --gtest_filter=TableLocationsTest.GetTableLocationsBenchmarkFunctionCall \
+ --benchmark_num_threads=12 \
+ --table_locations_cache_capacity_mb=$capacity_mb \
+ &> $LOGDIR/${GET_TABLE_LOCATIONS_DIRECT_CALL}_${capacity_mb}_$i.log
+ done
+ done
}
parse_and_record_all_results() {
@@ -529,6 +555,19 @@ parse_and_record_all_results() {
record_result $BUILD_IDENTIFIER ${GET_TABLE_SCHEMA_DIRECT_CALL}_authz_req_rate $i $rate
done
+ # Parse out request rate and record the results for GetTableLocationsBenchmark{FunctionCall}.
+ for capacity_mb in 0 32 ; do
+ for i in $(seq 1 $NUM_SAMPLES); do
+ local log=$LOGDIR/${GET_TABLE_LOCATIONS_RPC}_${capacity_mb}_${i}.log
+ rate=$(grep -o 'GetTableLocations RPC: .* req/sec' $log | awk '{print $3}')
+ record_result $BUILD_IDENTIFIER ${GET_TABLE_LOCATIONS_RPC}_${capacity_mb}_req_rate $i $rate
+
+ local log=$LOGDIR/${GET_TABLE_LOCATIONS_DIRECT_CALL}_${capacity_mb}_${i}.log
+ rate=$(grep -o 'GetTableLocations function call: .* req/sec' $log | awk '{print $4}')
+ record_result $BUILD_IDENTIFIER ${GET_TABLE_LOCATIONS_DIRECT_CALL}_${capacity_mb}_req_rate $i $rate
+ done
+ done
+
popd
popd
popd
@@ -616,6 +655,9 @@ load_stats_and_generate_plots() {
load_and_generate_plot "${GET_TABLE_SCHEMA_DIRECT_CALL}_authz_req_rate" get-table-schema-dc-authz
load_and_generate_plot "${GET_TABLE_SCHEMA_DIRECT_CALL}_no_authz_req_rate" get-table-schema-dc-no-authz
+ load_and_generate_plot "${GET_TABLE_LOCATIONS_RPC}%_req_rate" get-table-locations-rpc
+ load_and_generate_plot "${GET_TABLE_LOCATIONS_DIRECT_CALL}%_req_rate" get-table-locations-dc
+
# Generate all the pngs for all the mt-tablet tests
for i in $(seq 0 $NUM_MT_TABLET_TESTS); do
cat $LOGDIR/${MT_TABLET_TEST}.log | ./graph-metrics.py MultiThreadedTabletTest/$i > $OUTDIR/test$i.tsv