Closed huangmingyou closed 1 month ago
你的业务场景是不是单核心就足够了,设置多核心反而因为上下文切换而降低了性能?
单核心不太够用,还是希望能多核心运行。同样的配置,如果不使用 cpuset或者taskset做cpu绑定,性能会比作了cpu绑定好。是否是cpu绑定会影响到gnet的性能。
你绑了多少个 CPU 到进程上?
然后你说不设置 option.multicore 和 option.NumEventLoop 性能更好?
通过cgroup方式绑定到了两颗cpu , 对,把multicore=false,性能更好。
你能提供一下复现步骤吗?最好是有 demo 代码可以测试。
This issue is marked as stale because it has been open for 30 days with no activity.
You should take one of the following actions:
This issue will be automatically closed in 7 days if no further activity occurs.
This issue was closed because it has been inactive for 7 days since being marked as stale.
If you believe this is a false alarm, please leave a comment for it or open a new issue, you can also reopen this issue directly if you have permission.
Questions with details
本来的计划是在机器上隔离出单独的cpu给应用使用。 但是用taskset绑定多核心以后,性能反而不如在单核心上面好。multicore 这个参数有什么设置技巧吗?
Code snippets (optional)
No response