对 Redis Enterprise 进行基准测试
使用memtier_benchmark
工具执行 Redis Enterprise Software 的性能基准测试。
Redis 企业软件 |
---|
使用memtier_benchmark
工具执行 Redis Enterprise Software 的性能基准测试。
先决条件:
- 已安装 Redis Enterprise Software
- 配置的集群
- 已创建的数据库
有关先决条件的帮助,请参阅 Redis Enterprise Software 快速入门。
建议在单独的节点上运行 memtier_benchmark 不是正在测试的集群的一部分。如果您在 集群,请注意,它会影响 cluster 和 memtier_benchmark。
/opt/redislabs/bin/memtier_benchmark -s $DB_HOST -p $DB_PORT -a $DB_PASSWORD -t 4 -R --ratio=1:1
This command instructs memtier_benchmark to connect to your Redis
Enterprise database and generates a load doing the following:
- A 50/50 Set to Get ratio
- Each object has random data in the value
Populate a database with testing data
If you need to populate a database with some test data for a proof of
concept, or failover testing, etc. here is an example for you.
/opt/redislabs/bin/memtier_benchmark -s $DB_HOST -p $DB_PORT -a $DB_PASSWORD -R -n allkeys -d 500 --key-pattern=P:P --ratio=1:0
This command instructs memtier_benchmark to connect to your Redis
Enterprise database and generates a load doing the following:
- Write objects only, no reads
- A 500 byte object
- Each object has random data in the value
- Each key has a random pattern, then a colon, followed by a
random pattern.
Run this command until it fills up your database to where you want it
for testing. The easiest way to check is on the database metrics page.
Another use for memtier_benchmark is to populate a database with data
for failure testing.
On this page