eGPUs and my MacBook Pro 🥔 tato
So, for a while now, I've been thinking of upgrading, I bought a MacBook Pro way back in 2016. I use it for almost everything and though I have become fond of it, faults and all, It's showing its age and has some issues I'd like to fix. So, in this article I'll be looking at experiments I did with an eGPU enclosure, comparing it against a new PC. I'll be looking at rendering performance in a couple of my most used applications which are Blender and Davinci Resolve.
So, what's wrong with my macbook exactly?
Issue # 1 - Limited RAM
The model I got has only 8GB of RAM, which I can't change, the RAM is soldered to the motherboard (maybe I could try to upgrade it with the right chips and a soldering iron, but I fear the Apple Kraken awakening if I do). This is bad for a lot of the stuff I'd like to do. For example, video editing or modelling/animation in Blender. So why mention this if I can't fix it?
Mostly because there are shiny new Macs coming out now, with bold claims on superior performance, but still, they are shipping with just 8GB of RAM. This is disappointing, looking at how my current machine struggles. I predict exactly the same bottleneck happening with the new M1 based macs.
For me upgrading to a new Mac isn't an option unless the base model has significantly more RAM. If you're wondering why RAM is important, have a look at our video on it to get an idea for why it matters in Blender.
Issue # 2 - no GPU
The most important limitation for me is that there's no GPU. So everything must be done on the CPU. The CPU in this machine is an intel i5-5257U CPU @ 2.70GHz. It has two cores; four threads. Its rather good at turning electricity into heat, and average at computing. Being fair, this CPU came out over seven years ago, so trying to run the latest applications isn't all that wonderful or a fair test against a newer machine, save to see how much better modern hardware is.
Issue # 3 - Storage is pretty pathetic for what I actually need
The amount of data building up on my system is out of control! Rendering out videos, downloading assets or offloading footage creates TBs of data very easily. Storage in a Mac is pretty expensive per GB too if you look at the options. I'm going to cover storage issues in another article, though.
All these factors mean that I can't really be productive, probably should have bought a PC maybe? Anyway, this can't go on, I need to upgrade!
In this article I am going to consider; A. buying a new PC; and B. using an eGPU with the MacBook. The PC is a Ryzen 9 3950X based system, with 32GB of 3200Mhz RAM. I provide the full specs later on, lets just say its fairly capable to run the GPU we're using which is a Radeon RX5700XT 8GB card from Aorus.
And by the way, thanks a bunch to Mwave Australia for providing us with all the gear used in this article! Including the PC we used for the tests in this article (you can see the build video here, perfect if you like watching software guys pretend they know how to build a computer!). Their support made this and many other things we do here at Crowdrender possible. Go check out their website for all your PC and accessory needs if you're in Australia or New Zealand :)
Right, lets look at the gear we're working with!
Razor Core X eGPU Enclosure
So what is a Razor Core X eGPU enclosure then? Basically its a box that takes a GPU card, and lets you connect it to a computer via cable. This particular one uses intel's thunderbolt technology to do that. There are more and more devices (not just Apple ones) that support thunderbolt these days, so you might want to check your devices to see if you've got one. Obviously if you don't this whole article is only going to have curiosity value, ah well.
The Razor Core X has a 300W power supply and one thunderbolt 3 port for connecting to your computer. Inside, It has two eight pin power connectors and a single PCIe x 16 slot for your GPU. Its also got cooling fans and a nice slide in/out caddy for the internals.
Swapping the GPU card in/out is tool-less and fast. It's also pretty sturdy with an all metal construction, which is good if you put it on the floor and have a tendency to kick things under your desk.
Getting it Setup
For MacBook owners, if you have thunderbolt 3 ports, then this is supposed to just work with MacOS High Sierra or later, however, Big Sur might not work, though some folks seem to be able to make it happen on this thread.
It's also speculation at this point whether M1 macs will support eGPUs, currently they do not. Another reason to wait and see before buying an Apple Silicon based mac as you might find yourself not able to add extra compute power to it later on, or multiple display support, or RAM, or etc.
If you are on a windows device, adding an eGPU might be easier. We're going to test this for sure in another article. You can check this list of compatible laptops in the meantime.
I have a thunderbolt 2 based mac, which doesn't support eGPUs out of the box. I had to use third party tools to get the eGPU enclosure to work. Thankfully this wasn't terrible. There's a great site supporting eGPU users of all OS platforms, head on over to https://egpu.io to learn more as they'll more than likely have you covered.
I used the purge-wrangler.sh script from their software page to get my mac to work with the eGPU. This took very little time, and only a little bit of command line work.
There is a requirement to disable system integrity protection and secure boot. This is all easy to follow with fairly well guided steps. You'll want to familiarise yourself with the risks before doing all this.
Plugging in the eGPU for the first time caused the MacBook to crash, however, this was easily circumvented by following the instructions for not hot plugging the eGPU during the script's "Setup eGPU" step. Easy enough and I was up and running surprisingly quickly.
The Tests and Results
The first test was to find out how much faster Blender could render. Here's where I hit the first problem (to Mac computers anyway). Apple, it seems decided to get rid of support for OpenCL a while back, and as a result, Blender no longer supports OpenCL on macOS, so cycles can't detect your AMD cards. Trying with an Nvidia card also doesn't work for reasons best known to Apple and Nvidia. The web drivers on MacOS seem to 'work' but the card won't show up in either Blender or Resolve.
Thankfully for our tests, we can use Radeon ProRender, which does work on macOS. So the first test was a benchmark cooked up specifically for this problem (you can see a screenshot of a render from this file below).
ProRender is a different engine to cycles though, and, different enough so that Blender's benchmarks don't really render properly, which is why we built our own benchmark file. It was a fun afternoon figuring all this out.
So was it faster? Of course it was! The RX5700XT was way faster.
The difference in render times is night and day! Really should have upgraded a long time ago! The eGPU lets my MacBook now render in almost 1/10th the time! Seeing this for the first time was really cool, I felt like I might actually be able to use Blender for more than just testing our network rendering addon (a slight plug there, hope you don't mind!).
Though, looking at the results above, there was something a bit concerning, the PC we used, with exactly the same card, was in some runs, nearly half the render time, and in every case it was always faster by a noticeable margin. What gives? I did sort of expect the card to be slightly faster, being plugged into the PCIe slot in the PC and all. But I wasn't sure by how much. Now I was wondering if the eGPU was bottlenecking the GPU somehow.
So I did more tests, a lot more actually, here's what I found.
As you can see, when installed in the eGPU enclosure and connected to my MacBook, the GPU runs slower consistently. On average the RX 5700XT is about 35% faster when installed directly into a PC's motherboard than in the eGPU. I wondered what might be causing this. One theory was that the scene I used was quite large, so maybe the MacBook, with its puny 8GB of RAM, was struggling somewhere.
The benchmark scene causes Blender to consume well above 8GB of RAM, likely resulting in hard disk paging and slowing the process of synchronising data to the GPU. So, this isn't a great test of the eGPU.
But it's informative nonetheless. Recall how Apple has been saying its new M1 based machines are really fast? They probably are... until they run out of RAM. And since you can't upgrade the RAM in these systems, the only way out is a completely new system.
Getting back on track, I decided to try again with another scene that was a bit smaller, one that wouldn't cause paging. This test was a bit more representative of the performance of the eGPU when the host computer isn't having to juggle data around.