-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
worker数量与多核心问题 #1042
Comments
perf top看 native_queued_spin_lock_slowpath 这个占用CPU很高 |
反复测试了,worker数量超过16时性能无明显提升,并且越大QPS还越低并更不稳定。 |
试下nginx性能表现 |
@walkor 是不是每秒新建连接数在哪个阶段遇到瓶颈? nginx之前keepalive测试好像能到180万 |
短链接会有建立连接 断开链接开销,QPS低是正常的 |
按照你之前的说法,14万QPS的时候带宽9G,网卡为50Gbps |
Hi, I'll try to comment, because it is difficult to me understand Chinese (with translator). In the Techempower benchmark, they changed to more powerful new servers (28 cores and 56 threads) some months ago, and Workerman scaled perfectly ( ~3x faster). Without Keep-alive, you are testing the TCP performance, and this job is done by the kernel not Workerman. The bottleneck can be anything, not necessarily the software (and I doubt that is Workerman). For the CPU, send the output of And please send the code (you said that is simple). The problem can be anything, but for sure that is not from Workerman. Please send more information, to try to help you. Thank you. |
Another question is: |
知道这个问题,所以我把body内容调整成2字节了,所以宽带没有瓶颈; 在48个worker时达到145万QPS极限,再增加worker数量QPS不增反降 |
|
@louishot please in English I am still waiting for your information. And you think that the problem is still Workerman. I don't think so. |
@joelhy @walkor |
I think that is your CPU, with the security mitigations. From the Techempower benchmark timeline. Nginx with "Hello world" test and 28 coresNginx full timelineWorkerman full timelineThe benchmark still don't use Ubuntu 24.04, that come with the kernel 6.8.
|
@walkor I see a drop in the last changes from v5 Perhaps will be good to check with the timeline, what changes we did in that time. I send you the url, that show the exact time of each run. Possibly is not related to Workerman code, but an small inspection is recommended. UPDATE: |
@joanhey
Client
|
The Xeon Gold CPUs, were the most affected with the security mitigations. The earlier graph from Techempower timeline: Is from a Xeon Gold 5120 (now we have new servers)
And show clearly how Nginx (and all frameworks) after all the recent security mitigations, the big drop in performance, from 4 millions req/s to the last runs with only ~1.5 millions req/s. Now they use Xeon Gold 6330 CPUs, that are not affected by most vulnerabilities, and now with the same Nginx configuration, give ~6 millions req/s. PD: the problem is in the fault CPUs, not in the software security mitigations needed to add to the OS kernels (linux, Windows, ...) to fix the Hardware problem. |
@joanhey let me try phoronix test, now I use wrk there is no graph I cannot see the QPS over the time |
You don't need a bench over the time. Only disable the mitigations and bench again. But remember that your server will be vulnerable. https://jcvassort.open-web.fr/how-to-disable-cpu-mitigations/ |
服务器上一共有80个CPU,为什么在配置worker数量为80时测试发并发反而没有配置为8个worker QPS高呢(已启用event扩展)?
配置80个worker时测试结果如下:
配置8个worker时测试结果如下:
是CPU核心太多相互竞争内耗严重导致吗?
The text was updated successfully, but these errors were encountered: