INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Experiences Running MC in Oracle Virtual Machine  (Read 722 times)

Bass.Cleffer

  • Guest
Experiences Running MC in Oracle Virtual Machine
« on: March 08, 2023, 10:43:29 am »

After tinkering with MC 30.0.66 (64-bit, audio only) in my Windows 10 installation (with typical office productivity software and Windows background services), I discovered that MC requires more control and resources than my normal workstation allows. Therefore, I experienced unpredictable freezes and crashes with MC.  Needless to say, it became frustrating. 

When MC was working on my workstation, the sound stream was superb. My library deploys R128 loudness correction from MC Audio Analysis, and I use room correction DSP with my studio monitors. Since the sound quality of MC is so much better than other music apps I've used, I really wanted to use it as everyday audio playback software on my office workstation.

After researching MC performance topics on the Interact Forum, I found recurring recommendations to run MC on its own dedicated computer (i.e., alone), with any other applications running on another (physical) computer. This made sense to me, but since I routinely use Oracle Virtual Box on Windows 10 Pro to operate VMs, I decided to instead setup a Windows 11 Pro VM as a "bare bones" computer. I wanted to experiment how Virtual Box would run MC 30.0.66 in a Windows 64-bit VM.

I created a fresh library backup on the host computer, then installed MC on the Windows 11 Pro VM and "restored" my backup library to the new installation on a bare bones Windows VM. My audio files reside on an old NAS connected (and mapped/shared) with a WiFi6ax network supporting all the PCs on my local network.  As such, my audio files are accessible by each physical (or virtual) computer on my network using shared mapping of files from the NAS.

I didn't know what to expect, but I discovered that MC works fine in a Windows 11 VM (although subject to some minor limitations). While all the normal features of MC worked properly, the out-of-the box VM doesn't (presently) have 24/32-bit audio. The audio drivers of my main workstation support 24/32-bit, 384 KHz sound streams, but the simple "built-in" audio driver of the Oracle Virtual Box application is limited to 16-bit, 44.1 KHz. Oracle's VMs are designed to be a functional, universal test machine, but they're not designed to support playback of studio quality audio files.

Although I wouldn't use a 16-bit, 44.1 KHz sound stream with a DAW to support studio mixes, for high-quality playback of  background music while working (or for ordinary casual listening), CD quality music sounds great. I've setup two (2) additional VMs running MC in other rooms, and found the sound quality of music running three (3) VMs simultaneously playing different soundtracks works fine. I didn't know what to expect, but found there were no unexpected clicks or distortion in the music.

Has anyone else experimented with running MC in Oracle Virtual Box VMs, and if so, what are your experiences and recommendations? I would be interested in hearing about the experiences of others. Thanks.
Logged

Bass.Cleffer

  • Guest
Re: Experiences Running MC in Oracle Virtual Machine
« Reply #1 on: March 08, 2023, 12:05:55 pm »

Some Screen Shot Captures of MC Running in Oracle Virtual Box (using WIN 11 64-bit VM)
Logged

eve

  • Citizen of the Universe
  • *****
  • Posts: 651
Re: Experiences Running MC in Oracle Virtual Machine
« Reply #2 on: March 08, 2023, 12:45:07 pm »

I run my MC server inside a container and I'm decently pleased with it.
I have run MC on virtualized systems for playback but they're setup a little differently (VMs with GPUs actually passed through).
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71439
  • Where did I put my teeth?
Re: Experiences Running MC in Oracle Virtual Machine
« Reply #3 on: March 08, 2023, 12:51:38 pm »

It sounds like you've got a solution you like, but I want to respond to a couple of things you've said.

After tinkering with MC 30.0.66 (64-bit, audio only) in my Windows 10 installation (with typical office productivity software and Windows background services), I discovered that MC requires more control and resources than my normal workstation allows. Therefore, I experienced unpredictable freezes and crashes with MC.   
It would be good to know what you mean, but common problems that can cause crashes or freezes include (in this order):

Antivirus software -- Use Windows Defender only and use the thread on Taming on this board.
Drivers -- Latest is not always best.
Bad files -- Try starting with something simple by importing only ordinary stereo FLAC, then add more complexity when you know it's working.
VST -- Some 64 bit versions of VST don't work.  Using the 32 bit version of MC sometimes works if you use the 32 bit version of VST.

MC also does a lot of work when you first load it, importing, analyzing, etc.

But you should not have trouble with Windows unless the machine is old or low powered, etc.

Quote
After researching MC performance topics on the Interact Forum, I found recurring recommendations to run MC on its own dedicated computer (i.e., alone), with any other applications running on another (physical) computer.
While MC is perfectly good in a client / server mode (Media Network), it isn't inherently better.  I know I've seen people claim that separating the processes can result in better sound, it's bogus.

