← 返回命令列表

Linux command

memtier_benchmark 命令

趣味

复制后可按需替换文件名、目录或参数。

常用示例

Benchmark Redis

memtier_benchmark -s [localhost] -p [6379]

Benchmark with clients and threads

memtier_benchmark -s [host] -c [50] -t [4]

Custom key pattern

memtier_benchmark -s [host] --key-pattern=S:S

Set data size

memtier_benchmark -s [host] -d [128]

Run for specific duration

memtier_benchmark -s [host] --test-time=[60]

Benchmark memcached

memtier_benchmark -s [host] -p [11211] --protocol=memcache_text

说明

memtier_benchmark is a load generation and benchmarking tool for Redis and Memcached. It measures throughput and latency under various load conditions. The tool supports multiple protocols and provides detailed statistics including percentile latencies.

参数

-s _host_
Server hostname.
-p _port_
Server port.
-c _clients_
Clients per thread.
-t _threads_
Number of threads.
-d _size_
Data size in bytes.
--protocol _proto_
redis, memcache_text, memcache_binary.
--ratio _get:set_
GET:SET ratio.
--test-time _secs_
Test duration.
--key-pattern _pattern_
Key access pattern.

FAQ

What is the memtier_benchmark command used for?

memtier_benchmark is a load generation and benchmarking tool for Redis and Memcached. It measures throughput and latency under various load conditions. The tool supports multiple protocols and provides detailed statistics including percentile latencies.

How do I run a basic memtier_benchmark example?

Run `memtier_benchmark -s [localhost] -p [6379]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -s _host_ do in memtier_benchmark?

Server hostname.