Closed seanzhang422 closed 9 months ago
Are your queries coming from a small set of IP/port sources?
Yes, the test packets were sent with the same source IP and port. I updated the test to randomize the source port and now all distributor threads are used. So it's because of the way kernel distributes the packets and not the processor affinity. I'm closing this issue now.
Thank you for reporting back!
Short description
When configured with
repuseport=yes
,receiver-threads=X
anddistributor-threads=Y
only Y number of CPU cores will be used no matter what X is. Whilst whenreuseport=no
, X * Y CPU cores are used (if not exceeding the maximum CPU cores). Threads count are the same when checked withps -o nlwp <pid>
regardless ofreuseport
.Y can be any value >=1.
Environment
Steps to reproduce
pdns.conf
named.conf
example.com.zone
demo.example.com
with random ECS. And you can observe that only 2 CPU cores will be used.Expected behaviour
X * Y CPUs should be used with
Actual behaviour
Only Y CPUs are used
Other information