A Roon on (Synology) NAS Primer

A Roon on (Synology) NAS Primer

Introduction

Over the past couple of years that I have been participating in these forums, I’ve discovered that there might be a benefit to a comprehensive overview of what makes Roon on NAS an especially compelling way of running Roon. I’ve written a lot about this notion in several disconnected forum posts here over the years, but I’ve been thinking about putting it all together in one place for a while.

I realize, however, that I don’t represent every sort of Roon user, because I use no streaming services. So caveat emptor: I can’t speak to everyone’s experience.

Here’s how I describe my musical collecting approach:

  • I’m 55 years old as of the date of this post;
  • Vinyl was a thing to me for the first 15 years of my life;
  • Since 1983, I became sold on the benefits of digital music. I still have the first CDs I bought that year;
  • After 40 years of digital music collecting, I have amassed a highly curated collection of 45,000 tracks (not all of which I have listened to yet!);
  • I am meticulous with my music metadata, meaning that I have appropriate album artwork of the highest resolution and quality I can find for each track/album in my collection; I have ensured that all track/album/artist information is correct; I have a proper release year for each track (not album) in my collection, which I find incredibly useful when creating smart playlists that reference music on compilations like greatest hits, soundtracks, etc.;
  • My preferred music delivery mechanism prior to Roon was Synology DS Audio and Audio Station, which use all of that metadata to great effect, including for remote playback. (I dabbled with an Auralic Altair and Lightning DS for a couple of years, but it was quite unreliable for me);
  • As I stated before, I use no streaming services. I buy all of my music in one form or another. I discover new music mostly by reading (and I read this and this, if nothing else, each week.) I evaluate samples on the iTunes Store, Bandcamp or YouTube before buying.

Here is my current system (as of the date of this post):

Roon Core Machine:

  • Synology DS1522+ running DSM 7.2.1-69057 (I don’t recommend anything less than a 4-bay “Plus” series, which means a DS923+ would be my minimum recommendation today; these, and higher, are the only units that can really provide meaningful SHR 2 performance, and that have sufficient high-speed Ethernet capability)
  • 16GB RAM (using the official Synology ECC expansion module)
  • Four 2 TB Drives (Western Digital WD20EFRX-68EUZNO) in an SHR 2 configuration. This provides not only two entire drives worth of redundancy; it increases throughput and helps ensure data integrity (see below for more on that last bit)
  • Internal 2.5" SSD (SanDisk SDSSDH3 250G) for Roon DB in 5th slot
  • 2 ethernet adapters bonded into a single LACP (IEEE 802.3ad) 2 Gbps connection (This is optional. It is one of those “because I can,” and not one of those “because I need to” sorts of things; see below for more on the networking requirements)
  • Running Roon on NAS for DSM 7 as well as Synology Audio Station
  • Using FFmpeg “git master” build from John Van Sickle unpacked and installed on my SSD’s RoonOnNAS > bin directory. This is principally to ensure complete AAC support since Synology’s removal of built-in AAC support in 2023, but it provides the latest codecs for other other audio formats as well. I extract the entire git master build into this bin folder, and ensure that the permissions in ffmpeg and ffprobe are “755” (owner has read, write execute; group has read and execute; all others have read and execute.). You can check that Roon is using this version by looking at the RoonOnNAS.log.txt for a line that looks like "ffmpeg: /var/packages/RoonServer/shares/{RoonDatabaseVolumeName}/RoonOnNAS/bin/ffmpeg". If it instead points to something like /bin/ffmpeg, it is not using the John Van Sickle version, and you need to check the permissions of your self-installed version. Visit Roon on Synology NAS will no longer play AAC files to see this in action.
  • I have security warnings configured via both email and Synology DS Finder iOS push notifications
  • All music is stored in the standard Synology “Music” shared folder, in a few subdirectories, with a few idiosyncrasies:
    • All Classical is in a “Classical” folder, with subfolders;
    • All Non-Classical is in a “Non-Classical” folder, with subdirectories;
    • Most Christmas music is in a “Christmas” folder, although there are a couple of other areas where Christmas music is in other main directories, and within those, the music is always in its own Christmas sub-directories. Within each Christmas folder, classical “Choral” Christmas music is in a “_Choral” subdirectory to help me distinguish it from vernacular/popular Christmas music;
    • Odd Non-musical content (audiophile tests, nature sounds, sound effects, etc.) are in a “Sounds” folder;
    • Within all the above, music is in the standard Artist → Album → Tracks folder hierarchy;
    • Synology non-smart playlists are stored in the usual “playlists” directory.

