My experiences with Rock and a 500k+ tracks library

The worst that a buggy codec in Roon could do is crash itself. Roon is physically incapable of trashing memory outside of its own process space–this is enforced by the kernel. If the whole OS is going unstable, something else is going on. Our ALAC codec comes straight from Apple in source code form. It’s the same one that pretty much everyone uses.

OS-provided codecs are never our first choice. When we use them, it is generally for licensing reasons–to avoid shipping code that is protected by patents. Currently, that means we get AAC/MP3 from the OS and ship the rest, but we will likely shift to bundling our own MP3 codec soon since the patents recently expired.

Some of the most difficult stability issues that we’ve faced result from poor 3rd party codec implementations. We are aware of about half a dozen defects across the AAC/MP3 codecs that come with Mac and Windows and have put some pretty nasty workarounds in place to mitigate them. It would have been much easier to deal with these situations if we were building the same codecs from source and could just go in and fix the bugs directly.

If you have particular files that cause problems with Roon, tag our support team and let them know. We are generally pretty good about tracking that stuff down when it comes up.

Hi,

I have files that play fine for years on several devices, including ROON, and all of a sudden, you hear screaching noise.
And yes, it does make OS unstable in that case.
"The worst that a buggy codec in Roon could do is crash itself. "
I wish that were true. I obviously don’t know how ROON is written, I can only observe what it does.
The only way to recover in these cases (more than one, sadly), is OS reboot.
After that - you can play the same files with no issues, as you could for years beforehand.
“We are aware of about half a dozen defects across the AAC/MP3 codecs that come with Mac and Windows and have put some pretty nasty workarounds in place to mitigate them.”
That may be the case, but as an end user, I need to play my files, properly ripped and playable everywhere else.
Which means, maybe you need to use their workarounds, or simply advise that certain codecs are unstable.
Such information would be invaluable, so that I, and other users, could avoid problematic pieces of code.

And as for Apple shipping buggy ALAC/AAC implementation - I find it hard to believe. The internet would be full of people screaming about it.
All I want is to use ROON (which I like, just look at my user name), and not concern myself over this codec or that one.
And worst - I REALLY do not wish to run into a situation (happened multiple times on multiple OSs) to hear a screeching sound in the middle of a song and find that ROCK stopped responding or Windows remote desktop all of a sudden stopped responding reliably).
I’m a software developer, so can distinguish between various causes of things.

Many thanks in advance!

If this is true, your OS has a bug–it’s the kernel’s job to protect itself and other apps from badly behaved applications. You’re a developer, so I don’t have to explain how virtual memory and protected mode works.

The bugs on OS X that I’m aware of are all in the MP3 codec. Their AAC/ALAC stuff is fine. Windows has some bugs with AAC and some with MP3.

Sure, I appreciate that–but understand that backseat driving technical decisions isn’t necessarily going to get a “sure, we’ll do it” response. You do not have the visibility into our system to know that “not using OS provided codecs” is the root cause. And with only a vague problem report and no way to reproduce the issue and investigate–neither do we.

This isn’t a problem description that I’ve heard before. Have you reported this to our support team? They are well equipped to verify that they can reproduce your problem and then put it in front of someone who can fix it.

1 Like

Hi, yes.
I did.

Please forgive me my frustration, but I first installed ROCK and ROON, both provided by you. So, understandably, I was a little upset over the situation.
I’ve replaced ROCK with Windows 10 since then.

I totally get it, believe me. I’m not trying to tell you how to do things. I also naturally, am trying to find the root cause, so that the final software is 100% wonderful (it is 95% - 98% right now :smile: ).

All I can, and am trying to do, is to provide you folks with enough information to try and zero in on the root cause.

Please forgive me my forward way of speaking, it is that I’m trying to make ROON perfect, is all. In a fairly limited way :smile:

Best regards,
Michael

Cool. I’ll check in with them and see how it’s going.

Thank you so much, Sir!
Please find the original topic below:

That’s why I love you guys so much!

Thank you!
Michael

Thank you for all your patience!
I love ROON so much, and want to enjoy music with the great sound quality and fantastic ease of use you guys provide!

Thank you again!

Michael

Hey, @brian et al - I wanted to check in and ask what the current best practices are for setting up a Roon server to handle an abusively large library (640,000 tracks and growing). They may not have changed since the recommendations earlier in this thread, but I thought I should ask fresh before ordering hardware.

My home Roon setup (with a moderate 40k tracks in 3100 albums) remains snappy running on an Ubuntu-based server (Haswell-era Xeon, music in a local ZFS pool). But the library at the work radio station, the result of years of collective scrounging, now runs over a half-million tracks and… Roon often gets sluggish.

There was a significant speedup somewhere a few releases into Roon v1.3 - thanks to whoever did that work, unless it came mostly from inherited Mono improvements - such that searches no longer hang for minutes at a time, but now usually just seconds. But… I’m wondering if better optimization of the hardware (and if absolutely necessary, OS) environment would offer noticeable further improvement.