Quote
[NAS]
I didn't know what to expect, but I discovered that MC works fine in a Windows 11 VM (although subject to some minor limitations). While all the normal features of MC worked properly, the out-of-the box VM doesn't (presently) have 24/32-bit audio.
NAS and VM also have their own issues, but should work. 

Quote
I've setup two (2) additional VMs running MC in other rooms, and found the sound quality of music running three (3) VMs simultaneously playing different soundtracks works fine. I didn't know what to expect, but found there were no unexpected clicks or distortion in the music.
One ordinary server should be able to support lots of clients.
Logged

eve

  • Citizen of the Universe
  • *****
  • Posts: 651
Re: Experiences Running MC in Oracle Virtual Machine
« Reply #4 on: March 08, 2023, 01:03:51 pm »

But you should not have trouble with Windows unless the machine is old or low powered, etc.
This is sort of what I was curious about. He's more than capable of getting acceptable performance out of a VM running MC but can't on his (presumably) host workstation which just does office stuff?
Something seems unclear here.
I often have MC on in the background playing video with a performance focused JRVR preset, while I do extremely intensive content creation work and it's rarely if ever a conflict. It's nice to toss a window up with a tv series while I work away.
Logged

Bass.Cleffer

  • Guest
Re: Experiences Running MC in Oracle Virtual Machine
« Reply #5 on: March 08, 2023, 03:08:52 pm »

Hi JM and Eve,

Nice to meet both of you.

My main workstation (Intel i9 @ 4.8GHz, 16-cores, 64 GB RAM, SOTA) is a complete development platform that does quite a few things. It's actually quite stable for everything that it does. However, to be safe, my standard practice is to perform system backups twice a day, which allows me quickly restore and recover from any inevitable crashes that can occur when testing or developing new software or data structures 😉.

Anyway, I need to keep my main workstation running to be productive. Since the workstation is pretty busy with maybe 20% CPU and 33% memory utilization most of the time, trying to run MC Server on the same workstation, (with the same threading and the same Windows services) is somewhat risky. 

I've tried it, but simple navigation around Media Center (especially when moving between setup screens, display screens and tag screens) can cause "too much competition" of PC resources (even when they're ample).  Inevitably, I'll eventually get the "Media Center 30 is not responding" Windows Error Flag (see attached), after which, the "latch state" (or freeze) of Media Center 30 becomes non-recoverable. I'm forced to "Close the Program" to recover from such freezes. Perhaps others have experienced such situations as well.

With modern stability of Windows 10, only the MC 30 application freezes, while everything else running on my workstation remains fully functional. I can even relaunch MC30 after freeze and exit, and it seems to operate normally (although I refrain from doing this). There's always a possibilty that some "misplaced bits" can reside in memory and cause other functional problems.

To resolve MC's intense competition for system resources, I decided to completely sandbox MC into an isolated  VM. This seemed better than putting another computer on my desktop, since I have no more room 😉. Doing it this way, the isolated VM has no anti-virus, no anti-malware, no contant heuristics analysis of unknown software, no constant file integrity checks, etc. to interfere with the operation of MC. 

However, I can run all these services on the host PC (which I need for system security), yet run MC separately in an "isolated sandbox" as "barebones," to eliminate any resource competition with my host PC.  At least this is my thinking based on my knowledge of VMs. Basically, I'm trying to kill all the birds with one stone (i.e., run a single workstation) that allows me to meet BOTH the "system requirements" of my workstation, while committing dedicated (bare bones) resources to MC (no anti-virus, no other apps, etc.).  It all happens inside the case of a single computer that's acting like multiple (separate, isolated) computers. It's amazing technology that anyone can use (Oracle Virtual Box is free software).

I'm not really using MC "as a server" per se (since my media files are actually "served" by my Synology NAS). Instead I'm using MC "mainly" as a high-resolution music player which has great DSP features (I need to use "room correction" with my studio monitors to accurately hear the soundstages and mixes. While I use VST and VST3 plug-ins with Reaper's DAW (and they work fine), I don't use any VST plugins with MC beyond its built-in DSP tools.

Due to the multiple ways that I use my media files, they must be shared amongst all my other audio player/library management applications. Each of these audio player/labrary management applications maintain their own libraries, which are separate (with differently formatted databases) from the way MC creates its database. 

I use various tools to test, scrub and properly tag all my files. It's a sizable collection of files. MC does a great job of isolating its library tags from the embedded tags in my media files (like album art, embedded lyrics, and all the standard ID3 tags already in place). So my actual media files are "reusable" between numerous media library management applications (since each maintains its own, unique database). It might seem like this would never work, but I've configured it in such a way that it does. Everything usually works together without much difficulty. 

I'm able to simulataneously read (serve) media files from the NAS into multiple independent streams, several of which can be MC, MediaMonkey, MusicBee, foobar2000 (Windows), Reaper, as well as remote streaming over the web to my iPhones (so I can listen in my cars or when visiting with friends or family). [I'm not trying to manage video files (which simplifies my use case)]. For a DLNA server from NAS, I rely (exclusively) upon dBpoweramp's Asset UPnP; it has proven the most stable and reliable UPnP server for my use-case. I only use it to test playback of music on my iPhone using the foobar2000 iPhone app.