Networking Gear & Setup Details:

  • Motorola MB7621 cable modem;
  • pfSense 23.0.5.1 running on a Protectli 4-port Vault, running pfBlocker NG firewall; Suricata IDS/IPS; Dynamic DNS; etc. All household devices have DHCP reservations (“static mapping”). I am not running a VPN. My Roon box communicates with the outer world via standard port forwarding. Suricata monitors for port scanning and shuts off scanning hosts when port scanning is detected;
  • Cisco Catalyst 2960G core switch; note that, although this is a fairly old switch (and I have a cold spare!), it is a high-end enterprise device that supports true IEEE 802.3ad link aggregation. You will need at least a modern business class “managed” switch to support this if you choose to, and it requires some time to properly configure on the switch end as well as the NAS end.
  • All 1 Gbps certified CAT6 cabling;
  • Wireless is 2x Netgear WAX218, connected to the 2960G.

Connected Audio Devices:

  • Primary 1: Ethernet-connected RoPieee (using this configuration that includes a screen) connected via USB to an RME ADI-2 DAC, connected via XLR to McIntosh MA8900;
  • Primary 2: Ethernet-connected Windows 10 Pro machine connected via USB to DA2 module of McIntosh MA8900;
  • Several Apple AirPlay 2 endpoints connected to my lesser-magnitude systems (a secondary stereo in the basement as well as a few small self-powered speaker systems around the house).

Number of Tracks in Library:

  • Approx. 45,000, all local, totaling 2.1 TB. (Update, July 2024: Approx 52,000, all local, totaling 2.3 TB)

How and Why All This Works So Well

Dual working solutions: When you have Synology Audio Station alongside Roon, you have an alternative, very capable and mature alternative playback platform for all of your music (and one that doesn’t require an active Internet connection!!). If your music is well-tagged, it’s a compelling offering.

No Internet required: Synology Audio Station does not require an Internet connection to operate within your home, so you will always have a solution for those few times your ISP is having problems.

Better playlists: Audio Station allows you to create smart playlists using smart rules in a manner that Roon is not capable of, using rules that can take things like paths and track dates into account. While those playlists don’t directly translate to Roon, you can export those smart playlists to static .m3u playlists (which go into that playlists directory mentioned above), and Roon will scan them, ingest them, and show them in its own playlist list. As an example, I can make a smart playlist for all tracks from, say, 1980-1985, and it will pull individual tracks from greatest hits collections and other compilations, etc. I can also create a playlist of popular Christmas standards (sans classical choral tracks) because of the structure I outlined above. Roon stinks at all things like this on its own.

For what it’s worth, I maintain all of my playlists in Audio Station, so that they are consistent in Audio Station, DS Audio, Roon, and ARC. In Roon, I do use some tags and have several bookmarks for things; I think of Roon bookmarks as reasonable alternatives to smart playlists in other music software. But as noted above, they are powerless to deal with track dates and paths.

As you may surmise, since I have meticulously groomed my file metadata over my 40+ years of digital music collecting, Audio Station & DS Audio do most everything that Roon does, sans the editorial content (which is the main reason I use Roon).

Backup remote listening: As of the date of this post (October, 2023), some people have reported ARC to be unreliable. Apart from issues I have when leaving my home’s WiFi (traveling through a black hole of cell service when I leave) I have no issues running ARC through my configuration; my core never crashes or has the sorts of problems people have reported.

That said, it’s always nice to have a Plan B, and you can run Synology’s mature, reliable DS Audio app on your mobile device to get functionality similar to ARC; it also has nice CarPlay support. This gives you two remote playback options, which is nice to have if ARC has issues for you.

High-speed networking: Since all Synology “Plus” series devices have more than one Ethernet port, if you have a managed switch, you can link-aggregate the two 1 Gbps connections for an effective 2 (or 4) Gbps worth of network bandwidth to your house and the multiple people who might be listening to music from it. More recent devices, like my 1522+, also offer a 10 Gbps option via an add-in module…but you need a switch and network that can take advantage of that.

The music is with the server: A key benefit of having one’s music stored on the same server as Roon as opposed to a NUC running Roon connected to a NAS is that the network link between a NUC and a NAS unit will be a big bottleneck. The core scanning music from the NUC across the network connection will be a fraction of the speed of running Roon on the NAS itself, where the bottleneck is the disk-to-RAM interface.

This is why most people running Roon ROCK generally have the storage directly-attached, and merely backup to a NAS.

Durability and preventing bit-rot: Running backups in the manner described above is questionable because, in my working philosophy, your most durable storage should be your canonical storage, not merely your backup storage. What do I mean? Well, a very real potential issue with the two-part ROCK/NAS setup is that, when you treat your directly-attached storage — rather than the NAS data — as the canonical source for your music, you must realize that this storage is not as durable as some of the most valuable forms of storage that a NAS can provide. On a Synology device where you run Synology Hybrid RAID level 2 (SHR 2), you get two full drives of redundancy for your files (that is, you can lose two out of four hard drives and still have all of your music). This is equivalent to RAID 6, but is designed for better reliability given Synology’s use of BTRFS, which otherwise has issues with pure RAID 6.

In this scenario, since there are multiple parity checks of each bit of your music collection, the underlying RAID system can be used to periodically “correct” any insidious data corruption via the process of data scrubbing, helping ensure the bit perfectness that so many people here otherwise obsess about in the transmission chain. Frankly, I am not as concerned about transmission chain bit perfectness (which is generally transient and infrequent) as I am permanent bit perfectness, which is dubious if data is sitting for decades on a simple single hard drive.

Unless you like the idea of restoring from backups once in a while — which I have NEVER had to do, in almost 15 years of using a well-set-up NAS — this solution is simply more seamless and long-term reliable. A single-disc backup drive is far more likely to see data corruption than a multi-disc NAS. Backups should be there for emergencies, not for restoring mistakes in your primary storage.

Hence the notion that running Roon On NAS — if you can swing it, with a proper level of RAID — as one of the highest forms of ensuring bit-perfectness and long term music collection integrity that should be a priority for almost any audiophile. As I get older, I don’t want to worry about a future where my music slowly starts getting corrupted and I have to re-rip or re-buy my music…

Now, if people chose to use their NAS in this way as a primary source, and copy FROM the NAS to their direct-attached storage, I’d say that’s a sound strategy. But it sure sounds like a pain in the you-know-what to me…

I will add that it is possible to achieve a similar end through the use of Roon Core on a traditional operating system that supports RAID 6 as well. I just don’t see a lot of people doing that around here.

About Docker

Running Roon in Docker on a NAS is at least slightly more resource-intensive than running natively using Roon On NAS, because you are running Roon inside of an environment that consumes its own additional resources. Some people feel that Docker has absolutely no overhead, but that is not, ahem, absolutely true. Docker’s impact is somewhat dependent on what you are running within it. I see many people doing this around here because they claim to have issues running Roon on NAS. I think if you run into problems using Roon on NAS, you’re better off working hard to solve them rather than wasting the precious resources of your NAS.

That said, if you want to run Roon in Docker on your Synology NAS after all, I can’t recommend @gTunes’ thread on it highly enough.

Getting Roon’s Library to Update Automatically

