Search code examples
redisycsb

How to benchmark 2 Redis nodes with YCSB


I want to benchmark 2 redis nodes with yahoo's YCSB. Because I can't run those nodes in cluster mode (redis has a minimum of 6 nodes in order to run it in cluster mode) I created a master and a slave node using the slaveof no one for the master node and the slaveof <host> <port> for the slave node. But when I try to load the keys from YCSB to redis , with cluster.mode=true in ycsb command, i get an error because YCSB reads the config file of redis master and sees that cluster mode is disabled. Note that in order to run the slaveof command we mustn't be in cluster mode. Does anyone know a workaround on that?


Solution

  • In my understanding, you want to performance test of Redis scalability. so, you want to set the cluster flag to true.

    Unfortunately, the current Redis implementation of YSCB does not support master-slave mode of Redis(The YCSB using Jedis 2.9.0 for Redis connection client.).

    If you still want to you want to performance test of Redis scalability, There is two options.

    The first one is upgrade Jedis version to 3.X or higher and then rewriting RedisClient.java of YCSB(https://github.com/brianfrankcooper/YCSB/blob/master/redis/src/main/java/site/ycsb/db/RedisClient.java) for your own testing scenario.

    The second one is to separate the case for cluster mode and master-slave mode of Redis. Redis cluster need at least 6 nodes. but, you can reduce 3 node. Just setting up 6 nodes and then shutting down slave nodes. it's not recommended for production but enough for tests.

    You can test it 3,6,9... nodes.

    I hope it helps for you.