query very slow #1596
WilliamShoww
started this conversation in
General
query very slow
#1596
Replies: 1 comment 1 reply
-
Throughput and performance depend on a lot of factors. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
version:
Springboot 2.2.8.RELEASE
+Lettuce 5.2.2.RELEASE
background
I'm performance testing, so many request to server。I find code's performace in lettuce's
io.lettuce.core.protocol.AsyncCommand#await
method。No matter I change options no change。Every query slow, need 50ms/query。I'm slow testing rate, query is normal speed , 2-4ms/query。 How can i do?
After days, I'm set LettuceConnectionFactory options redisConnectionFactory.setShareNativeConnection(false) the query speed is higher then begin, 10-20ms/query; but not dreams。 How can i do? My english is badly
中文描述
压力测试的时候,大量请求发送到服务端,发现加了
Redis
缓存的接口都会卡,用监控工具发现代码性能卡在lettuce的io.lettuce.core.protocol.AsyncCommand#await
方法中,每获取一个key就需要花费50ms
, 按理来说应该是5ms
以内,查询Redis
也没有慢查询;但是降低压力测试的请求并发量,这个方法就很快,查询在3-5ms
,符合正常的;过了几天,我把LettuceConnectionFactory
的参数改了一下redisConnectionFactory.setShareNativeConnection(false)
,查询速度比一开始快了不少,每次查询10-20ms
,但是也不理想,我该怎么办?请帮帮我吧。Beta Was this translation helpful? Give feedback.
All reactions