Skip to content

Instantly share code, notes, and snippets.

@filipecosta90
Last active April 26, 2019 12:04
Show Gist options
  • Save filipecosta90/a44ec91905a030b4d2e8abf53baf5207 to your computer and use it in GitHub Desktop.
Save filipecosta90/a44ec91905a030b4d2e8abf53baf5207 to your computer and use it in GitHub Desktop.
script to run redis benchmark with different payload, pipeline, and iothreads, saving the ouput to distinct files
#!/bin/bash
# script to run redis benchmark with different payload, pipeline, and iothreads ( the iothreads are configured on the redis-server VM
# and that argument is only for creating a different file for different redis-server configs
args=("$@")
n=${args[0]}
h=${args[1]}
iothreads=${args[2]}
dir=${args[3]}
echo "Saving results in " $dir;
for connections in 512; do
for payload_size in 3 100 1000; do
for pipeline_size in 1 5 10; do
echo "running for pipeline size" $pipeline_size ", payload size of" $payload_size ", connections" + $connections;
date;
redis-benchmark -t mset,set,get,hset,lrange_100,xadd -c $connections -P $pipeline_size -n $n --threads 48 -h $h -d $payload_size >$dir/"iothreads_"$iothreads"_pipeline_"$pipeline_size"_connections_"$connections"_payload_"$payload_size;
done;
done;
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment