https://github.com/smallnest/redis-bench
a different redis bench tool that is used for test latency at given max throughputs
https://github.com/smallnest/redis-bench
bench benchmark codis redis redis-benchmark
Last synced: 8 months ago
JSON representation
a different redis bench tool that is used for test latency at given max throughputs
- Host: GitHub
- URL: https://github.com/smallnest/redis-bench
- Owner: smallnest
- License: mit
- Created: 2019-08-01T04:30:50.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-06-03T11:12:13.000Z (about 6 years ago)
- Last Synced: 2025-04-05T00:41:23.897Z (about 1 year ago)
- Topics: bench, benchmark, codis, redis, redis-benchmark
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 16
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# redis-bench
redis-bench is a different tool with redis-benchmark tool. Its target is testing latency of redis under given throughputs.
There are some redis benchmark tool:
- [redis-benchmark](https://redis.io/topics/benchmarks)
- [vire-benchmark](https://github.com/vipshop/vire)
- [tidwall/redbench](https://github.com/tidwall/redbench)
But their target is testing throughputs of redis. In high concurrent clients case, the latency is very big (> 1 second), which is not acceptable in production. So we want to benchmark to get the acceptable throuphputs, latency and concurrency.
I searched but not found any tool for this case, so I create this project base on code of [tidwall/redbench](https://github.com/tidwall/redbench).
## Usage
```sh
rb -h
Usage of rb:
-P int
pipeline requests. (default 1 no pipeline). (default 1)
-c int
number of concurrent connections (default 100)
-cpu int
max cpus count to run (default logical cpu cores) (default 4)
-d int
data size of SET/GET/... value in bytes (default 16)
-host string
server address (default "127.0.0.1")
-l float
max throughputs (requests/s) (default 10000)
-n int
total number of requests (default 1000000)
-p int
server port (default 6379)
-r int
use random keys for SET/GET (default 10000)
-s string
server address (overrides host and port) (default "10.41.15.226:6000")
-t string
test type. only support set|get (default "set")
```
run the command:
```sh
rb -t get -r 10000000 -n 20000000 -s 127.0.0.1:6379 -cpu 16 -c 200 -l 100000
```