Tuesday, March 03, 2015

Transitioning to Mac Mini for Plex


My decision to move from the Windows7 computer I was using to host my Plex server was driven by the instability of this particular computer (which has been an issue since I bought it, not of Plex). I wanted something that would be a smaller footprint, as the Win7 computer I was using was a laptop. Though it has a 1 tb drive, all of the media is stored on a Synology NAS, so the replacement didn't need to be anything with vast storage, but for purposes of transcoding (where necessary), did need to have a good processor and enough RAM.

I'd been waiting for Apple to announce their updating of the Mac Mini. I was really disappointed with their 2014 offering, as it seems they are really trying to show a clear differentiation between the Mini (as a low end product) and the iMacs. The new machines came only with an i5 and no upgradeable RAM. Apple RAM is expensive, so in the case of the new Minis, you have to order what you want when you buy, as the Mini has soldered RAM (no user upgrade). I decided to evaluate a reconditioned 2012 model, hoping there would be some availability with the launch of the new line.

I hadn't shopped for a reconditioned Mini, so I was surprised to learn when I went to look, there were none. Sigh. So, I set up a change detection search to look for me. I finally found some coming into the Apple store. I found a 2012 reconditioned i7 quad core Mini Server (2 x 1tb drives), with 4 gig RAM. I bought it (quickly, they seem to go fast), then later would evaluate the need to upgrade the RAM. I didn't really need the server version, as I already had the Synology. I may use the server app for some related purposes in the future, but right now, it primarily serves as my Plex server.

Apple setup is trivial, and I hoped that the Plex setup would be just as easy. Installing the Plex server itself was easy, and of course I had to change the port forwarding in the router to point to the new computer's IP address. Then I ran into my initial problem of mapping the drives on the Synology to the server on Plex and (since the Mini is so power efficient), finding a way not to have the Mini go to sleep (keeping my libraries accessible). In Windows, I had simply created mapped drives (M=Music, P=Photos, V=Video) and set up credentials for the Windows7 computer to be able to access the Synology. It always worked just fine once i got the credentials set up, but setting up drive mapping on the Mini and keeping it awake were something I hadn't thought about up until now.

I found people on the Plex Mac forum had similar concerns when it came to keeping the Mini awake. I settled on Caffeine. It seems to be working fine for me.

But not being all that familiar with users and mapping under OSX, mapping was a bigger unknown to me. I created users on the Mini for each of the drives and had them automatically login when the Mini started (using the Login items under System preferences). Once I figured that out,  everything seemed to work fine, though I have one intermittent problem, with one segment of my media library. Periodically, when playing something in my Music collection, Plex will seemingly start to play the song, but no music is played. This goes on for a few seconds, then it skips down to the next song, etc., but nothing is actually ever played.  Not particularly useful.

The first time this happened, I deleted the entry in Plex's library for Music (which was a mistake, as I'll explain). And re-added it. However, doing so means that Plex has to go out an reindex and match all of the media in the music library and add all of the album art. Oops. A reasonable number of my music tracks then had no artist or album art. Ok, manually go out and look for the album art and fix all of these.  Of course all of the music is then shown as "recently added", moving any of the other media types waaay down the list, since I had ~19,000 tracks in my collection at the time.

Then, it happened again.

I read through the forum and opened a post in the 'Ask a Ninja'  to look at the issue. Needed to upload a server log. This is way more help than I expected, since this is all volunteer work, helping others. The "Ninja" had a couple of suggestions, but I think the one I implemented that actually made the difference was to log back into the music folder on the Synology from the Mac Mini (on which the Plex server runs). Doing so suddenly fixes the issue with the music not playing. Don't even need to restart the Plex server! It's happened a couple of times since then, but since I haven't figured out why, the easy solution is just to log back into that remote folder (the Mini is connected to the network via ethernet, as is the Synology), and problem solved (for a while). The only other issue I've had is that even though the Plex port is forwarded to the (fixed IP) ethernet connection of the Mini, if WiFi is somehow turned off, Plex isn't accessible outside the house. This is still something to which I have not found a solution, and obviously I cannot forward the same port to two different IP addresses. So I just leave WiFi on.

I used the Activity Monitor to see how much RAM was being used with little more than the normal system processes and Plex, and was surprised to see it already using a swap file at this point, so I decided it was necessary to do a RAM upgrade. Prior to buying the Mini, I explored YouTube for a video on upgrading the Mini's memory (there are a couple of good videos). It seemed pretty simple. I bought the RAM from Crucial, upgrading from 4 gig to 16 gig (meaning that you have to replace the existing 4 gig RAM), after using their process (System Advisor or Scanner) to ensure I bought the correct RAM for my server. Cost was about $165.

The only problem I had was managing to get the bottom plate of the Mini to unscrew (twist off) so I could access the memory slots. It just didn't want to unscrew, but finally, did. There's nothing to upgrading the memory once you've done this, popping the existing RAM modules out and putting in the new. Fingers crossed, we'll hope there's no issue with rebooting...

All in, I spent about $1k on the Mac Mini and the memory upgrade. Add in the Synology (1513+) server and (baring any upgrades there), I've invested a total of about $3k in hardware.

No problems on reboot though, so now my little Mini is happily (and reliably) serving up my media. I only wish my Internet connection weren't so unreliable. But that's an issue I hope to address later this spring. But doing so, will mean reconfiguring the router. It's always something...



No comments: