-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate the fast and slow commands in the second phase, dynamically adjust the fast and slow command settings according to the access time, and dynamically adjust the number of coroutines and pika threads #2566
Comments
刘欢负责推进 |
Liu Huan is responsible for promoting |
关于快慢命令的几个问题和方案需要确定下: 方案:1、计划添加 2、关于慢命令执行时间设置:添加 3、慢命令如何更优判定 如果一个cmd的请求超出这个时间阈值,就立刻判断为慢命令吗?还是做一些平滑计算?同理如何从慢命令集合摘除?目前想到的一些策略如下:
性能:4、对于第3的实现,可能需要申请N个全局map+atomic(提高并发)做数据统计,这样pika性能应该会有下降,需要权衡下 其他:5、如果一个 cmd 的某个 key 是 bigkey,那么这个 cmd 就被判定为慢命令是否合理?未来是否会考虑到key维度? |
Several questions and solutions regarding fast and slow commands need to be determined: plan:
#Performance:
other:
|
关于动态调整线程数的一些问题和方案: 方案1、线程数动态调整策略:判断线程池中queue的task个数,如果挤压超过某个阈值就添加新的thread,如果长时间空闲就回收thread。添加可以一次多个,回收逐次-1 2、快慢命令使用统一线程池:仿照rocksdb,支持Priority::HIGH、Priority::LOW |
Some issues and solutions about dynamically adjusting the number of threads: plan
|
Which PikiwiDB functionalities are relevant/related to the feature request?
No response
Description
动态调整运行过程中的快慢命令
Proposed solution
动态调整运行过程中的快慢命令
Alternatives considered
动态调整运行过程中的快慢命令
The text was updated successfully, but these errors were encountered: