Latency much higher than jedis in certain condition
See original GitHub issueRedisson version: 3.15.1 Jedis version: 3.7.0
Following test snippet shows that redisson latency is 10 times higher than jedis:
Config config = new Config();
config.setCodec(new StringCodec());
config.setTransportMode(TransportMode.NIO);
config.useClusterServers().addNodeAddress(xxxxx);
RedissonClient redissonClient = Redisson.create(config);
RBucket<String> bucket = redissonClient.getBucket("kkkkkey");
// warm up
for (int i = 0; i < 200; i++) {
bucket.get();
}
int cnt = 0;
long total = 0;
long start = System.currentTimeMillis();
while (true) {
long before = System.currentTimeMillis();
String value = bucket.get();
long latency = System.currentTimeMillis() - before;
total += latency;
System.out.println(latency + "---" + value);
++cnt;
if (System.currentTimeMillis() - start > 5000) {
break;
}
}
System.out.println( "redisson avg " + ((double)total / cnt) );
JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();
JedisCluster jc = new JedisCluster(jedisClusterNodes, 10000, 10000, 100, "*********", jedisPoolConfig);
start = System.currentTimeMillis();
total = 0;
cnt = 0;
while (true) {
long before = System.currentTimeMillis();
String value = jc.get("kkkkkey");
long latency = System.currentTimeMillis() - before;
total += latency;
System.out.println(latency + "---" + value);
++cnt;
if (System.currentTimeMillis() - start > 5000) {
break;
}
}
System.out.println( "jedis avg " + ((double)total / cnt) );
The result is “redisson avg 7.8” and “jedis avg 0.7”. I think this is related to epoll being slow but I don’t how to confirm that.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Significant Latency Reductions with New Gaming Optimizations
But we called this an optimization, so it does more than just unlock stellar gaming features. Flip model generally results in lower latency....
Read more >Redis: Unsafe At Any Speed - Towards Data Science
Redis is a popular cache and NoSQL database. While it is reasonably performant, it is also unsafe—being prone to major data loss and ......
Read more >Nvidia Reflex explained: how to get low latency with your ...
The basic explanation is that Nvidia Reflex low latency helps reduce system lag so you can hit your shots, but there's so much...
Read more >Learn Redis the hard way (in production) - trivago tech blog
If you have a high connection/command ratio or Redis is used as a platform across many different teams, a proxy can be very...
Read more >LL-GNN: Low Latency Graph Neural Networks on FPGAs for Particle ...
It is the first time that the GNNs of JEDI-net can run in less than 1μs on FPGAs. Furthermore, a GNN-specific algorithmic-hardware co-design...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Problem sloved, redisson was reading slave while jedis is reading master, Slave node has much worse performance than master.
You may need to check your environment.