Pi B Model 2 navigation slowness

I am running OSMC (@ work and don’t recall exact build) on a Pi B Model 2

Set up

  • Pi points to QNAP running MySQL DB - no issues there
  • Running tvheadend & USB tuner combo
  • It is a “USB Install” - however been done so using a powered 1 TB ext HDD, so I have enough space for DVR
  • I’m using the ‘classic’ XBMC interface

Problem Analysis

  • The above set up has been running fine for about 6 months, until this week
  • Navigating through menus (folder/subfolder) is significantly slower (hangs up to 20 seconds before change)
  • Playback will start the audio, but the screen will hang for about 20 seconds, then video will catch up
  • Rebooting the Pi/HDD has no effect on this issue
  • CPU/Memory looks fine at face value (20% utilisation)
  • I have checked the logs and can’t see anything out of the ordinary

Any tips? Perhaps a bit of clarity on where I can delve deeper into the logs.

I will probably end up rebuilding to the latest release, but am trying to avoid that timesink for now.

A gut feeling I have is the HDD may be on its way out, but not sure how to validate that one.

My gut tells me you are a kamikaze pilot on his final mission, referring to the information from Switch on Pi without unplugging power source - #3 by fzinken

Different Pi, therefore different scenario!

I am half kamikaze, half air force one captain.

That being said, in terms of logging, is journalctl the best place to start investigating?

In terms of logging the best is to enable debugging in Kodi and sent a complete set of logs via OSMC Log Uploader.

Try running ‘top’ in SSH, press ‘c’ to show full process names then capital M to sort by memory use - this should leave kodi.bin at the top of the list. (You can then press capital W to save this as default)

Now try doing whatever causes it to hang for 20 seconds and watch the status of kodi.bin. If it stays stuck in D state (uninterruptible sleep) for long periods of time then it usually means the process is stalled due to a disk IO problem. (Slow or stalled disk IO)

If this is the case my guess would be that your USB drive is on the way out. Personally I would not bother with a USB install these days, unless you need a really massive drive a good noobs or Samsung SD card is just as fast and an SD install is a bit more reliable than a USB install. Media files can still go on an external drive when you use an SD install.

Of course you would want to look at and provide a full set of debug logs as well but if nothing else obvious shows up in the logs my hunch is it will be your USB drive.

Edit: just noticed your USB drive is a spinning disk, so that changes things a bit. It could have some unreadable sectors which would definitely cause many seconds delay. The system journal log would probably show this so please provide logs taken just after the problem occurs and without rebooting first.

1 Like

Thanks Mandrake for the thorough response. I will have a go through SSH.

All media is stored on a NAS, apart from DVR, which goes straight to the local 1 TB (500 GB per show = lots of space needed…)

Initially I wanted to do what you had suggested by mounting the drive as opposed to doing a USB install, but I had a few issues with tvheadend & permissions (it’s not the OSMC tvheadend, I velieve it’s the wheezy build). I also wanted to send recordings straight to the NAS (9 TB) but had trouble exposing it there too.

Path of least resistance at the end I guess.