any benchmark against redis? #389
Replies: 12 comments 2 replies
-
It makes no sense to compare the Kvrocks with Redis directly since the storage and thread model was totally different. We have a simple performance benchmark on README: https://github.com/KvrocksLabs/kvrocks#performance, from the throughput side, the Kvrocks would be better than Redis in many commands. |
Beta Was this translation helpful? Give feedback.
-
how much slower do u think kvrocks will be compared with redis? |
Beta Was this translation helpful? Give feedback.
-
It depends on the disk type, the latency of most commands on NVMe should be as good as Redis, SATA disks would much worse but we didn’t have any performance on it. |
Beta Was this translation helpful? Give feedback.
-
@hiqsociety I ran a simple test using redis-benchmark tool, I can say that kvrocks perform very well as below using DigitalOcean. Eventhough it persists data to disk, it can be almost as fast as Redis/KeyDB. I reckon if we give it more cpu cores and ram, it would perform even better. Very good job to kvrocks team @git-hulk @ShooterIT. We are awaiting their cluster mode feature and hope they can make their cluster mode to work like Redis whereby it can automatically handle failover and high availability! Single Node - General Purpose / 16 GB / 4 vCPUs/ NVMe instance PING_INLINE: 88339.23 requests per second I didn't get to save the results for above machine spec for KeyDB which is a forked of Redis but run on multithreads. 4C (Shared), 8GB, NVMe, 10 worker threads PING_INLINE: 59630.29 requests per second 4C (Shared), 8GB, NVMe, 10 worker threads PING_INLINE: 57971.02 requests per second |
Beta Was this translation helpful? Give feedback.
-
Many thanks for @hengsok benchmark data, those were benched without the |
Beta Was this translation helpful? Give feedback.
-
And you should enable multi threads in redis-benchmark, such as |
Beta Was this translation helpful? Give feedback.
-
I have tried again following @git-hulk suggestions with the -r options using length of 8 and 16 for comparisons. I also experiment with changing the number of workers setting in the kvrocks.conf file. I have noticed that during the SET test, below is the CPU and Memory stats from TOP. It seems kvrocks does not fully utilise the 32GB memory I provisioned. Strange. Is there any configuration to make sure kvrocks maximises memory usage? I have tried your suggestions @ShooterIT but the current build of redis-benchmark no longer support --threads params. I believe by specifying the -c which is the number of clients, redis-benchmark is already parallelising the requests up to 500 clients as we have specified in the test. General Purpose / 32 GB / 8 vCPUs / NVMe kvrocks (8 workers) General Purpose / 32 GB / 8 vCPUs / NVMe General Purpose / 32 GB / 8 vCPUs / NVMe |
Beta Was this translation helpful? Give feedback.
-
hi @hengsok To use |
Beta Was this translation helpful? Give feedback.
-
@ShooterIT Yes, I agree that the clients request did not max out. Just as a quick workaround, we tried to open 5 terminals and run redis-benchmark and we were getting more than 200K+ rps for GET and more than 101.5K+ rps for SET by adding the stats up. It's an impressive numbers for just 8 vCPUs. Do you know why RAM utilisation is so low? We noticed during the running of the benchmark, RAM usage only reach as much as 4GB. Shouldn't kvrocks cache more in Memory or it mainly relies on reading and writing directly with Rocksdb without further memory caching optimization? Finally, we really love this project a lot but there is a lack of documentations for how to setup kvrocks as Cluster. I have read about PIKA + Codis, does kvrocks support Codis cluster? Thanks! |
Beta Was this translation helpful? Give feedback.
-
For memory usage, please see https://github.com/KvrocksLabs/kvrocks/blob/unstable/kvrocks.conf#L324 Currently, cluster solution is experimental, we are developing a meta server to manage cluster, coming soon, if you want to have a try, please #302 Kvrocks support Codis cluster, but doesn't support to scale i.e. can't migrate slot date. |
Beta Was this translation helpful? Give feedback.
-
@ShooterIT thanks for the tips. Can't wait for your full cluster solution. I have tried the try_cluster. Does your implementation support dynamic addition of more nodes? If it supports, then how do we reassign slots? It seems your current implementation is still very manual based and I am not sure how the nodes are gonna handle moving of data from one node to the next to rebalance upon adding more nodes |
Beta Was this translation helpful? Give feedback.
-
Coming soon! |
Beta Was this translation helpful? Give feedback.
-
any benchmark against redis?
Beta Was this translation helpful? Give feedback.
All reactions