Whenever I add music to my NAS, after I’ve done whatever I want to do to modify my Audio Station playlists, I go into Roon > Settings > Storage and perform a “Force Rescan” on my library. I don’t mind doing this at all. For me, on a cold restart of Roon, the longest it takes for Roon to scan the 263,000 files in the music directories on my NAS (45,000 of which are audio tracks; many of the rest are files DSM uses for indexing) is 32 seconds. Once the machine is primed, it only takes 8 seconds to scan all of these files for new music.

That said, people who use Roon on other platforms don’t have to do this. Why? Well, because Synology’s underlying Linux inotify configuration puts a limit on how many files the OS will actively monitor. This is because larger inotify values consume more system resources, and Synology’s out-of-the box configuration is on the conservative side.

@gTunes provides an excellent set of instructions on how to do that if you wish. @AAron_Turner has a nice post with an alternative method down below. While I don’t personally employ this change, @gTunes’ advice is good for anyone who prefers the convenience of Roon’s standard behavior, and who doesn’t mind consuming a few more system resources. I think it’s valuable for people who add a lot of music every day/all day and don’t want to perform rescans manually.

Are SSDs really Required for the Roon Database?

When I first ran Roon on NAS on a Synology DS 918+, the speed difference between spinning disks and SSD seemed negligible. Anecdotally, the SSD was perhaps 10 percent faster. Perhaps this was because my NASs always run SHR 2 , which has its own performance advantages. It cost so little to move to the SSD, however, that I decided I wasn’t going to risk having support issues, making it a no-brainer decision.

How Did You Use the SSD for the Database When You Had a 4-Port NAS?

Most Synology NAS units have an eSATA port, which is a teeny bit faster than USB 3. I found the following two products to be more than adequate for an external SSD solution to host your Roon database:

SanDisk Ultra 3D NAND 250GB Internal SSD - SATA III 6 Gb/s

Vantec 2.5" SATA 6Gb/s to USB 3.0/eSATA HDD Enclosure, Black Color

When I moved from the DS918+ to the 1522+, I simply removed the SanDisk drive from the Vantec enclosure and put it in the 5th drive bay of the 1522+. You do need to copy the data off of the drive before relocating it, because you will need to create a second storage pool in DSM for that drive, which requires reformatting. You can copy the old data back on after that process is complete.

Which models will work?

You need a model with an Intel-compatible CPU. The easiest way to know if Roon on NAS will work is to focus on the NAS series checked in the following diagram. Most Synology models with an Intel compatible chip have “plus” or “+” in the series, although the non-plus XS models will work as well. The checked series themselves are all compatible:

image

Can You Use the M.2 Cache Slot for Your Roon Database?

Synology officially supports using the M.2 cache slots for storage pools only in certain models (8 at the time of this writing):

Series Models
23-series DS1823xs+, DS923+, DS723+, DS423+
22-series1 DS1522+
21-series1 DS1821+, DS1621xs+, DS1621+

Is RAM Important?

Yes. The DS918+ was able to support 8 GB of RAM, and it worked well. I have 16 GB in my 1522+ (and I bought the supported Synology ECC RAM for this, which is expensive, but reliable.)

Overlooked caveat: M2 caches don’t make a meaningful difference for Roon on NAS. Spend time on your main storage, and get a good SSD for the database, and that will give you the bang for the buck that you need.

What About the Processing Power of the NAS?

There is something I call “The Great Roon Processing Power Misconception,” and it doesn’t serve everyone well. When running Roon using the processor in my DS918+ in the years prior to my 1522+ (including, occasionally, DSP and multi-zone), I encountered absolutely no issues whatsoever. Typical CPU usage for me while listening to Roon is 0-3%. Roon’s interface was consistently fast and fluid, and everything played quickly and flawlessly. FWIW, 99% of my music collection is lossless, and 10% of it is higher-than-CD bitrates.

