Post Reply 
Minim stream being throttled on QNAP NAS ?
21-11-2024, 19:39
Post: #1
Question Minim stream being throttled on QNAP NAS ?
Have been using Minim Server on a QNAP NAS to supply mp3 files to BubbleUpnP and then to my old Sonos units (which I’ve used for years). The QNAP is less than a year old and is hosting a total file load of 2.35 TB on a 7 TB total size store.
Things went well until a few weeks ago.

After putting on some more mp3 files into my single-root library on the NAS, a new-to-me Sonos error was being thrown up. To the effect that Sonos wasn’t being fed the stream fast enough.
The effect was to cause a sound file to suddenly cough & splutter, with the rest of the playlist doing the same (seemingly randomly). Diagnosing has been a problem, as it was never the “early” files in an album or playlist that would do this, but a much later track, say track X (10, 15 or whatever).
Re-starting the sequence from spluttering track would then play fine – so it isn’t the actual file that is a problem. But then after X more, it might do much the same – if the playlist/collection was of big enough length.
There have been two Minim server updates since it started, so I’ve re-started diagnosis each time. Sadly, neither have cured the problem.

One thing I tried was to hack out a big chunk of the main library source & forced new rescan via making startupScan property to full, to see if reducing the overall library size helped, but no.
Any ideas why adding a few CD’s worth of mp3s should make Minim to be slower than it used to be ? Or how to work out what the problem is ?
Sonos never threw this error before, even in the old days when the library was on a MUCH older NAS.
Find all posts by this user
Quote this message in a reply
22-11-2024, 11:41
Post: #2
RE: Minim stream being throttled on QNAP NAS ?
It sounds like something else running on the NAS is using excessive system resources (CPU, memory, disk I/O, network bandwidth) and this is not leaving enough system resources for MinimServer to run correctly.

To see what system resources are in use, open Resource Monitor on the NAS. The Overview page shows CPU, network and memory usage. The Storage Resource page has a Disk Activity tab that shows disk I/O activity on each disk. The Processes page shows CPU and memory usage for each running process.

Another possibility is a hardware fault. For example, a faulty HDD could be doing excessive retries trying to read bad sectors. This should show up in the Resource Monitor data.
Find all posts by this user
Quote this message in a reply
23-11-2024, 00:29
Post: #3
RE: Minim stream being throttled on QNAP NAS ?
(22-11-2024 11:41)simoncn Wrote:  It sounds like something else running on the NAS is using excessive system resources (CPU, memory, disk I/O, network bandwidth)
...
Another possibility is a hardware fault. For example, a faulty HDD could be doing excessive retries...

Thanks for the suggestions. When the stuttering occurs, there is no-one doing anything with the NAS, so it is just doing its 24/7 background tasks.
Just did a basic check, and fired up playing a tracklist that got no further than 3 tracks in succession this morning. A start-up peak of 16% process time, then 3-8 % thereafter. 1.3GB memory of 3.6 GB. Max latency =52 ms at start, then max was 13ms.
So very light usage - and, because I'm taking the effort to monitor it, the playlist is working perfectly !!

As I said, playing any "stuttering" track by deleting the playlist and then re-starting the list at the stutter, it almost always plays the "problem" track perfectly that has now become the 1st track - so I think I can eliminate the HDD fault likelihood.

As it is currently playing just fine (! shows it *can*) I'll try & come back when it goes wobbly again - which will be when I'm on another floor or in the shower Sad
Find all posts by this user
Quote this message in a reply
23-11-2024, 12:08
Post: #4
RE: Minim stream being throttled on QNAP NAS ?
To clarify, the possible HDD fault would not be an error with reading the track that is playing but a fault when some other process on the NAS is running and reading a different part of the HDD.

Another possibility is that there is some other process on the NAS (such as indexing or creating thumbnail images) that runs from time to time and consumes a lot of system resource when it is running.

For both of these, you need to view resource usage while the problem is occurring.

Another possibliity is an intermittent problem with the network connection from the NAS to the player. A problem like this many years ago was solved by replacing an Ethernet cable. This would be a last resort after checking NAS resource usage as described above.
Find all posts by this user
Quote this message in a reply
25-11-2024, 15:53 (This post was last modified: 25-11-2024 15:57 by windbag.)
Post: #5
RE: Minim stream being throttled on QNAP NAS ?
Thanks for the extra suggestions.
(23-11-2024 12:08)simoncn Wrote:  the possible HDD fault would not be an error with reading the track that is playing but a fault when some other process on the NAS is running and reading a different part of the HDD.

The QNAPS have extensive flags for any HDD file read errors, and nothing is coming up about that.

(23-11-2024 12:08)simoncn Wrote:  Another possibility is that there is some other process on the NAS (such as indexing or creating thumbnail images) that runs from time to time and consumes a lot of system resource when it is running.
For both of these, you need to view resource usage while the problem is occurring.

Just tried playing an album, and it immediately went into stutter mode (which usually causes it to abort the current track & try the next).
It only "settled" for a while on track 14 of 17. before giving up entirely.
It really is startling how bad it is at the moment compared to a couple of nights ago.

So, I grabbed a couple resource screenshots (attached). Pretty much identical to to it working fine during my last post.
There really is nothing using the NAS (only myself at home).

In the Process list, what might the Minim Server process be called ? - there is nothing with Minim in the title that I can see.

As for interference, that starts going down a deep rabbit hole that I'm not sure I'd come out of. Similarly with cables.
But that doesn't tie in with it working fine for quite a while, then suddenly starting to do this after the addition of a few CDs worth of mp3 tracks.


Attached File(s) Thumbnail(s)
       
Find all posts by this user
Quote this message in a reply
25-11-2024, 18:53
Post: #6
RE: Minim stream being throttled on QNAP NAS ?
(25-11-2024 15:53)windbag Wrote:  Just tried playing an album, and it immediately went into stutter mode (which usually causes it to abort the current track & try the next).
It only "settled" for a while on track 14 of 17. before giving up entirely.
It really is startling how bad it is at the moment compared to a couple of nights ago.

Do you experience the stuttering when playing to BubbleUPnP's local renderer?
Have you configured transcoding in MinimServer?
Are you playing to a single Sonos speaker?
Are you using BubbleUPnP Server?

If you're not actively browsing, MinimServer's resource usage should be minimal as it's only serving the requested tracks over http.
If you click on the vertical ellipis next to a track in BubbleUPnP to get the track's URL, you can check the download speed yourself:
Code:
curl "http://192.168.*.*:9790/minimserver/*/flac/Adele/2011*20-*2021/01.01.flac" -o "01.01.flac"
I can't remember how Sonos buffers the track but it may give you some insight.
Find all posts by this user
Quote this message in a reply
25-11-2024, 21:28
Post: #7
RE: Minim stream being throttled on QNAP NAS ?
Again, thanks for the info & suggestions
(25-11-2024 18:53)simbun Wrote:  Do you experience the stuttering when playing to BubbleUPnP's local renderer?
No, as I have no need to play the music to my phone or other controllers (in fact the same music is on the phone as well, but I've almost never wanted to do this).
So, I'm trying that right now. Tracks 1 & 2 have just jumped to the end, and now track 3 is stuck at the start. Manually jumped to 4- it glitched and has now started 5, and now again to 6.
(25-11-2024 18:53)simbun Wrote:  Have you configured transcoding in MinimServer?
No. All the music files are all mp3 (Vbr) files, and the Sonos was always played them without issue, even with the old Sonos library system.
(25-11-2024 18:53)simbun Wrote:  Are you playing to a single Sonos speaker?
Depends what you mean. I use a single Sonos 'target', that has been configured to be the lead of a group of Sonos units. It has been the only way I have found to play a Sonos group. If I make the renderer one of the others in an existing group, I get no playback. That has been true since I tried using the Minim/Bubble combo.
(25-11-2024 18:53)simbun Wrote:  Are you using BubbleUPnP Server?
Do you mean have I put BubbleUPnP Server on the NAS ? No, I have Bubble uPnP on several Android units (Nexus v2 tablets and Samsung phones)
(25-11-2024 18:53)simbun Wrote:  If you're not actively browsing, MinimServer's resource usage should be minimal as it's only serving the requested tracks over http.
That is exactly what I thought should be so. And it seemed to have been until recently.
(25-11-2024 18:53)simbun Wrote:  If you click on the vertical ellipis next to a track in BubbleUPnP to get the track's URL, you can check the download speed yourself:
Code:
curl "http://192.168.*.*:9790/minimserver/*/flac/Adele/2011*20-*2021/01.01.flac" -o "01.01.flac"

It reports, for current track -
Album The Murder Wall
Artist Kaprekar's Constant
Duration 6:15
Stream#1 MP3,128 kbps,stereo,44100 Hz, with a longish URL that I can see no way of copying to put into the code string.

Does the MP3,128 kbps,stereo,44100 Hz, indicate it IS being re-coded ?
Find all posts by this user
Quote this message in a reply
25-11-2024, 22:10
Post: #8
RE: Minim stream being throttled on QNAP NAS ?
I tried playing a 256 kbps MP3 album from my QNAP NAS. The network usage you have posted looks different from what I am seeing (see attached image). My graph shows regular peaks at the start of each track, then very little traffic thereafter.

How is your QNAP connected to the SONOS over your network? Can you try changing this? For example, if this is a wired connection, can you try wireless instead (or vice versa)? I think the issue is probably with your network connection rather than something on the QNAP.


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
25-11-2024, 22:22
Post: #9
RE: Minim stream being throttled on QNAP NAS ?
(25-11-2024 21:28)windbag Wrote:  Again, thanks for the info & suggestions
To clarify, the last questions were posed by me, a fellow MinimServer user, rather than the author.

(25-11-2024 21:28)windbag Wrote:  
(25-11-2024 18:53)simbun Wrote:  Are you playing to a single Sonos speaker?
Depends what you mean. I use a single Sonos 'target', that has been configured to be the lead of a group of Sonos units. It has been the only way I have found to play a Sonos group. If I make the renderer one of the others in an existing group, I get no playback. That has been true since I tried using the Minim/Bubble combo.
If you want stereo/multiroom playback then yes you need to play to the master, but the last time I tried, if I played to one of the slaves it played from just that speaker, but things may have changed.


(25-11-2024 21:28)windbag Wrote:  It reports, for current track -
Album The Murder Wall
Artist Kaprekar's Constant
Duration 6:15
Stream#1 MP3,128 kbps,stereo,44100 Hz, with a longish URL that I can see no way of copying to put into the code string.

Does the MP3,128 kbps,stereo,44100 Hz, indicate it IS being re-coded ?
It only indicates transcoding if the source file isn't MP3@128. Try doing the same on a track you know is of better quality.

If you click on the track's URL in BubbleUPnP does it download successfully, and, with the local renderer selected, does it play back successfully in BubbleUPnP?

I take it you've tried a number of different albums?

I guess you could put the log in Trace mode to see if anything shows up with the transfer, but only do that if @simoncn thinks it's worth it.
Find all posts by this user
Quote this message in a reply
25-11-2024, 22:36
Post: #10
RE: Minim stream being throttled on QNAP NAS ?
(25-11-2024 22:22)simbun Wrote:  I guess you could put the log in Trace mode to see if anything shows up with the transfer, but only do that if @simoncn thinks it's worth it.

I would suggest Debug mode rather than Trace. This should capture all useful information.

If you do this, don't try to copy the log output inline to a forum post. You need to zip or compress the log file, then attach the compressed file to a post as a file attachment.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)