My experiences with Rock and a 500k+ tracks library

I bought the latest i7 nuc with 16 gig ram and 120 gig m2 ssd.
Installation was flawless.
Connection of Rock to my various Nas was without problems.
All went well.
The scanning process of my var NAS was the point where the problems started.
My Database is extensive. Over 500k tracks.
Rock came up with a total of 340 k tracks after the first scan.
Various scans later the max reached was some 390k recognized tracks compared to the Win 10 pro i7 6700 installation, which gives the exact number of over 500k
That process took some days to get completed with Rock.
Now I bought a second m2 ssd for the Nuc and installed win10 with the latest roon headless version.
The scan went flawless and I am up to the right number of tracks as in my main win installation.
All working perfect.
My conclusion: Rock atm is not up to the task of handling my data.
I keep the m2 ssd with Rock and check with new versions.

happy summer to everybody.

Thats a really big collection of tracks. When did you start gathering and purchasing them? And did you ever check what you spent so far…
There was a topic a while ago, where it was stated that roon works for larg music collections best on windows. (vs mac, aka a unix system)

I started 2005 or 2006. I bought the whole Linn collection to start with at that time.
That collection was sold on a Nas already.
Roon gives order and structure. No other software can do that.
Rock needs maybe some time. The win version works flawless.

1 Like

Now you tell me! Whilst my collection is nowhere near that it has started me thinking ; what are ROCK’s limits in this respect and how do you actually count track numbers? I can easily count files but these include cover art etc so the number of tracks could easily be 10% lower and not so easy to find.

Could you link to the topic please?

Nope, I will not.
I go on vacation and turn on a Pc in 3 month again.
Happy summer.

1 Like

Ok thank you for your ‘help’…

Cheers will check it out.

A fascinating thread that is nearly a year old though. Anyone from Roon care to comment on what improvements have been made to the Linux/ROCK build in this performance area?
Before choosing ROCK I had already discounted OSX due to the many issues people seem to have with it with Roon. So ROCK or WIN10 it was. Thankfully ROCK was released towards the end of my free trial so the decision was made for me (WIN 10 is still rather update heavy and I could do without that for something that should just be an appliance).

EDIT 4/2018: this post was written in June of 2017, and since then, we’ve made a number of optimazations to Roon. The number that was previously stated as 300k is probably closer to 550k now.

First, some context

It’s important to clarify: libraries of this size are extremely exceptional, and will always require special care. The group of people with 300k+ track libraries represents a small handful of people amongst our user base.

Off the shelf solutions simply do not apply for people in this situation. For people with huge libraries, we have always recommended the same thing: Get the fastest consumer-grade i7 you can, at least 4 cores, 16GB of RAM, a 256GB+ NVMe SSD, a big fan to cool the thing, a nice closet to put it in, and a locally connected storage array for the content, and then run Windows 10.

For the rest of us who don’t have extreme libraries…

Consumer operating systems like Windows, OS X, and most popular Linux distributions do not create the best headless appliance experience. They have frequent software updates–some of which can’t be skipped. They upgrade packages one at a time–which creates a risk of unintended breakage. They have a HUGE footprint of unnecessary stuff consuming resources on disk, in RAM, and running in the background. This makes them good general purpose OS’s, but not the best for a media server appliance.

This is why we created ROCK. It doesn’t contain extra junk unrelated to the task at hand. It is not general purpose. It doesn’t have a package manager upgrading packages all the time, and it doesn’t run a bunch of stuff in the background–just the minimum needed to fully experience Roon. When ROCK is updated, the whole OS is updated atomically and in a “brick-proof” manner, just as appliances should be updated.

ROCK is very different than what you’d get if you started with a full-sized operating system like Ubuntu, Debian, Fedora, OS X, or Windows Server and tried to trim it down as much as possible without breaking it. The total installed size of ROCK is under 70 megabytes, including the kernel, root filesystem, and drivers. This is a small percentage of the minimum size of an OS X, Windows Server, or Ubuntu install. I think 70MB is actually smaller than the Windows Kernel alone :stuck_out_tongue:

By starting clean, and avoiding all of that extra stuff in the first place, we can create an appliance-style experience, make things smoother, snappier, more trouble-free, and easier to test and support.

ROCK, Roon, and mono

The Roon Core–on all non-windows platforms–utilizes the mono runtime, just as it does on other Linux (and OS X) platforms. Mono is shipped as part of Roon, not as part of ROCK, and ROCK uses the same Roon packages as any other Linux user is using.

