# systemd-journal + systemd-resolve + dnsmasq high cpu usage

on Ubuntu 16.10, for some minute after wifi connection, systemd-journal, systemd-resolve and dnsmasq tend to use almost 150% of CPU.

Is this normal?

• Is it still doing it? Can you see if it's spamming any log files? You could see which files are recently modified in /var/log. The manpages as suggested below will hopefully give you a better idea of what their function is, and perhaps which log files they might be writing to. – mwfearnley Apr 18 '17 at 9:15
• You can't use 150% of CPU. If you have a dual-core, hyper threaded CPU you are really using 37.5% of 4 CPUs even though top says 150% (it's an old program). If you have an i7 Quad Core with hyper-threading you are really using 18.75% of 8 CPUs. – WinEunuuchs2Unix Aug 23 '18 at 1:16

Suggested by another Steps of solution

Add the line DNSMASQ_EXCEPT=lo to /etc/default/dnsmasq

sudo nano /etc/default/dnsmasq


Restart dnsmasq via

sudo service systemd-resolved restart


Say Thanks If I helped, It went back to normal and does NOT screw around with other apps, as the previous method DID.

Cheers, Mark

• Solved this problem for me on 18.04 Bionic Beaver. – Wilbert Jan 15 at 18:20

I had the same Problem in 18.04. systemd-resolved and dnsmasq tend to loop. I solved it this way:

Add or uncomment the following line in /etc/default/dnsmasq:

IGNORE_RESOLVCONF=yes


Create your own resolv file (/etc/resolv.personal) to define nameservers. You can use any nameserver here. I took two from OpenNIC.

nameserver 5.132.191.104
nameserver 103.236.162.119


In /etc/dnsmasq.conf add or uncomment the following line:

resolv-file=/etc/resolv.personal


Then restart dnsmasq and disable the default resolver: systemd-resolved.

sudo service dnsmasq restart
sudo systemctl stop systemd-resolved
sudo systemctl disable systemd-resolved


Read man systemd-journald; Read man systemd-resolve; Read man dnsmasq; Read man journalctl.

Check your log files in /var/log/*.

From the little you've said, it looks like a whole bunch of log entries are being made (Investigate why!), and some part of your logging system is trying to resolve "domain names, IPv4 and IPv6 addresses, DNS resource records or services with the systemd-resolved.service(8) resolver service.". (Read man 8 systemd-resolved.service.) This "name resolution" is what's taking the time.

Normal? When Linux runs on everything from Systems-On-Chip to members of the Top 50 Supercomputers, what does "Normal" mean?

• "Normal" as in typical for a computer with a wifi connection running Ubuntu 16.10, I guess. – mwfearnley Apr 18 '17 at 9:09