Hi,

On 4/6/21 6:25 PM, Nejedlo, Mark via Pdns-users wrote:
On Tuesday, April 6, 2021 10:04 AM, Remi Gacogne wrote:
On 4/6/21 4:18 PM, Nejedlo, Mark via Pdns-users wrote:
Would additional distributor threads really cause additional
worker
CPU usage?

That could happen if they have to fight for the incoming socket. Do
you have reuseport=yes in your configuration?

Either I'm deeply misunderstanding something (quite possible), or we
may be talking about different things.  If I understand correctly,
thundering herd problems should only show up on the distributor
threads, but my distributors are not very busy.  It is the workers
doing the actual DNS processing that show the high CPU, and I would
think the distributors address the workers individually, not via a
shared port (but maybe I'm wrong?)

You are right, sorry! The thundering herd would only show up on the distributor threads, and therefore could cause additional CPU usage but not _worker_ CPU usage indeed.

Dropping the distributors to one, which I'm planning to do anyway,
will eliminate the problem on the front end socket.  If the workers
do share the connection to the distributors, adding reuseport isn't
hard.

They don't, using reuseport should not make any difference if you have only one distributor, and not impact the _worker_ CPU usage indeed.

Do you really XPF, by the way? You are passing the initial client
IP in EDNS Client Subnet already, so that might be enough?

This is probably a misunderstanding on my part.  I was under the
impression that useClientSubnet=true told dnsdist that it needed to
pass the client IP, and addXPF/proxy protocol told it how to do so.
If I'm wrong, dropping XPF is easy enough.  Although, it sounds like
I also want to drop useClientSubnet in favor of the proxy protocol.

Right, these really are separate. useClientSubnet=true will add an EDNS Client Subnet option to the query, while addXPF will add a XPF record to the query. Having both is unlikely to be useful. The proxy protocol would be my preferred option because it doesn't not interact with the packet cache. EDNS Client subnet might also work but would likely require using dnsdist's packet cache and the zero scope feature to get the best performance.

Best regards,
--
Remi Gacogne
PowerDNS.COM BV - https://www.powerdns.com/
_______________________________________________
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
https://mailman.powerdns.com/mailman/listinfo/pdns-users

Reply via email to