RedisLabs / memtier_benchmark

NoSQL Redis and Memcache traffic generation and benchmarking tool.
GNU General Public License v2.0
893 stars 217 forks source link

arbitrary command with memcached #223

Open jj-tarun opened 1 year ago

jj-tarun commented 1 year ago

Hi, I am trying to run memtier_benchmark to test memcached with arbitrary command options. Here is my command

./memtier_benchmark -S $SOCKET --protocol=redis --threads=$NR_THREADS --pipeline=1 --key-minimum=1 --key-maximum=$KEY_MAX -n $PER_CLIENT_REQUESTS -c $NR_CLIENTS --hide-histogram --command="set key 5" --command-ratio=2 --command-key-pattern=R -D

But it fail with: protocol.cpp:600: unsupported response: 'ERROR'.
error: response parsing failed.

When I checked, I understood that, --command option is implemented for redis protocol only, and memcached has ASCII, binary protocol. I am not sure If I understood it correctly. How can I test memcached with arbitrary commands if it is possible?

~Tarun

YaacovHazan commented 1 year ago

Hi @jj-tarun I see that you are using --protocol=redis, so I'm a bit confused are you trying to test redis or memcached? currently the memcache_text_protocol / memcache_binary_protocol doesn't support the '--command` option.