The current station RoonServer instance is running under an Ubuntu LTS on a machine with a single SATA-interfaced SSD and an Ivy Bridge-era Xeon, with the track storage CIFS-mounted from a NAS. Clearly, there are multiple places for improvement there, but I’d love some guidance about what to prioritize.

I plan to build a machine for this with internal spinning drives for the music store, just to reduce network dependencies (and RoonServer seems to notice tracks added to the tree more reliably when the storage is local). The NAS will still be the master music repository, but I’ll rsync changes into the RoonServer machine as necessary.

It sounds as if high-end desktop CPUs are favored over server ones (which seem to lag a generation behind the desktop releases). When choosing CPUs, how would these characteristics rate in order of importance?

  • maximum single-threaded speed
  • overall multi-threaded throughput
  • number of available threads
  • number of available distinct CPU cores
  • amount of on-chip cache

Have any of the new AMD CPUs been outperforming Intel when running RoonServer?

I’m assuming that an SSD with a faster interface than SATA would be in order for the Roon database.

Would it also be useful to direct the Roon logs to a separate drive?

As for the OS for this to run on… I have a strong preference for something Linux-based (for maintainability, stability, and ease of setting up file synchronization); but if you-all believe that Windows and native .NET still have an edge over Linux and Mono for this size library (and that said advantage is likely to remain for at least a year or two), I’ll bite the bullet and build a damned Win10 Pro machine.

If something Linux-based might be near parity with Windows in performance - is ROCK flexible enough to set up in this expected shape, or would a general-purpose Linux distribution work better?

Is there any advantage to more than 16GB or so or RAM? I figure once I start researching motherboards, I’ll aim for a configuration which fills all the parallel banks.

And… what have I forgotten to ask?

Thanks!

2 Likes

Maximum single-threaded speed in the core is the main determinant in user experience snappiness.

Multiple cores helps with running more zones in parallel with more DSP and will complete stuff like audio analysis faster. I wouldn’t go beneath 4 cores/8 threads for this use case. You could do more, but added value will diminish depending on how much you value those aspects.

I understand the preference for Linux (and wouldn’t want to run Windows if I could avoid it), but in your shoes I’d do an A-B test and come to a personal understanding of what the differences are before making up my mind. It costs nothing but a few hours to install Windows without activating and learn the situation.

Here’s my feeling: Despite ongoing improvements to mono and more and more code from Microsoft.NET being merged in, Microsoft’s garbage collector is still better at handling the massive in-memory object count that comes with a library of that size. For most libraries the gap is negligible–there’s just some design choices in that GC that start to become more painful around 4-5mm objects on the heap, and really large music libraries can push things that high.

I don’t think Microsoft’s GC is ever going to make it into Mono. I think instead they’re going to keep making .NET Core better until Mono is displaced. At some point they will reach a point where we can switch to .NET Core. I have a hard time imagining Microsoft doing that and us being able to start that effort until a least a year from now, but it could be more depending on whether .NET Core 3.0 is actually viable or we need to wait another iteration.

In other words: if you didn’t have a strong preference for Linux, Windows/Microsoft.NET is the safer recommendation at this unusual scale. Since you do, it may be worth the extra few hours to try it both ways and see, just in case the Linux performance on a fast machine is good enough and you can avoid the Windows headache.

As for other hardware choices:

  • High-End Desktop vs Server CPU: High-End Desktop. Especially now that there are Threadrippers and i9’s, there’s no reason to buy a Server CPU for something like this unless you need Server motherboard features like redundant power, remote admin, etc. 4 Cores/8 threads is probably fine. You could go up to 6-8 cores especially if you see yourself running more zones/dsp.

  • Intel vs AMD: We test, develop, and ship hardware based on Intel, so there’s some passive bias. That said, AMD might get you more performance for the same $. I have a very, very fast AMD machine here (built for batch processing/machine learning) that runs Roon very well. I wouldn’t worry about it too much.

  • NVMe SSD is a good idea. Larger sizes tend to be faster, too up to a point. Samsung 960 Pro is very good.

  • Definitely store the music on local (USB3 or SATA) drives and stop watching the NAS. This will help more than you think.

  • For 640k tracks I’d consider going to 32GB RAM. Even if Roon doesn’t use it all, you’ll benefit from extra filesystem caching + more breathing room.

  • If you wanted to try ROCK, NUC7i7DHNE is the best NUC right now. You can hang USB drives off of it and it will support the storage. It can take an NVMe SSD and 32GB of RAM. So it could work.

  • If you want to build an even bigger machine, run Ubuntu or Windows. Getting a shell on ROCK is more difficult if you want to do sysadmin stuff like setting up cronjobs, rsync, etc. So that may push you in other directions.