Music processing doesn’t require gobs of horsepower the way video processing does. I remember the first time I ever heard a computer play PCM audio, and that was a 5-second sample of “Kung Fu Fighting” played on a Commodore 64 back in the 80s. That was a machine with an 8-bit 1MHz processor.

Plus, Roon isn’t the DAC; it’s just shuttling data to the DAC…and I know it’s doing it bit-perfectly, because I own an RME ADI-2 DAC that has the ability to test for bit-perfectness with special files.

For reference, the Ryzen processor in the 1522+ is way more than perfectly adequate for Roon. It’s probably even overkill, at least for my needs, and they are not entirely lightweight needs.

What About Backups?

I run daily backups of the music content and Roon database to an external USB 3-connected drive. I do monthly off-site backups as well on a second USB 3-connected drive. All of this is done without complexity or drama using Synology Hyper Backup.

Final Benefit

My DS918+ motherboard died recently. After 5+ years of heavy round-the-clock operation, I was planning on a replacement anyway. The upgrade to the DS1522+ took less than an hour and a half…I simply moved the drives to the new unit, powered it up, and it was ready for the next steps of moving the old SSD inside. Roon and Audio Station worked 100%, right away. This was an incredible experience. I got a new iPhone 15 Pro the same day, and it took longer to upgrade from a 13 Pro than it did to do the NAS upgrade.

Conclusion

Roon Labs occasionally appears less than thrilled about the idea of running Roon on NAS, claiming that these systems’ processing power might be less than ideal; that said, despite popular misconception, they do in fact support the notion of running Roon on a NAS. I think people’s misconception is driven more from projection than from daily experience; I suppose that Roon doesn’t have time to formally test Roon on NAS (since they don’t develop the outer package), so they disclaim it, to a degree, to reduce support requests. I have found Roon on NAS creator Christopher Rieke (@crieke) to be outstanding in his attention to detail, and worthy of donations.

Finally, you can probably tell that I am a Synology guy, and not a QNAP guy. That’s because I have found Synology’s attention to support, and its focus on security, to be superior. Would I love their hardware to be a little more powerful for the price point? Well…who wouldn’t? But Synology’s support is incredible — even years after you buy a NAS, you can open a support ticket from their app and get good answers, without payment.

So, while most of this should apply to a QNAP NAS, I can’t vouch for that from first-hand experience. Perhaps someone can follow up here in the comments with advice that pertains to QNAP.

I hope folks find this information useful. I suspect that, if you can swing it, Roon on Synology NAS provides the best experience possible of any form of Roon installation. I hope Roon Labs take the time to read this, and that they begin to believe this, too!

55 Likes

This is a fantastic write up. You put a very serious amount of time into this and I hope it’s a resource and reference for people looking for a long time to come.

I have a bit of an issue with the characterization of Docker as being comparable to VMs. Docker containers are typically much closer to native performance than to VMs. They don’t boot a full OS, have dedicated CPUs, or run within a hypervisor. I’ve run Roon in Docker on Synology and my personal assessment is that if the NAS is powerful enough (CPU, memory, storage including SSD and/or fast disks that don’t spin down, …) to run the Roon package, then it’s powerful enough to run Roon in Docker… In the big picture, though, I think you’re right that most people should run the package.

You mention HyperBackup but you don’t mention using any of the cloud-based backup options. I’ve used HyperBackup to Azure, AWS and, most recently, to Synology’s own C2 service. I had reasons to go from AWS to Azure and then from Azure to C2. I’m quite happy with C2. It’s priced competitively and, compared to to AWS and Azure, it is far, far easier to use. I don’t take physical devices offsite - I’ve tried doing that in the past and I’ve just never been able to do it reliably. Like you, I have layers of redundancy on the NAS itself, but I like the fact that everything is backed up nightly to the cloud.

Thank you again for writing this up - it’s a pretty epic thing you did!

3 Likes

Nice write up. However the processor in the 1522+ is a dual core mobile spec Ryzen 1600 which has a much slower single thread capability than the minimum recommended i3. So a little caution advised.

1 Like

I think this is part of what I call “The Great Roon Processing Power Misconception,” and it doesn’t serve everyone well. I’d been running Roon using a much lesser processor in my DS918+ for the prior couple of years (including, occasionally, DSP and multi-zone) with absolutely no issues whatsoever. Roon’s interface was consistently fast and fluid, and everything played quickly and flawlessly. FWIW, 99% of my music collection is lossless, and 10% of it is higher-than-CD bitrates.

Music processing doesn’t require gobs of horsepower the way video processing does. I remember the first time I ever heard a computer play PCM audio, and that was a 5-second sample of “Kung Fu Fighting” played on a Commodore 64 back in the 80s. That was a machine with an 8-bit 1MHz processor.

The Ryzen in the 1522+ is way more than perfectly adequate for Roon. It’s probably even overkill, at least for my needs, and they are not entirely lightweight needs. I’m sharing this with everyone as a first-hand experience.

(Note, after writing this, I decided that it would be good to copy to my original post.)

5 Likes

@gTunes — thank you so much for your appreciation of this!

To your two questions:

  1. I concur that Docker is quite lightweight compared to, say, VMware, Xen, Parallels, etc. It’s just that, as you have no doubt seen, so many people are obsessed with squeezing out every bit of power from their NASs that I think it’s generally a waste. I think you said it well: most people should run the package if they can.

  2. There are a handful of reasons. One of them is a sort of pride in not paying any monthly fees for my music hobby. That may sound strange given how much I spend on music and everything else, but it is what it is. I just enjoy knowing that I don’t owe anybody anything to enjoy my hobby. If I want to stop buying music (I try, I really do, I try!) I can do that and just exist the way I am now with no additional expenditures.

The other reason is that I live in a semi-rural area with relatively slow Internet access; I have only 10Mbps upload speeds. Any initial uploading of 2.1 TB would take over three weeks, and that is assuming I can trust that the upload went perfectly, and uninterrupted (and not use my connection for anything else!).

I hope that addresses your two excellent questions. Thanks again for your understanding and appreciation!

2 Likes

One person’s opinion is valid to that person. But when the writers of the software have an opinion and recommendation, I know which one I’ll follow.

3 Likes

Nice write-up :+1:

I’ve been using Roon for 5 months. Running in Docker on a Synology RS1221+ with 20GB RAM. With 8 drive bays I have the luxury of having Roon run on a set of mirrored SSD’s for a little more redundancy.

I agree with your view on processing power. The CPU of recent Synology Plus series NAS devices is probably sufficient for users. Admittedly I only stream to 2 or 3 (grouped) zones as a time and have very limited MUSE/DSP use. Running Roon on an entry-level NAS is likely to cause more issues, especially if one is running additional services on the NAS.

In my experience Docker does not introduce any performance issues. It does on the other hand offer the additional advantage of being able to expose the Roon server in a dedicated VLAN without exposing other services of the NAS to that VLAN. This allows me to have a separated VLAN/subnet for Roon, the Roon extensions and all my endpoints.

1 Like

Interesting. Can you elaborate a bit either here or via private message?

I do the same thing you’re describing with a dedicated music vlan (and, I assume) a similar set of firewall routing rules to support control devices like phones and computers on a “main” vlan. I ended up moving to a NUC/ROCK setup because I couldn’t figure out how to get the Docker container on the NAS to bind to the music network.

I have the same Synology as you (and RS1221+). I’ll guess that you also have UniFi gear but that’s not really important. Did you dedicate a NIC on the NAS to the music vlan and then figure out how to get a Docker network to bind to it?

I’m interested in your Docker compose (if that’s relevant) or the and whatever you did to get the rest working (not the vlan stuff, just the stuff on the NAS).

@DDPS - I’ll say again that I really appreciate you writing this up. A couple of years ago, I wrote the walkthrough for setting up Roon in a Docker container on Synology (now out of date with the introduction of Container Manager). This forum is a mixed bag but these sorts of posts are, to me, examples of the forum at its best. Thanks again for writing it up.

