https://bz.apache.org/bugzilla/show_bug.cgi?id=66424
Bug ID: 66424 Summary: CPU affinity request Product: Apache httpd-2 Version: 2.4.37 Hardware: PC OS: Linux Status: NEW Severity: major Priority: P2 Component: mpm_event Assignee: bugs@httpd.apache.org Reporter: machuang1...@gmail.com Target Milestone: --- Created attachment 38463 --> https://bz.apache.org/bugzilla/attachment.cgi?id=38463&action=edit Diagram for cpu affinity setting Hi All, During httpd performance evaluation in Alibaba Cloud instance, I found httpd performance improved significantly after using “taskset” to set CPU affinity for httpd processes/threads, because it decreased the amount of CPU migrations. Performance improved 60% in arm instance g8y.2xlarge(8 vcpus, 32GiB memory, 40GB ESSD), also improved 20% in x86 instance g7.2xlarge(8 vcpus, 32GiB memory, 40GB ESSD). Test case: run httpd with event mode on g8y.2xlarge or g7.2xlarge, run traffic generator/benchmark 'wrk' on g8y.4xlarge(16 vcpus, 32GiB memory, 40GB ESSD), wrk command is 'wrk -t 32 -c 1000 -d 30 --latency http://$ServerIP' mpm event parameters: <IfModule mpm_event_module> StartServers 8 ServerLimit 100 ThreadLimit 2000 MinSpareThreads 75 MaxSpareThreads 2000 ThreadsPerChild 125 MaxRequestWorkers 2000 </IfModule> But httpd didn't have related parameters to support CPU affinity, so I used "taskset" to optimize. After source code analysis, I made a prototype for the affinity solution(add set_affinity function when worker/lister thread created). We can observed the same improvement by this solution. However, this prototype only applied on above special “event mpm” configuration. I think also need to modify current mechanism of dynamically adapts to the perceived load and add new parameters for the affinity setting. So is it possible to involve httpd developer to evaluate this request and add cpu affinity function in future version? Thanks -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: bugs-unsubscr...@httpd.apache.org For additional commands, e-mail: bugs-h...@httpd.apache.org