Buffer empties and audio dropouts when playing files from internal ssd drive

Roon Core Machine

Hardware: MeLE QuieterHD3 Fanless Mini PC
CPU: Celeron N5105
RAM: 8G
Internal SSD for music library: KINGSTON SA400S37480G (480GB SSD)
OS: Debian 12 Bookworm (stable) (headless).

Networking Gear & Setup Details

Ethernet connections throughout.
Switches: Netgear GS116E Managed Switches
Internet connection: 900 Mb fibre consumer broadband.

Connected Audio Devices

Raspberry Pi running PicorePlayer (over Squeezelite) with HifiBerry Digi
3x RaspberryPi running Ropieee with HifiBerry DAC or USB Dac
LG Television over HDMI
PC running Roon client (Dell Workstation, Core i9, 32Gb RAM)
Android - Samsung S21
Google Pixelbook

Number of Tracks in Library

12,451 tracks

Description of Issue

The machine is dedicated to Roon.

Everything works fine except for occasional ~2 second dropouts when listening to files on the SSD.

The dropouts might happen once every 3 or 4 songs.

The dropouts do not occur when listening from Tidal.

The dropouts happen on all endpoints so the issue seems to be the Core.

Capturing the tail of RoonServer_log.txt when it happens shows the ā€œsleeping in read ā€“ this isnā€™t goodā€ message and the buffer is running out before getting dropouts. See extract below.

Having searched the forums this seems to mostly be caused by network issues, but seeing as Tidal is fine and the error only occurs when playing local files from the SSD, Iā€™m a bit stumped.

I canā€™t find any other messages in syslog, journalctl, RoonBridge or RAATServer logs that indicate any other offending system activity or errors.

System CPU rarely exceeds 10% when listening to one endpoint. Iā€™ve not managed to cause any [further] issues when running several zones with DSP to stress the system, so I expect the hardware specs are sufficient.

Running iotop shows RoonAppliance is usually the only process reading and writing.

The SSD passes SMART tests and Iā€™ve confirmed it can read / write at 1.1 / 0.5 Gb per sec, so it doesnā€™t seem to be a problem.

Do you have any other suggestions about what to check or monitor?

Thanks if so.

09/01 14:13:07 Trace: [PC] [HighQuality 44.2x, 16/44 FLAC => 16/48] [100% buf] [PLAYING @ 3:32/9:36] Planet of the Shapes - Orbital
09/01 14:13:12 Trace: [PC] [HighQuality 44.2x, 16/44 FLAC => 16/48] [100% buf] [PLAYING @ 3:37/9:36] Planet of the Shapes - Orbital
09/01 14:13:17 Trace: [PC] [HighQuality 44.1x, 16/44 FLAC => 16/48] [100% buf] [PLAYING @ 3:42/9:36] Planet of the Shapes - Orbital
09/01 14:13:19 Info: [stats] 23400mb Virtual, 1591mb Physical, 496mb Managed, 362 Handles, 86 Threads
09/01 14:13:22 Trace: [PC] [HighQuality 44.1x, 16/44 FLAC => 16/48] [100% buf] [PLAYING @ 3:47/9:36] Planet of the Shapes - Orbital
09/01 14:13:27 Trace: [PC] [HighQuality 44.2x, 16/44 FLAC => 16/48] [100% buf] [PLAYING @ 3:52/9:36] Planet of the Shapes - Orbital
09/01 14:13:32 Trace: [PC] [HighQuality 44.2x, 16/44 FLAC => 16/48] [100% buf] [PLAYING @ 3:57/9:36] Planet of the Shapes - Orbital
09/01 14:13:34 Info: [stats] 23400mb Virtual, 1591mb Physical, 514mb Managed, 362 Handles, 86 Threads
09/01 14:13:36 Trace: [PC] [zoneplayer/raat] sync System Output: realtime=931947689833 rtt=0us offset=-6797310us delta=-543us drift=-476us in 241.5355s (-1.973ppm, -7.105ms/hr)
09/01 14:13:37 Trace: [PC] [HighQuality 44.2x, 16/44 FLAC => 16/48] [84% buf] [PLAYING @ 4:01/9:36] Planet of the Shapes - Orbital
09/01 14:13:42 Trace: [PC] [HighQuality 44.2x, 16/44 FLAC => 16/48] [34% buf] [PLAYING @ 4:06/9:36] Planet of the Shapes - Orbital
09/01 14:13:45 Debug: [prebuffer] sleeping in read -- this isn't good
09/01 14:13:47 Trace: [PC] [HighQuality 44.2x, 16/44 FLAC => 16/48] [2% buf] [PLAYING @ 4:12/9:36] Planet of the Shapes - Orbital
09/01 14:13:49 Info: [stats] 23400mb Virtual, 1591mb Physical, 528mb Managed, 362 Handles, 86 Threads
09/01 14:13:51 Trace: [System Output] [raatclient] GOT [16] {"samples":12224,"status":"Dropout"}
09/01 14:13:51 Trace: [System Output] [raatclient] GOT [16] {"samples":20640,"status":"Dropout"}
09/01 14:13:52 Trace: [System Output] [raatclient] GOT [16] {"samples":5280,"status":"Dropout"}
09/01 14:13:52 Trace: [PC] [HighQuality 44.1x, 16/44 FLAC => 16/48] [100% buf] [PLAYING @ 4:17/9:36] Planet of the Shapes - Orbital

