systemd-journald high CPU usage
Matthew Harrington
A few days ago, I installed Ubuntu 17.04 on my Asus laptop dual-boot with Windows 10 and shortly thereafter, I noticed that the systemd-journald process was constantly using 25-35% of CPU.
I traced the process and saved part of the output is at here.
It seems that the CPU is looping, doing something that is related to a pci device.
Does anyone have any advice on the problem?
3 Answers
@S_n Can you please check the logs, and see whether it gives an indication about the problem?
I've had the same problem and that caused an infinite loop, and the CPU was constantly higher than 30%.
So if you run in the terminal journalctl you can check it the log in the terminal.
I fixed it by adding a pci=nomsi parameter to the GRUB_CMDLINE_LINUX_DEFAULT property(you can find and edit it in: sudo vim /etc/default/grub)
After adding the parameter update the grub: sudo update-grub and then reboot.
Then run top in the terminal, and see whether that fixed it.
Note: By doing that you'll add the parameter permanently, however you can do it temporarily
If you want to add it temporarily, as following:
- Start your system and wait for the GRUB menu to show (if you don't see a GRUB menu, press and hold the left
Shiftkey after starting the system). - Now highlight the kernel you want to use, and press the e key. You should be able to see and edit the commands associated with the highlighted kernel.
- Go down to the line starting with
linuxand add your parameterpci=nomsito its end. - Now press Ctrl +x to boot.
ADD pcie_aspm=off parameter to the GRUB_CMDLINE_LINUX_DEFAULT and GRUB_CMDLINE_LINUX property by running sudo nano /etc/default/grub after
$ sudo update-grub $ reboot
This workaround solved the problem in my computer (Ubuntu 17.10 x64):
$ sudo apt-add-repository ppa:ubuntu-desktop/gnome-software
$ sudo apt update
$ sudo apt upgradeThe problem is caused by snapd-glib, that logs hundreds / thousands of lines per minute in the /var/log/syslog like these:
Jan 29 11:12:28 hostXXX gnome-software[1723]: Ignoring unexpected response
Jan 29 11:12:28 hostXXX gnome-software[1723]: g_byte_array_remove_range: assertion 'index_ + length <= array->len' failedMy /var/log/syslog got 9.5 Gb of size before update the module and purge the content.