6

The boot sequence opens up Kodi in full screen. That comes up fine. But when I try to initiate an ssh connection it will often just simply time out. This lasts for about 10 minutes after a reboot. There's also a lot of UI slowness: a window drag will take a few seconds to respond. Checked top, CPU is never above 20%, memory is fine.

10

(You've solved your specific problem, but I'm posting some general advice for people encountering a similar problem.)

On many systems, if you turn your computer off at night and boot it or wake it up from suspension in the morning, it'll run various daily jobs, via anacron. This starts a few minutes after the computer wakes up, so you'd typically have time to log in but the resource usage would intensify after a few minutes. Anacron jobs are configured in /etc/anacrontab; a common configuration is for it to run the jobs listed in /etc/cron.daily. Maybe one of these jobs is using an unreasonable amount of resources for some reason. Use a tool like pstree to check what children of anacron are running.

You've found that there isn't much CPU usage. Given your description, the most likely culprit is extreme memory pressure, where your normal activity is competing with some program that also wants all the memory for itself, so the system keeps thrashing, i.e. it keeps having to move data memory into swap and back out, and to load parts of running programs and data that would normally stay in the disk cache. iotop can give you an idea of disk activity.

Check the system logs under /var/log. ls -ltr /var/log will let you know which ones were modified the most recently; check the ones that kept being written after you logged in. The contents may offer a clue.

3
  • "Given your description, the most likely culprit is extreme memory pressure" -- but in the top post it says memory is fine. It never went above 30% when I was seeing the slowdowns.
    – jcollum
    Sep 12 at 21:35
  • I am still seeing some occasional slowness when hitting the NAS for file listings etc so I think there are still issues to track down
    – jcollum
    Sep 12 at 21:38
  • But thanks for offering advice, I think it will help anyone who finds this question in the future
    – jcollum
    Sep 12 at 21:39
5

I found the reason for this a few minutes after I started writing this up but I'd prefer to leave the question up in case it helps anyone else.

I noticed that systemd was the first entry in top quite often. This led me to check my logs:

ls -alht /var/log

First entry syslog, was 5GB. WOW. OK that told me something was wrong. Then I ran:

journalctl -f

Which showed a ton of USB errors -- to the tune of 100 per second -- with an error like Error: urb status = -32. I tracked down the USB issue* (problem with an external USB signal receiver) and the issue went away.

* sorry, revealing more info might give away an account I'd prefer to keep anonymous.

4
  • 1
    We don't care about your account so you're safe there. But if I had an issue with an external USB receiver I'd be very thankful if you finished your thought here. Sep 13 at 19:21
  • I'm not going to reveal that account -- it's for my own safety. I'll give you a hint: it had to do with an HTPC IR receiver.
    – jcollum
    Sep 13 at 20:29
  • It would be very informational if you could show some relevant log lines (with private data removed or replaced, obviously). This would help other readers with similar issues. The issue can't "go away" by the act of viewing a log file, so what Corey is asking about is what it was in the log that pointed your to the correct resolution and what it prompted you to do to actually resolve your issue. In its current state, your answer is essentially a non-answer.
    – Kusalananda
    Sep 14 at 19:45
  • Made an edit. There's really nothing more to add, the error message is only a handful of characters beyond what I added.
    – jcollum
    Sep 14 at 21:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.