1 Like

I have two QNAP NAS, each with their own Roon Core, license and library (30,000 tracks). I have one TVS-672XT with an i3 core, 8GB RAM, 500GB M.2 Cache and 6TB in the bays. The second NAS is a TVS-h784 with an i7 core, 32GB RAM, 1TB M.2 Cache and 6TB in the bays. Roon rarely gives me troubles and any troubles that arise have always been due to networking issues, cycle power, reboot the Core NAS, reboot the Ethernet switch, reboot the router, reboot the modem, reboot everything, move the Core NAS Ethernet from the switch to the router, etc. For me, Roon On NAS has been a great experience. I chose the NAS route over the Nucleus route because I was not sure Roon would be around in the future. I did not want to purchase a Nucleus and then be stuck with a boat anchor if Roon was no longer. At least with a NAS, I could repurpose the NAS for whatever I needed. I do not understand why people have so much trouble with Roon On NAS, because my Roon On NAS works great. As long as you follow the guidelines and stay equal to or above the minimum hardware criteria for Roon On NAS, you will be fine. I am 62 years old and I researched everything before committing. I have two QNAP NAS with Roon On NAS and their performance is exceptional. If I can do it, you can too!

1 Like

A few months ago I added some info in this post.
If you have any questions, feel free to reach out via a private message. Note that it may take me a couple of days to get back to you though.

FWIW, I’m indeed running a Unifi network.

1 Like

Update: I added a paragraph denoting the fact that I maintain all of my playlists in Audio Station…

Here’s a bit of extra detail that I thought I should add to this thread, but I thought it might be too much to add to the original post:

When Synology Audio Station encodes some “high byte” characters during playlist additions, it uses characters that Roon doesn’t like.

These characters are, in hex encoding:

\0xF025
\0xF020
\0xF029
\0xF028
\0xF022

I try to look for any odd characters when ripping music with dBpoweramp, but I forget or overlook them or they may be invisible, and I have a process where I occasionally review the directories and files in my collection for them. I use the following format after ssh’ing into my Synology server…the “boxes” represent the actual high-byte characters listed above, in order; I am not sure if this forum system will maintain them, but this is a literal copy and paste from the text file I have these saved commands in:

cd /volume1/music/

find . -type d -name '**' | grep -v eaDir
find . -type f -name '**' | grep -v eaDir

find . -type d -name '**' | grep -v eaDir
find . -type f -name '**' | grep -v eaDir

find . -type d -name '**' | grep -v eaDir
find . -type f -name '**' | grep -v eaDir

find . -type d -name '**' | grep -v eaDir
find . -type f -name '**' | grep -v eaDir

find . -type d -name '**' | grep -v eaDir
find . -type f -name '**' | grep -v eaDir

NOTE: Each line is entered separately to produce results; the “groups” I have are only there to show the search for each of the five characters in directories, then files. The very first command will take a little longer than the others, as the system builds an in-memory cache that is reused for the subsequent commands.

These commands will list the offending files (-type f) or directories (-type d), and then you will fix them manually using your preferred renaming methods. Any playlists referencing these encoded characters will need to be updated accordingly as well.

If anyone believes this should be in my original post, please let me know!

EDIT: I copied and pasted the above into my text editor, and it looks like these commands are saved, intact, in this post! :slight_smile:

Good write up. A few things I’d add:

  1. Docker containers on Linux are not a “virtual machine”. This is a common misconception, but it’s just utilizing something called “Linux namespaces”. Basically what this means is that the overhead of using a Docker container on Linux is basically 0.
  2. I’ve been running Roon on my DS1621+ for over a year and I have had some stability issues which appear to be Roon related. TL;DR: the solution is to add user-defined “boot-up” script in Task Scheduler:

/sbin/sysctl -n -w fs.inotify.max_user_watches=65535

What this does is increase the maximum number of file change notifications to 64K. In my conversation with Roon support, it seems like Roon can use a very large number of these file notifications, but Synology for some reason defaults to a relatively small value. My other Linux boxes default to a much higher value like this.