I may be wrong, but I think the network requirements are higher for local files than for anything streamed from Qobuz or Tidal, so this could still be a networking issue.

The only thing I could find that seems relevant is this thread. If you read it through youā€™ll see that the switches may have been causing problems, so it might be worth seeing if you can change your network configuration to see if it makes any difference. I also seem to remember reading that managed switches can cause problems for Roon, so this might be further evidence that you have a networking problem rather than an issue with your SSD,

Thanks @DaveN for the reply. I did see the thread you mentioned.

The thing is that I ran Roon for 2+ years on an old PC with no issues. Only since I moved to the Mele box have I encountered these issues - and itā€™s plugged into the exact same network port as the previous machine which never had such dropouts.

So, Iā€™m close to certain that the issues is within the new machine. I recognise Iā€™ve gone somewhat ā€œoff-pisteā€ with the hardware and OS so Iā€™m not expecting endless assistance. But if anyone has any other idea Iā€™d me most grateful.

I guess I should swap the SSD out for another and see whether that makes a difference.

Cheers,

Jon

1 Like

A couple of things you could try network-wise is making sure that jumbo frames and IGMP snooping are turned off on your managed switches and router. But another possibility is that Roon is tickling some kernel I/O issue that manifests itself on your specific hardware and OS. What happens if you use your Dell workstation as core instead of the mini PC?

Iā€™m going to tentatively say that Iā€™ve found the issue. Tentatively, because this is an intermittent thing - but Iā€™ve now gone about 6 hours of playing music with no dropouts.

Thanks to both @DaveN and @Fernando_Pereira for pushing me towards networking as the culprit.

I re-read the thread @DaveN recommended and saw this sentence from @noris:

ā€œSleeping in read is a general term that the Core or endpoint was waiting for some data (e.g. trying to read it), but the data was not delivered on time and the action was paused (e.g. put in sleep mode) until the data was delivered.ā€

So, possibly not the Core but the endpoint waiting for data? Well this could of course be network related.

At that point I remembered having some issues in the past (not with Roon) with power management on a network adaptor shutting the NIC off occasionally.

A quick search and following this post on the Ubuntu forums to set the network device to ā€œonā€ rather than ā€œautoā€ - and no dropouts since.

I guess the reason I only encountered issues streaming local files (and hence why I suspected the SSD) is that streaming from Tidal keeps the network adaptor busy, so the power management doesnā€™t shut it down. That does raise the question of why streaming to an endpoint on the local network doesnā€™t keep it on - but my curiousity wanes once things are working :slight_smile:

I do still have some ā€œsleeping in readā€ messages in the logs, but the buffer doesnā€™t run out. I might have always had this, of course until i had issues I never looked. Iā€™ll play with the switch settings @Fernando_Pereira suggested and see if they have any impact.

Anyway - thanks again both.

3 Likes

Iā€™m glad you got it sorted, but itā€™s probably worth some further tinkering as I donā€™t think the ā€˜sleeping in readā€™ error is normal - I canā€™t find it in any of my logs. Good luck with tracking down the problem.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.