When it comes to library management at extreme library sizes, the limitations that people encounter primarily result from mono’s performance characteristics, not Roon’s (or ROCK’s).

The thread I wrote above goes into a lot more detail, but I’ll quote the most relevant part:

.NET was created by Microsoft, so it should not be a surprise that the best performing implementation of .NET is currently available on Windows.

For non-windows platforms, we use a community-developed .NET implementation called mono. This is a mature and stable project that’s been around nearly as long as .NET has. For almost its entire life it’s been stewarded by various businesses associated with the project’s founder, including Ximian, Novell, Xamarin, and as of recently Microsoft.

Yes, Microsoft. Microsoft acquired the company that stewards the mono project recently, with the expressed intent of leveraging mono’s technology in order to directly support .NET on all platforms. So the prospects for .NET on Mac, Linux, Android, and iOS are looking pretty bright.

Today, mono is good enough that virtually all of our users don’t have to care about what platform they run on. Looking towards the future, there is almost certainly going to be convergence between Microsoft and Mono’s offering, because they are now being funded and developed under one roof.

Unfortunately, when a Roon library gets up into the several-hundred-thousand-tracks range, it pushes mono’s memory management infrastructure so hard that bad behavior starts to result. Symptoms might include laggy screen loading, slow focuses/searches, audio dropouts, or other stuff like that. When the framework gets messed up like this it is literally standing in the way of the code we need to run to get things done.

A catalyst for this problem is the richness of Roon’s data model–500,000 tracks means we’re also keeping track of 50,000 albums, 750,000 performers, 20 million credits, and so on. Compared to most other music apps, we manage at least 10x more data–so we are starting from a more difficult position.

Both mono and Roon have gotten a bit faster since I wrote that, but mono is still not yet on par with Microsoft’s .NET runtime when it comes to the extreme memory management scenarios that arise when managing the largest libraries.

Be careful trying to generalize these ideas…

Some of you, after reading that, are taking away the idea that “Windows performs better”. When it comes to managing extreme library sizes there’s definitely situations where it does, but in other areas, the same reasoning doesn’t hold.

We see better performance/stability out of the Linux scheduler than we do on Windows. Code related to DSP or communication with audio devices is generally a lot simpler and bit faster–both because the compilers we use on Linux seem to do a better job at optimizing our audio processing code, and because the audio subsystem on Linux is more streamlined and simpler. Unlike with library management, these areas of the system do not make such heavy use of .NET/mono, so they are not subject to mono’s performance characteristics.

On top of that, ROCK adds an extra layer of benefits. First and foremost, the benefit of having a very small root filesystem, RAM footprint, and set of background processes/components. This creates a very quiet operating environment, where Roon has no worries about outside interference, or competing for system resources with other stuff–It’s difficult to get near this point when starting with a general purpose OS, even after heavy trimming.

In short, ROCK remains our first choice for all but the most extreme library sizes–the ones that are so large that they would require careful hardware/platform choices regardless of the circumstances.

In Closing…

It’s unfortunate that this a handful of people with extreme library sizes aren’t able to fully benefit from ROCK, but the experiences of these outliers should not necessarily inform the decision making of the rest of us. Their situations are unique enough that special handling is required regardless.

On all platforms, there is a point where increasing the library size to the extreme results in performance degradation. On mono-based platforms–OS X, ROCK, other Linuxes–that tipping point comes a little bit earlier. The work to close this performance gap is happening as part of the mono project–not as part of ROCK or Roon. As mono gets better over time, the gap will shrink, and the “tipping point” will continue to increase.

But–if you’re on the right side of that tipping point–and most people are–we believe that ROCK is the better choice.


Thanks Brian, very informative as always.

Seems things are never as simple as many people want to make them.

A post was merged into an existing topic: ROCK and network security

Thanks for the insights @brian. How has Mono evolved these days? Has MS done some improvements?

Yeah, there has been steady improvement over the last couple of years, but the garbage collector still starts to turn into a bottleneck in some of these extreme scenarios.


Any plans on using native decoders (supplied by the OS) ?
In particular, ALAC is rather buggy, to the point it makes the entire OS unstable.
The tracks are fine, they would play fine beforehand, play fine after that (that - is an OS reboot).
Appears to me some memory corruption issue somewhere.

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.


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,

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!