From 0fe0f5422b0aac907f0dc523ba0647fae6d528ea Mon Sep 17 00:00:00 2001 From: filipecosta90 Date: Wed, 2 Feb 2022 22:18:41 +0000 Subject: [PATCH] Extended benchmarks with LPOP, RPOP, LPUSH, HGETALL, HGET, HVALS, HKEYS, HGET commands --- .../__builder__/builder.py | 3 ++ .../gcc:8.5.0-arm64-debian-buster-default.yml | 18 ++++++++ ...t-hgetall-hkeys-hvals-with-100B-values.yml | 41 +++++++++++++++++++ ...1Mkeys-list-lpop-rpop-with-100B-values.yml | 39 ++++++++++++++++++ ...mark-1Mkeys-load-list-with-100B-values.yml | 32 +++++++++++++++ utils/tests/test_commands.py | 6 ++- ...keys-100B-expire-use-case-with-variant.yml | 4 +- ..._benchmark-1Mkeys-100B-expire-use-case.yml | 4 +- .../tests/test_self_contained_coordinator.py | 2 +- 9 files changed, 142 insertions(+), 7 deletions(-) create mode 100644 redis_benchmarks_specification/setups/builders/gcc:8.5.0-arm64-debian-buster-default.yml create mode 100644 redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hget-hgetall-hkeys-hvals-with-100B-values.yml create mode 100644 redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-list-lpop-rpop-with-100B-values.yml create mode 100644 redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-list-with-100B-values.yml diff --git a/redis_benchmarks_specification/__builder__/builder.py b/redis_benchmarks_specification/__builder__/builder.py index 0e7bfbee..a59a499f 100644 --- a/redis_benchmarks_specification/__builder__/builder.py +++ b/redis_benchmarks_specification/__builder__/builder.py @@ -57,6 +57,9 @@ def main(): parser.add_argument( "--logname", type=str, default=None, help="logname to write the logs to" ) + parser.add_argument( + "--arch", type=str, default="x86", help="arch to build artifacts" + ) parser.add_argument( "--setups-folder", type=str, diff --git a/redis_benchmarks_specification/setups/builders/gcc:8.5.0-arm64-debian-buster-default.yml b/redis_benchmarks_specification/setups/builders/gcc:8.5.0-arm64-debian-buster-default.yml new file mode 100644 index 00000000..313fd535 --- /dev/null +++ b/redis_benchmarks_specification/setups/builders/gcc:8.5.0-arm64-debian-buster-default.yml @@ -0,0 +1,18 @@ +version: 0.1 +id: gcc:8.5.0-arm64-debian-buster-default +os: debian-buster +arch: arm64 +compiler: "gcc" +cpp_compiler: "g++" +kind: docker +build_image: gcc:8.5.0-buster +description: "Using GNU Compiler Containers (https://hub.docker.com/_/gcc?tab=description) + pre-configured environment with all the tools required to build with gcc." +metadata: + compiler: "gcc" + compiler_version: "8.5.0" + os: debian-buster + arch: arm64 + +env: + diff --git a/redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hget-hgetall-hkeys-hvals-with-100B-values.yml b/redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hget-hgetall-hkeys-hvals-with-100B-values.yml new file mode 100644 index 00000000..f958c603 --- /dev/null +++ b/redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hget-hgetall-hkeys-hvals-with-100B-values.yml @@ -0,0 +1,41 @@ +version: 0.4 +name: "memtier_benchmark-1Mkeys-hash-hget-hgetall-hkeys-hvals-with-100B-values" +description: "Runs memtier_benchmark, for a keyspace length of 1M keys + pre-loading HASHes in which the value has a data size of 100 Bytes. + After pre-loading the data it issues HGETALL, HGET, HKEYS, and HVALS commands." +dbconfig: + configuration-parameters: + save: '""' + preload_tool: + run_image: redislabs/memtier_benchmark:edge + tool: memtier_benchmark + arguments: '"--data-size" "100" --command "HSET __key__ field1 __data__ field2 __data__ field3 __data__ field4 __data__ field5 __data__" --command-key-pattern="P" --key-minimum=1 --key-maximum 10000000 -n 5000 -c 50 -t 4 --hide-histogram' + +tested-commands: + - HGETALL + - HKEYS + - HVALS + - HGET +redis-topologies: + - oss-standalone + +build-variants: + - gcc:8.5.0-amd64-debian-buster-default + +clientconfig: + run_image: redislabs/memtier_benchmark:edge + tool: memtier_benchmark + arguments: '"--data-size" "100" --command "HGETALL __key__" --command-key-pattern="R" --command "HKEYS __key__" --command-key-pattern="R" --command "HVALS __key__" --command-key-pattern="R" --command "HGET __key__ field1" --command-key-pattern="R" --key-minimum=1 --key-maximum 1000000 --test-time 180 -c 50 -t 4 --hide-histogram' + resources: + requests: + cpus: "4" + memory: "2g" +exporter: + redistimeseries: + break_by: + - version + - commit + timemetric: '$."ALL STATS".Runtime."Start time"' + metrics: + - '$."ALL STATS".*."Ops/sec"' + - '$."ALL STATS".*."Latency"' diff --git a/redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-list-lpop-rpop-with-100B-values.yml b/redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-list-lpop-rpop-with-100B-values.yml new file mode 100644 index 00000000..1b293764 --- /dev/null +++ b/redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-list-lpop-rpop-with-100B-values.yml @@ -0,0 +1,39 @@ +version: 0.4 +name: "memtier_benchmark-1Mkeys-list-lpop-rpop-with-100B-values" +description: "Runs memtier_benchmark, for a keyspace length of 1M keys + pre-loading LISTs in which the value has a data size of 100 Bytes. + After pre-loading the data it issues LPOP and RPOP commands." +dbconfig: + configuration-parameters: + save: '""' + preload_tool: + run_image: redislabs/memtier_benchmark:edge + tool: memtier_benchmark + arguments: '"--data-size" "100" --command "LPUSH __key__ __data__" --command-key-pattern="P" --key-minimum=1 --key-maximum 1000000 --test-time 60 -c 50 -t 4 --hide-histogram' + +tested-commands: + - LPOP + - RPOP +redis-topologies: + - oss-standalone + +build-variants: + - gcc:8.5.0-amd64-debian-buster-default + +clientconfig: + run_image: redislabs/memtier_benchmark:edge + tool: memtier_benchmark + arguments: '"--data-size" "100" --command "LPOP __key__" --command-key-pattern="R" --command "RPOP __key__" --command-key-pattern="R" --key-minimum=1 --key-maximum 1000000 --test-time 180 -c 50 -t 4 --hide-histogram' + resources: + requests: + cpus: "4" + memory: "2g" +exporter: + redistimeseries: + break_by: + - version + - commit + timemetric: '$."ALL STATS".Runtime."Start time"' + metrics: + - '$."ALL STATS".*."Ops/sec"' + - '$."ALL STATS".*."Latency"' diff --git a/redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-list-with-100B-values.yml b/redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-list-with-100B-values.yml new file mode 100644 index 00000000..6fcf9157 --- /dev/null +++ b/redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-list-with-100B-values.yml @@ -0,0 +1,32 @@ +version: 0.4 +name: "memtier_benchmark-1Mkeys-load-list-with-100B-values" +description: "Runs memtier_benchmark, for a keyspace length of 1M keys + loading LISTs in which the value has a data size of 100 Bytes." +dbconfig: + configuration-parameters: + save: '""' +tested-commands: + - LPUSH +redis-topologies: + - oss-standalone + +build-variants: + - gcc:8.5.0-amd64-debian-buster-default + +clientconfig: + run_image: redislabs/memtier_benchmark:edge + tool: memtier_benchmark + arguments: '"--data-size" "100" --command "LPUSH __key__ __data__" --command-key-pattern="P" --key-minimum=1 --key-maximum 1000000 --test-time 180 -c 50 -t 4 --hide-histogram' + resources: + requests: + cpus: "4" + memory: "2g" +exporter: + redistimeseries: + break_by: + - version + - commit + timemetric: '$."ALL STATS".Runtime."Start time"' + metrics: + - '$."ALL STATS".*."Ops/sec"' + - '$."ALL STATS".*."Latency"' diff --git a/utils/tests/test_commands.py b/utils/tests/test_commands.py index 1ede7960..d53914db 100644 --- a/utils/tests/test_commands.py +++ b/utils/tests/test_commands.py @@ -4,7 +4,9 @@ def test_generate_command_groups(): - with open("./redis_benchmarks_specification/setups/topologies/topologies.yml","r") as json_fd: + with open( + "./redis_benchmarks_specification/setups/topologies/topologies.yml", "r" + ) as json_fd: commands_json = json.load(json_fd) command_groups = generate_command_groups(commands_json) - assert "server" in command_groups.keys() \ No newline at end of file + assert "server" in command_groups.keys() diff --git a/utils/tests/test_data/test-suites/memtier_benchmark-1Mkeys-100B-expire-use-case-with-variant.yml b/utils/tests/test_data/test-suites/memtier_benchmark-1Mkeys-100B-expire-use-case-with-variant.yml index f15bc925..827b03b1 100644 --- a/utils/tests/test_data/test-suites/memtier_benchmark-1Mkeys-100B-expire-use-case-with-variant.yml +++ b/utils/tests/test_data/test-suites/memtier_benchmark-1Mkeys-100B-expire-use-case-with-variant.yml @@ -6,7 +6,7 @@ dbconfig: configuration-parameters: save: '""' preload_tool: - run_image: redislabs/memtier_benchmark:1.3.0 + run_image: redislabs/memtier_benchmark:edge tool: memtier_benchmark arguments: '"--command" "SETEX __key__ 360 __value__" "--command-key-pattern" "P" "-c" "5" "-t" "2" "--hide-histogram"' tested-commands: @@ -19,7 +19,7 @@ redis-topologies: build-variants: - abc clientconfig: - run_image: redislabs/memtier_benchmark:1.3.0 + run_image: redislabs/memtier_benchmark:edge tool: memtier_benchmark arguments: '--command "SETEX __key__ 10 __value__" --command-key-pattern="R" --command "SET __key__ __value__" --command-key-pattern="R" --command "GET __key__" --command-key-pattern="R" --command "DEL __key__" --command-key-pattern="R" -c 5 -t 1 --hide-histogram --test-time 10' resources: diff --git a/utils/tests/test_data/test-suites/memtier_benchmark-1Mkeys-100B-expire-use-case.yml b/utils/tests/test_data/test-suites/memtier_benchmark-1Mkeys-100B-expire-use-case.yml index 844b0573..b71eb87d 100644 --- a/utils/tests/test_data/test-suites/memtier_benchmark-1Mkeys-100B-expire-use-case.yml +++ b/utils/tests/test_data/test-suites/memtier_benchmark-1Mkeys-100B-expire-use-case.yml @@ -6,7 +6,7 @@ dbconfig: configuration-parameters: save: '""' preload_tool: - run_image: redislabs/memtier_benchmark:1.3.0 + run_image: redislabs/memtier_benchmark:edge tool: memtier_benchmark arguments: '"--command" "SETEX __key__ 360 __value__" "--command-key-pattern" "P" "-c" "5" "-t" "2" "--hide-histogram"' tested-commands: @@ -19,7 +19,7 @@ redis-topologies: build-variants: - gcc:8.5.0-amd64-debian-buster-default clientconfig: - run_image: redislabs/memtier_benchmark:1.3.0 + run_image: redislabs/memtier_benchmark:edge tool: memtier_benchmark arguments: '--command "SETEX __key__ 10 __value__" --command-key-pattern="R" --command "SET __key__ __value__" --command-key-pattern="R" --command "GET __key__" --command-key-pattern="R" --command "DEL __key__" --command-key-pattern="R" -c 5 -t 1 --hide-histogram --test-time 10' resources: diff --git a/utils/tests/test_self_contained_coordinator.py b/utils/tests/test_self_contained_coordinator.py index e842e272..6913650d 100644 --- a/utils/tests/test_self_contained_coordinator.py +++ b/utils/tests/test_self_contained_coordinator.py @@ -55,7 +55,7 @@ def test_extract_client_container_image(): ) as yml_file: benchmark_config = yaml.safe_load(yml_file) client_container_image = extract_client_container_image(benchmark_config) - assert client_container_image == "redislabs/memtier_benchmark:1.3.0" + assert client_container_image == "redislabs/memtier_benchmark:edge" def test_extract_client_tool():