Hi there @CacaoGatto IMHO you should not use redis-cli for any type of benchmarking ( and also piping data from disk that will ultimately limit your client performance ). It was simply not designed for it.
Bottom line on any type of benchmarks you should ensure that the client that is measuring it is not the bottleneck.
Now focusing on using a benchmark tool for Redis you can use redis-benchmark, memtier_benchmark, or any other purpose built tool.
blog benchmark testing methodology
Specifically for this blog post we’ve used memtier_benchmark, as clearly stated on the benchmark details:
To get steady-state results, we discarded the previous Python benchmark client in favor of the memtier_benchmark, which provides low overhead and full-latency-spectrum latency metrics.
For each tested version, we performed:
1-Hop 22M queries
2-Hop 220K queries
3-Hop 22K queries
6-Hop 22K queries
All queries were under a concurrent parallel load of 22 clients. We reported the median (q50) and achievable throughput.
In order to ensure steady stable results we’ve repeated each benchmark variation a minimum of 3 times.
All benchmark variations were run on Amazon Web Services instances, provisioned through our benchmark-testing infrastructure. Both the benchmarking client and database servers were running on separate c5.12xlarge instances. The tests were executed on a single-shard setup, with RedisGraph versions 1.2 and 2.0.5.
We’ve also added an public facing rdb link:
To make it easy for anyone to replicate our results, here is a public link to the persistent store graph 500 dataset with scale 22 on RDB format.
OMP threads showcase table
Concerning the OpenMP effect showcase table you should start a standalone redis instance as follow:
22 threads variation
OMP_NUM_THREADS=22 redis-server --protected-mode no --save "" --daemonize yes --port 6379 --appendonly no --loadmodule ./redisgraph.so THREAD_COUNT 1
1 threads variation
OMP_NUM_THREADS=1 redis-server --protected-mode no --save "" --daemonize yes --port 6379 --appendonly no --loadmodule ./redisgraph.so THREAD_COUNT 1
benchmark command
To run the benchmark ( on a separate client VM ) do as follows:
memtier_benchmark --server <### YOUR DB IP ###> --port 6379 -n 1000 -c 1 -t 1 --hide-histogram --command="graph.query graph500_22 \"MATCH (s:graph500_22_unique_node_out)-[*6]->(t) WHERE ID(s)=__key__ RETURN count(t)\"" --key-maximum=100000 --distinct-client-seed --command-key-pattern G
Looking at our blog results internal doc I can provide you the outputs used to produce the table:
OMP_NUM_THREADS=1
# for i in {1..3}; do memtier_benchmark --server 10.3.0.31 --port 6379 -n 1000 -c 1 -t 1 --hide-histogram --command="graph.query graph500_22 \"MATCH (s:graph500_22_unique_node_out)-[*6]->(t) WHERE ID(s)=__key__ RETURN count(t)\"" --key-maximum=100000 --distinct-client-seed --command-key-pattern G; sleep 60; done
Writing results to stdout
[RUN #1] Preparing benchmark client...
[RUN #1] Launching threads now...
[RUN #1 100%, 167 secs] 0 threads: 1000 ops, 4 (avg: 5) ops/sec, 1.13KB/sec (avg: 1.34KB/sec), 202.67 (avg: 167.93) msec latency
1 Threads
1 Connections per thread
1000 Requests per client
ALL STATS
=======================================================================================================
Type Ops/sec Avg. Latency q50 Latency q99 Latency q99.9 Latency KB/sec
-------------------------------------------------------------------------------------------------------
Graph.querys 1.48 674.31900 539.64700 2191.35900 2396.15900 0.33
Totals 1.48 674.31900 539.64700 2191.35900 2396.15900 0.33
(...)
(...)
OMP_NUM_THREADS=22
# for i in {1..3}; do memtier_benchmark --server 10.3.0.31 --port 6379 -n 1000 -c 1 -t 1 --hide-histogram --command="graph.query graph500_22 \"MATCH (s:graph500_22_unique_node_out)-[*6]->(t) WHERE ID(s)=__key__ RETURN count(t)\"" --key-maximum=100000 --distinct-client-seed --command-key-pattern G; sleep 60; done
Writing results to stdout
[RUN #1] Preparing benchmark client...
[RUN #1] Launching threads now...
[RUN #1 100%, 167 secs] 0 threads: 1000 ops, 4 (avg: 5) ops/sec, 1.13KB/sec (avg: 1.34KB/sec), 202.67 (avg: 167.93) msec latency
1 Threads
1 Connections per thread
1000 Requests per client
ALL STATS
=======================================================================================================
Type Ops/sec Avg. Latency q50 Latency q99 Latency q99.9 Latency KB/sec
-------------------------------------------------------------------------------------------------------
Graph.querys 5.95 167.92600 175.74300 353.02300 370.68700 1.34
Totals 5.95 167.92600 175.74300 353.02300 370.68700 1.34
(...)
(...)
Hope the above commands for starting Redis and running memtier should be enough for you to replicate results. Please do follow up with further requests or aknowledge that now this are ok.
Kind regards,
Filipe