5

I am currently testing Ubuntu (17.10) and have almost all of the time 100% CPU load. I don’t think I can do anything against the systemd-journald, gdb or rsyslogd processes.

My specs (obtained from Settings > Details > About):

  • 3.8 GiB memory
  • Intel® Pentium(R) CPU B980 @ 2.40GHz × 2
  • AMD Turks (Graphics)
  • Gnome 3.26.2
  • OS type 64bit
  • DISK 487.0 GB

I can use the system but it is very slow. Sometimes it freezes completely, so I have to use the REISUB-Key combination (as described in What should I do when Ubuntu freezes?). My laptop gets hot relatively fast, so could this be the source of the problem?

Is there anything else I can check / do?

top -n1 and system monitor

devius
  • 1,210
  • 3
    Why are you running gdb? – Jos Feb 26 '18 at 20:31
  • This doesn't fix the freeze problem, but you have to divide top's CPU% by 8 for a quad core CPU and divide by 4 for a dual core CPU when hyper-threading is enabled: https://askubuntu.com/questions/842210/cpu-on-ubuntu-running-high/842214#842214 – WinEunuuchs2Unix Feb 26 '18 at 20:35
  • 1
    Clearly some process is logging like mad and that is causing the high cpu usage. gdb maybe? – devius Feb 26 '18 at 20:49
  • IDK why systemd-journal is hogging so much CPU, but as a temporary solution, maybe you could change the niceness value. This value is basically a CPU priority: the higher the niceness, the lower priority the program gets. If you type sudo renice -19 $(pgrep systemd-journal), that should give other programs the priority, which might help things for now. Hopefully someone else will be able to give you a more permanent solution. (You can also use top to change the niceness by pressing "r".) – TSJNachos117 Feb 26 '18 at 21:11
  • As a temporary workaround You can try to disable the service sudo systemctl disable systemd-journal.service until You figure out what may trigger the excessive logging. – Michal Przybylowicz Feb 27 '18 at 00:27
  • @Jos I though its a system process, dont know which program started gdb (visual studio code / monodevelop?) – Mokuyobi Feb 27 '18 at 17:45
  • @devius Dont think though, justs started my laptop and checked top -n1 -> there is no gdb but systemd-journal is again on 100%. Is the problem maybe related to ubuntu 17.10? – Mokuyobi Feb 27 '18 at 17:52
  • @TSJNachos117: after typing in the command to the terminal the %cpu value is between 90~100%. – Mokuyobi Feb 27 '18 at 17:53
  • @Michal Przybylowicz: Iam unable to get this command working. Says "Failed to disable unit: Unit file systemd-journal.service does not exist." After tab-completion there are only two service-files: systemd-resolved.service and systemd-timesyncd.service – Mokuyobi Feb 27 '18 at 17:53
  • Any errors on dmesg or sudo journalctl -f? – devius Feb 27 '18 at 18:06
  • The command wouldn't really lower how much CPU journald is using. Rather, it would make sure that other programs have higher-priority access to the CPU. – TSJNachos117 Mar 08 '18 at 07:12

1 Answers1

3

Just experienced this situation myself. One of the comments above was instrumental in helping me understand the root cause of the issue; namely that the cause for systemd-journald and rsyslogd to eat CPU is typically because another process is going crazy with logging.

In my case, systemd-journald was burning 100% of one core but I couldn't even stop it (systemctl stop systemd-journald.service just hung and a kill -9 would just respawn a new instance, still eating up 100% of a core). So I checked under /var/log and sure enough syslog had ballooned by over 600 MB in a matter of under 3 hours. A quick tail -f revealed the culprit (gnome-software in this instance). Killing that process immediately spun down the CPU.

sxc731
  • 1,134
  • 1
    In my case it was VLC running amok with log messages about an unsupported gamma filter. I had left VLC open on Ubuntu 20.04 laptop with a video paused, and let it sit there for a few days. I only noticed because I thought my fans were spinning higher than usual, and it was time for a (physical dust) cleaning cycle. It had produced over 600 GB of log entries on one of my 1TB nvme drives. I had to close VLC and delete all the syslog* files. I used truncate -s 0 /var/log/syslog on the main file, as I'm not sure if the system needs it to exist (probably). – Henrik Feb 20 '21 at 09:14
  • @Henrik ___600 GB___ ????????????!?!?!?!?!??!?!?!?!?!? OH MY GOD – TheEagle Jul 05 '21 at 20:05