Title: Support plain command-file input for arbitrary command corpora
Summary
Please add a native option to read arbitrary Redis commands from a plain text file, one command per line, without requiring users to expand every command into a separate --command ... CLI argument.
Why this would help
Today, memtier_benchmark supports:
--command for one or more explicitly repeated CLI arguments
--monitor-input for replaying Redis MONITOR output
What is missing is a simple mode for workloads like:
commands.txt
- each line is a complete Redis command
- memtier picks from that file during the run, either sequentially or randomly
This would be very useful for realistic benchmark workloads where engineers want to replay a corpus of many different queries or commands without having to generate a massive argv list.
Example use case
Suppose I have a file like this:
FT.SEARCH idx:products "@brand:{ACME} @country:{USA}" LIMIT 0 10 DIALECT 2
FT.SEARCH idx:products "@brand:{ACME} @state:{CA} @country:{USA}" LIMIT 0 10 DIALECT 2
FT.SEARCH idx:products "@brand:{ACME} (@city:{SAN JOSE} | @postal:{95131})" LIMIT 0 10 DIALECT 2
GET product:1001
GET product:1002
It would be great to run something like:
memtier_benchmark \
-s redis.example.com -p 6379 \
--command-file commands.txt \
--command-file-pattern R \
--test-time 300 -c 50 -t 4
Current workaround
The only workaround I found is to expand the file into many repeated flags:
memtier_benchmark \
--command "cmd1" --command-ratio 1 \
--command "cmd2" --command-ratio 1 \
--command "cmd3" --command-ratio 1 \
...
This works, but it is awkward when the corpus is large.
Proposed feature
Something along these lines would solve it:
--command-file <path>
- one Redis command per line
- ignore blank lines and
# comments
--command-file-pattern S|R
- optional
--command-stats-breakdown=line integration so results can still be grouped by line
Why this is different from --monitor-input
--monitor-input is useful for replaying Redis MONITOR output, but it is not the same as a plain corpus of arbitrary commands. A command-file mode would be simpler for synthetic or curated workloads.
Thanks.
Title: Support plain command-file input for arbitrary command corpora
Summary
Please add a native option to read arbitrary Redis commands from a plain text file, one command per line, without requiring users to expand every command into a separate
--command ...CLI argument.Why this would help
Today,
memtier_benchmarksupports:--commandfor one or more explicitly repeated CLI arguments--monitor-inputfor replaying RedisMONITORoutputWhat is missing is a simple mode for workloads like:
commands.txtThis would be very useful for realistic benchmark workloads where engineers want to replay a corpus of many different queries or commands without having to generate a massive argv list.
Example use case
Suppose I have a file like this:
It would be great to run something like:
Current workaround
The only workaround I found is to expand the file into many repeated flags:
This works, but it is awkward when the corpus is large.
Proposed feature
Something along these lines would solve it:
--command-file <path>#comments--command-file-pattern S|RS: sequentialR: random--command-stats-breakdown=lineintegration so results can still be grouped by lineWhy this is different from
--monitor-input--monitor-inputis useful for replaying RedisMONITORoutput, but it is not the same as a plain corpus of arbitrary commands. A command-file mode would be simpler for synthetic or curated workloads.Thanks.