Now that my initial test-bed for Windows VM is pretty well established, I'd like to move onto testing MC in Linux VMs on my Windows host. Due to the lower resource demands and higher stability of Linux, it seems that running the Linux flavor of MC will be even less resource intensive in Oracle Virtual Box than the Windows flavor of MC.

It may allow almost anyone (with even a modest Windows PC) to run a Linux VM for MC on a Windows host (i.e., all within the same box). This could help minimize possible "resource contention" on a host PC, which may cause application freezes of MC. It seems this could help some folks who may be experiencing such freezes when trying to deploy MC on their systems. 

I'll continue exploring this to see where it might take us. It's an interesting application of Oracle Virtual Box.   



Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71439
  • Where did I put my teeth?
Re: Experiences Running MC in Oracle Virtual Machine
« Reply #6 on: March 08, 2023, 03:45:43 pm »

The NAS may be the culprit.  MC is file intensive, especially in the beginning.  NAS drives can often cause slowdowns.  Example:  https://yabb.jriver.com/interact/index.php/topic,123896.msg857817.html#msg857817

Playing lossless audio now, my laptop on battery power is using 0.3% CPU and 72 MB of memory.  I never notice any load when I'm doing anything else.  It's generally a light use of resources.  Something is different for you.

Did you import files from the NAS?  Or are you using a DLNA / UPnP server on the NAS?

I realize you've found another solution, but I'm concerned that you had trouble on a Windows machine.

And ... antivirus?
Logged

eve

  • Citizen of the Universe
  • *****
  • Posts: 651
Re: Experiences Running MC in Oracle Virtual Machine
« Reply #7 on: March 08, 2023, 04:42:06 pm »

It does seem strange, there's very little load associated with just playing back some music in the background.

At least for my development, I sort of work the opposite way to you. I have a virtualization server and I just spin up environments on it to work from. I keep clean images for various OSes / tasks and thus, can better target a platform or work in an environment where I'm not wondering if some random dependency I installed months ago or a modification I've made is going to cause issues. I also run a number of smaller systems for when I need bare metal access to hardware (this audio networking nonsense really does prefer having direct access to a NIC)
Logged

Bass.Cleffer

  • Guest
Re: Experiences Running MC in Oracle Virtual Machine
« Reply #8 on: March 08, 2023, 07:38:49 pm »

Hello Again,

I haven't (pre)imported any files from the NAS to the host machine (or the VM). The tagged files always reside on the NAS, streaming directly from the NAS over a WiFI6ax connection. The connection provides a downlink speed of 2042 Mbps and uplink speed of 1633 Mbps (see attached screen capture). This is typical of my normal WiFi6ax speed between the NAS (downstairs) and my office (upstairs); the devices are perhaps 80 feet apart and separated by hardwood flooring. The WiFi6ax connection provides strong and reliable 5GHz signal covering my entire house (in my neighborhood, 2.4 GHz WiFi is unusable).

The NAS operates as a simple "file server" over the LAN or WAN. The databases created by scanning the tagged music files on the NAS (i.e., MP3 or FLAC) with any media player software (MC, MusicBee, MediaMonkey, or foobar2000) each create a "pointer index" to the actual files on the NAS. When any music file is selected from the selected media player database, it immediately points to the right location on the NAS and instantly retrieves the file for playback. 

Translating WiFi6ax bandwidth to file transfer speed, it equates to about 130 MB/s. It's approimately the same transfer speed over WiFi6ax as a USB-3 drive attached directly to the host PC. I obtain fast file transfers between the NAS, the Host PC and the Virtual Machine (i.e., it's a passthrough connection to my LAN). The main thing slowing down file transfers is the gigabit ethernet connecting the NAS, WiFi router and network switch together. I've considered upgrading to a newer NAS or to multigig ethernet connections, but it probably wouldn't make much difference in the perceived speed of music player apps. They all cache databases from a fast, local SSD.

