Skip to content
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

WIKI 配置信息能否补充大部分场景下的最优配置 #2008

Open
klboke opened this issue Sep 22, 2023 · 4 comments
Open

WIKI 配置信息能否补充大部分场景下的最优配置 #2008

klboke opened this issue Sep 22, 2023 · 4 comments

Comments

@klboke
Copy link
Contributor

klboke commented Sep 22, 2023

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 的关系是最优的么?能否结合压测的结果,给出大致的最优组合建议呢?

@Mixficsol
Copy link
Collaborator

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 的关系是最优的么?能否结合压测的结果,给出大致的最优组合建议呢?

好的,我们这边会给出一份最佳的线上压测配置

@chejinge
Copy link
Collaborator

https://github.com/OpenAtomFoundation/pika/wiki/3.2.x-Performance

性能压测最好可以被社区用户方便的复现。目前缺少 pika.conf 的信息

@klboke
Copy link
Contributor Author

klboke commented Sep 25, 2023

#2007

@Mixficsol
Copy link
Collaborator

Mixficsol commented Oct 23, 2023

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:

  1. max-background-flushesmax-backgroud-compaction可以调整到 4,提高 compaction 和 flushdb 的线程数, max-backgroumd-jobs调整到 8
  2. block-cache的大小可以调整为分给 Pika 实例内存的 60%
  3. share-block-cache解除注释,改为yes
  4. thread-num调整为 Pika 实例的 CPU 核数的 80%
  5. thread-pool-size调整为 CPU 核数 * 1.5
  6. rate-limiter-bandwidth:千兆网卡2000Mib/s 万兆网卡:10000Mib/s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants