Bear with me, this is messy and weird.
Basic problem: stuttering; and it's worse with some songs than others. Only the actual SB Classics stutter - I just set up squeezelite on a piCorePlayer and it doesn't stutter. On the Classics, the stutter is worse on some units than others. Donn't prejudge the problem: it's not network bandwidth, and the Classic that's on wifi stutters the least.
I want to keep the Classics going as long as I can, because my wife is used to using the remote and the menus on the display.
Now for the many weird aspects. First of all, all the Classics are on rev 81 of the firmware. Why so old? Because I'm not using LMS. I'm using a custom server that understands the protocol used in version 81, and for complicated reasons I'll skip over unless asked, that aspect won't change. I'm very wedded to the custom server, and my wife is very wedded to the completely custom way it displays menus and other info on the classic. PiCore and Squeezelite won't be an option for her, at least until I have a way to display a facsimile of those menus.
Second, when I ran my server on a raspberry pi, there were no stutters, in about 10 years of use. I recently moved it to a NUC, a much faster system; that's when the stuttering started - very rarely for some players and some some songs, but horribly often for one particular song and a couple of players.
Since it's my own server, I can instrument it however I like, so I measured the timing for reading chunks from the music file, and how long it took to send() each chunk over the network.
Reading the file isn't a problem: Reading 64k at a time from an internal SSD disk, the NUC is spending between 28 to maybe 60 microseconds to load each buffer, with very occasional spikes as high as 1.3 milliseconds. The average is around 40 microseconds. Reading is fine.
Writing over the socket is where the problem is. When I use the piCore player, I get exactly what I expect: when a song first starts loading to the piCore, socket writes happen quickly, with a peak of maybe 3 milliseconds to write each 64k, usually rather less. But the squeezelite fills its internal buffer, and reads less often, so the TCP stream backs up as expected. Socket writes in the server start blocking, waiting for the TCP stream to unjam. So I'll get a write time like 1093 milliseconds or 786 milliseconds, followed by something much faster for the next 64k chunk, like 108 microseconds. This is just what I'd expect - as squeezelite uses up the buffer, it gets more interested in doing TCP reads, which unblocks the server to quickly ship enough to top off squeezelite again. All is perfect.
But when I move that same ethernet cable to a classic (running firmware 81), the socket writes are a completely different story.
There is an initial inrush of buffers, though it's slower, at around 24ms each. (Except for some songs where it's slower). But thereafter, there's no alternating between slow and fast send times. Every send is in the hundreds of milliseconds. It's as if the Classic isn't bothering to read from the socket very often, so it stalls on its own buffer being empty. And it's simple to test that theory: if I just pause the music, the server keeps sending buffers, so when I unpause there's a period of unstuttering play.
I could believe the classic just isn't getting around to reading the socket often enough, but when the server ran on a raspberry pi this never happened.
And the weirdest aspect: this is sensitive to which song is playing. George Winston's Carol of the Bells doesn't stutter, or at least I haven't caught it at it. The Strawbs' Benedictus stutters like mad, towards the end of the song and on every repeat. (Both are flac). CSNY's Carry On starts stuttering only partway through.
All I can come up with is that there's some difference between the TCP stack of a raspberry pi and this NUC (linux mint) and somehow the classic is sensitive to it (and picore isn't), but that seems like a fringe theory. Note that I've tried this with different buffers sizes, and with nagle enabled and disabled. Still stutters.
I know the next step is to move the server back to a pi and see if the problem goes away again. Or move all the classics up to a more recent firmware and see if something changed.
Does anyone have any insight into what could cause this?