The MP3 and FLAC files are served by the NAS, the decoded files directly play from memory (per MC30's settings), then the signal chain goes through MC30's DSP (for volume leveling, recording studio emulator, and room correction (unique to MC). Room Correction is what makes MC sound great on my studio speakers, as it expands the soundstage perception and tightly controls the bass boominess.

The resources consumed by MC30 on either the host PC (see attached image) or the VM (see attached image) are about the same (i.e., 0.1% CPU utilization and 200-300 MB memory). The main difference between MC30 operating on the host machine and the VM, is there's lots of concurrent activity on the host while there's very little on the VM. So MC30 has much less competition for resources on the VM compared to the host computer; the things that may cause issues for MC30 (i.e., Norton Security, endless Windows services, etc.) do not exist on the VM while they (must necessarily) exist on the host PC for security and operational reasons. 

I hypothesize (from tests and observations) that when MC jumps from a setting module (like changing DSP parameters), to a file library selection module (picking a song to play from a different folder, which reloads, decodes and resides in memory), to changing a display module (like going from album art to lyrics in display) each causes an "impulse demand" of resources. If the resources are busy at that moment (and MC doesn't get a response or acknowledgement within an expected time window), it may cause MC to freeze. It's situational, related to instantaneous timings and resource availability.

Since the background resource load in the VM is considerably less than on my main workstation, it's quite unlikely that any "impulse demand" of resources will be problematic and cause MC30 to freeze. While I get MC30 freezes on my main workstation (because it's so busy and runs applications that I cannot suspend or remove), I don't get similar freezes on the VM installation of MC30. Therefore, using an Oracle Virtual Box Windows 11 VM for MC30 is like running a separate PC in the same box. It solves the stability problem I've experienced in a novel way.  However, my installation and use of resources is somewhat unique. Anyway, using an Oracle Virtual Box VM works for me to eliminate freezing of MC30, and perhaps it could be a solution for others.

With Oracle Virtual Box, I can also use a Linux VM rather than a Windows VM to run MC30 on my Windows 10 host. Since a Linux VM should require even fewer resources than a Windows 10/11 VM, it seems that MC30 should run even smoother and faster under a Linux VM. The only downside of running MC30 in an Oracle Virtual Box VM is the audio driver only provides 16-bit, 44.1 KHz sampling. While adequate for CD-quality sound on a good system, it isn't adequate for creating a studio mix in Reaper 64-bit or another DAW.  This isn't a problem for my use case, however, since I mainly want to use MC30 as music player (with it's great "room correction" DSP) to closely listen to the soundstage of my mixes. 

When I get a chance to tinker with Linux VMs, I'll provide a further update. I need to get back on task with my "regular job" 😉. Thanks for your interest in my project, the great comments, and the thoughtful suggestions. Much appreciated.

Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71439
  • Where did I put my teeth?
Re: Experiences Running MC in Oracle Virtual Machine
« Reply #9 on: March 08, 2023, 08:21:39 pm »

Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71439
  • Where did I put my teeth?
Re: Experiences Running MC in Oracle Virtual Machine
« Reply #10 on: March 09, 2023, 05:48:28 am »

Turn off memory playback for testing.

Antivirus?
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7395
  • The color of Spring...
Re: Experiences Running MC in Oracle Virtual Machine
« Reply #11 on: March 09, 2023, 05:59:37 am »

It could be because you're using it in a virtual machine. In my own experience VirtualBox, especially with Windows 11, isn't that good of an experience compared to VMware or even Hyper-V.

Do the same issues occur if you run them "bare metal" without virtualization?
Logged
I don't work for JRiver... I help keep the forums safe from Viagra and other sources of sketchy pharmaceuticals.

Windows 11 2023 Update (23H2) 64-bit + Ubuntu 24.04 LTS Noble Numbat 64-bit | Windows 11 2023 Update (23H2) 64-bit (Intel N305 Fanless NUC 16GB RAM/256GB NVMe SSD)
JRiver Media Center 32 (Windows + Linux) | iFi ZEN DAC 3 | Edifier R2000DB Bookshelf Speakers | Audio-Technica ATH-M50x Headphones

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10721
Re: Experiences Running MC in Oracle Virtual Machine
« Reply #12 on: March 09, 2023, 06:47:16 am »

If you are running VirtualBox on Windows 11, you should look into turning off "Memory integrity" in the "Core Isolation" settings in Windows, as having that on will force Windows itself to run under Hyper-V and messes with VirtualBox.
Note that this is a security feature and you should be sure thats what you want to do.
Logged
~ nevcairiel
~ Author of LAV Filters
Pages: [1]   Go Up