pika
pika copied to clipboard
WIKI 配置信息能否补充大部分场景下的最优配置
https://github.com/OpenAtomFoundation/pika/wiki/pika-%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E8%AF%B4%E6%98%8E
比如
# pika是多线程的, 该参数能够配置pika的线程数量, 不建议配置值超过部署服务器的CPU核心数量
thread-num : 1
# 处理命令用户请求命令线程池的大小
thread-pool-size : 8
thread-pool-size 和 thread-num 有关系么?如果有关系,是 1:8 的关系是最优的么?能否结合压测的结果,给出大致的最优组合建议呢?
https://github.com/OpenAtomFoundation/pika/wiki/pika-%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E8%AF%B4%E6%98%8E
比如
# pika是多线程的, 该参数能够配置pika的线程数量, 不建议配置值超过部署服务器的CPU核心数量 thread-num : 1 # 处理命令用户请求命令线程池的大小 thread-pool-size : 8
thread-pool-size 和 thread-num 有关系么?如果有关系,是 1:8 的关系是最优的么?能否结合压测的结果,给出大致的最优组合建议呢?
好的,我们这边会给出一份最佳的线上压测配置
https://github.com/OpenAtomFoundation/pika/wiki/3.2.x-Performance
性能压测最好可以被社区用户方便的复现。目前缺少 pika.conf 的信息
https://github.com/OpenAtomFoundation/pika/issues/2007
based on v3.5.1, you can optimize some parameters as follows.
1 Adjust `max-background-flushes` and `max-background-compaction` to 4 to increase the number of threads for compaction and flushdb. Adjust max-background-jobs to 8.
2 Adjust the `block-cache` to be 60% of the memory allocated to the Pika instance.
3 Uncomment `share-block-cache` and set it to yes.
4 Adjust `thread-num` to 80% of the CPU cores of the Pika instance.
5 Adjust `thread-pool-size` to CPU cores * 1.5.
6 Set `rate-limiter-bandwidth` to 2000Mib/s for gigabit Ethernet and 10000Mib/s for 10-gigabit Ethernet.
in Chinese:
-
max-background-flushes
和max-backgroud-compaction
可以调整到 4,提高 compaction 和 flushdb 的线程数,max-backgroumd-jobs
调整到 8 -
block-cache
的大小可以调整为分给 Pika 实例内存的 60% -
share-block-cache
解除注释,改为yes -
thread-num
调整为 Pika 实例的 CPU 核数的 80% -
thread-pool-size
调整为 CPU 核数 * 1.5 -
rate-limiter-bandwidth
:千兆网卡2000Mib/s 万兆网卡:10000Mib/s