That covered what I can think about right now. Any more questions/clarifications, let me know. I’d like this build to be a success for you.

18 Likes

Thank you very much! That was a thorough answer, delivered admirably quickly.

If I’m bothering to do this upgrade, I expect I’ll go ahead and build it into a box which can fit the spinning disks internally so they can be connected by SATA rather than USB3. I associate USB interfaces with high overhead even if USB3 offers high bandwidth; although maybe that’s a prejudice left over from an earlier age.

Oh, what was the end of the thought which began “Samsung has a good…”?

Also, if I’m bothering to do this upgrade… I might as well actually hear your advice to try Windows. I have Win10 Pro N media I can bust out, and I’ve already been through the exercise of learning where to turn off some of the most egregious unnecessary cruft. If I’m to survive such an exercise without cursing so much that I burn my desk to ashes, I’ll have to find a good Unix-flavored tool set, especially for SSH and file copying. I hear this rumor that Microsoft is actually supporting some Linux applications with a compatibility library of their own… if that actually works, and I don’t have to install Cygwin, maybe this could be less terrible than usual.

And I’ll have to keep my ear to the ground for a particular combination of Intel-CPU motherboard and NVMe SSD models which are known to work well together, since I think I’ve heard about some incompatibility nightmares in the field.

I would think it was going to proceed along the lines of … track record or history of stable performance and reliability. :smiley:

I was going to call out the 960 Pro as a quality NVMe SSD (edited above to fix)

I’ve never run into a compatibility problem with an NVMe SSD, and have installed several at this point on both Intel + AMD–they’re simple machines. Just PCIe on an alternate connector.

I don’t think USB3 is a real negative for media storage other than the additional boxes/cables. Maybe some background stuff you barely pay attention to will go <5% faster? That’s about all I’d ever expect. USB3 is fast enough that the drive should be the bottleneck. Of course if you’re using a larger case/motherboard and not a NUC, go SATA.

I haven’t played with Microsoft’s Linux support much, but it looks like it might work now that they’ve solved the filesystem bridging stuff. Another option would be to use Docker for Windows + expose the media drive to a docker container as a volume. Cygwin works…it is just slow and kind of annoying.

1 Like

Hi Brian,
that is an intriguing comment. My music is split between USB drives and a NAS. Is this an issue only for those with very large libraries or does it affect everyone regardless of library size?

I hate NAS’s for music storage. I know that some people like them/need them, and we do support them, but I wouldn’t use one for Roon (or any software trying to manage 50-100k+ music files) for myself, regardless of library size.

They don’t support real-time watching for file changes very well, scanning them over the network takes 10-20x (or more) as long as a local disk. Because they don’t support filesystem watching very well, you pretty much have to scan the whole folder tree periodically to avoid missing changes.

Also, because networking is in the mix, there’s a whole litany of extra broken states they can get into, ways they can confuse the OS or the software, and weird behaviors that they can exhibit. Performance varies greatly from product to product, and sometimes the performance can be so bad that it causes major behavioral problems.

On some networks, or with some NAS’s, the connection to the filesystem bounces up and down several times a day, or more often, triggering Roon to re-scan the folder tree too many times.

With a large library, sometimes you can end up with Roon spending a decent fraction of the time scanning over the NAS for changes because the connection is bouncing up and down or just because it takes so long to walk the folder tree that the periodic scan every few hours (frequency is configurable) turns into Roon doing work a serious fraction of the time just to keep tabs on your files.

I keep my music on a USB drive hanging off of a ROCK-based NUC. It’s something I never have to worry about, and I like it that way.

I do use a NAS for a backup copy/archive of the music, and for some other stuff like video streaming where the much lower file count makes most of the disadvantages disappear.

15 Likes

Thanks Brian, the team Roon hatred of all things NAS is fairly well known. I am surprised that you support Roon core running on a NAS under the circumstances but I suppose that removes some of the network related issues with scanning. Now to search for that thread which states how big a spinning disc I can get in the NUC…sure it used to be 2TB but might be 4TB by now?

withdrawn…

With a 500K track library you are almost certainly into the multiple 12TB spinning drive scenario… I an out space at 12TB drive for a measly 200K library. This has meant back to NAS as my windows based i7-7700 fanless chassis will only support 1 x 3.5" drive … and it was a noisy drive too…so I am looking at another option perhaps raid 0 based external USB3 or splitting my music over 2 volumes. My NAS is 6 x 6TB raid 5 or another 2 x 12TB JBOD that back up each other

Hi Tony

It depends on the physical size of the drive, not the capacity.
The drive can only be not higher than 7 mm, so most (if not all) drives with more than 2 TB are too high to fit in the NUC :frowning_face:

Thanks but 70mm? Are you sure, sounds massive, the NUC is about that tall itself! thought the limits was more like 9mm or so? I have the 7i7BNH which is quite slim.

Sorry, you are right. I meant 7mm and I changed it in the posting above :flushed: