Skip to content
Contents
GuidesOpenWrt

High dnsmasq CPU usage with a large blocklist and subdomain queries

The CPU peak under a large interception table must correspond to specific queries. Compare the domain, its subdomain, and a regular domain under the same rule, differentiating between matching overhead and upstream waiting time.

Applies to · dnsmasq-full 2.93 · SNAPSHOT

What to check

On a dedicated DNS test client, query a domain and its subdomain with a complete hit list, recording query latency, return code, and router CPU usage.

Connect over Ethernet and run the following commands in an SSH session on the router.

top -b -n 1
dnsmasq --version

How to interpret the result

Keep the list and query frequency consistent. Query one name at a time. Record reply latency and dnsmasq CPU usage. Only investigate rule coverage when subdomain performance degrades noticeably. If all three names are slow, compare idle load and upstream query times.

Verify and recover

Check that the blocked name still receives the intended answer and that repeated subdomain queries finish in less time under the same load. Restore the original list and retest an ordinary name.

Related guide · Where to capture packets on OpenWrt when a TCP handshake times out

Explore hardware

Comments