If you want to check your value, run the command: /sbin/sysctl fs.inotify.max_user_watches

3 Likes

Some form of @Aaron_Turner’s recommendation would be smart to add to your Primer, @DDPS. He’s absolutely right about the issue.

I’m not sure about his specific approach, though. sysctl isn’t actually in my bin directory so his command isn’t going to work on my device. There also used to be a timing issue which would cause any changes made at boot up time to be vulnerable to Synology overwriting them. Because of these issues, my startup task runs this as root:

sh -c '(sleep 90 && echo 204800 > /proc/sys/fs/inotify/max_user_watches)&'

This command waits 90 seconds and then directly writes the desired value to /proc/sys/fs/inotify/max_user_watches. If I’m right about sysctl not being installed by default and/or the timing issue, this might be a better approach.

@Aaron_Turner is there a chance you manually installed sysctl?

2 Likes

Thanks to inout from @gTunes and @Aaron_Turner, I’ve made a few further edits to my original post that I hope are helpful.

sorry, it should of been /sbin/sysctl. Should be part of the stock Synology install.

2 Likes

Thanks for the correction. It’s there - anyone more familiar with Linux than I am probably would have just known that :slight_smile:

I’m curious if you’ve played with this enough to feel confident that the value you set with your approach isn’t being overwritten by some other startup event. Do you thin the 90 second delay built into what I’ve been doing for years is no longer necessary?

Other than that, our approaches are functionally equivalent.

I can just say I’ve run the command to check what the current value is and it matches what I set in my scheduled task. I never found any reason to do any kind of delay, but also I have a sample set of 1. If you’re really worried, you can just run the job every minute or hour without concern.

If you look at the Task I shared above, you’ll see that it has a 90 second delay built into it. This originally came from the Syncthing Forum where people were having issues setting the value and having it get over written. If you’re not having an issue, there’s nothing to worry about. I’ll just stick with what I’ve got since it’s been working for a long time.

I have a bit of an aggravating addition to this thread. I have an almost identical setup to the OP - DS1522+, with 5 Synology-approved NAS-grade drives from Toshiba setup as a single SHR volume with multiple separate shares on it, bonded dual gigabit ethernet connections, dual 400 GB read/write m.2 SSD cache, though so far I’ve stuck with the stock 8 GB RAM. Installing Roon Core was easy, and it deals with my library just fine (currently reporting 62,688 tracks, mostly ALAC ripped from CDs). With this size of library, the Roon Core uses up about 47% of my NAS’s RAM. In total, with everything else that’s running on it, it’s averaging about 60% RAM usage, and it’s not really hitting swap. Here’s the aggravation I encountered:
-When running the Roon Core software on my M1 Max MacBook Pro, from a library that was being shared over wifi from another computer, it streamed fine to my Bluesound Node N130, to the computer’s own audio devices, to my iPhone, to my Sonos speakers, etc., all over WiFi. However, it was in line-of-sight to my main router.
-Moving to the DS1522+, some tracks would play, but most wouldn’t. I would get messages along the lines of “Too many failures. Stopping playback.” Occasionally it would say that the file was loading too slowly. This was my clue. For reasons I don’t quite understand, everything played just fine via Roon ARC.
-I was on a previously high-end Orbi WiFi 6 AX4200 system. The DiskStation is plugged into my satellite. I don’t have a physical location where I could reasonably setup the NAS in the same room as the main router. Just to test it, I plugged the Bluesound Node into ethernet, and that had no effect.
-I just picked up a new TOTL ($1700) WiFi 7 Orbi system, and now, frustratingly, that completely resolved all of the issues I was experiencing. As far as I’m aware, the old setup was registering about a 600 mbps link between the router and the satellite, but now it’s several gigabits, and is able to use 4 different bands simultaneously. Something along those lines appears to be required if you want to have your core connected via a WiFi satellite.