Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Rand0mUserNam3

macrumors newbie
Original poster
Sep 1, 2018
21
24
Hello, I was wondering if I wanted to use an external NVMe as my boot drive for a new M2 Mac, can I set the internal drive as the location for the Swap file, as I understand the built in storage is much faster than external options?

Has anyone tried such a setup?

Thank you.

A couple of additional notes:
I plan on buying a M2 Mac with at least 16GB memory to reduce the need for swap and i’m more inclined to go with the minimal storage option as I have a gen 4 NVMe 4TB, which I plan on using, which will be plenty fast for my needs. Even 512GB internal wouldn’t be enough for me for typical use, so I’m not going to bother upgrading.
 

sublunar

macrumors 68020
Jun 23, 2007
2,311
1,680
Hello, I was wondering if I wanted to use an external NVMe as my boot drive for a new M2 Mac, can I set the internal drive as the location for the Swap file, as I understand the built in storage is much faster than external options?

Has anyone tried such a setup?

Thank you.

A couple of additional notes:
I plan on buying a M2 Mac with at least 16GB memory to reduce the need for swap and i’m more inclined to go with the minimal storage option as I have a gen 4 NVMe 4TB, which I plan on using, which will be plenty fast for my needs. Even 512GB internal wouldn’t be enough for me for typical use, so I’m not going to bother upgrading.
Is the Gen 4 NVME installed in a Thunderbolt 4 enclosure? If it's only a USB-C enclosure you'd find that to be a bottleneck - as low as 700Mb/sec I believe? I certainly wouldn't think of trying to cheap out on internal storage like that.

If I were buying an M2 Mac I'd be concerned that the minimal storage options are actually using slow SSD - the 256Gb SKUs on Mac mini M2 for instance uses a single NAND making it as 'slow' as the MacBook Air/Pro 13 models (at around 1500Mb/s)?

Even the M2 Pro MacBook Pro 14" with 512Gb apparently is slow - single 512Gb NAND? (and by extension I think I have seen a note that the Mac mini M2 Pro base model with the same configuration suffers.

So regrettably, if you're looking for high performance and know this you'd have to get a 512Gb M2 Mini SKU or spec the M2 Pro Mini up to 1Tb.

I'd maybe suggest getting an upgraded storage SKU and just go with as much internal storage as you can get away with and use the NVME SSD as external extended fast storage - thunderbolt enclosures will be pricey and a point of failure if the Mac goes to sleep and has a panic because the swap is disconnected from the boot OS.
 

Rand0mUserNam3

macrumors newbie
Original poster
Sep 1, 2018
21
24
Thanks for your reply @sublunar.

Speed isn’t a consideration, as even 700Mb/s will be more than enough and faster than the Mac it replaces. The project is on a budget and the 4TB is no extra cost, unlike any other configurations.

My original question is unanswered though, which I’ll ask slightly differently:

If I boot from an external drive on an M2 Mac, is it possible to set the internal storage as the location for the system Swap file?
 

Chancha

macrumors 68020
Mar 19, 2014
2,339
2,161
It was possible, in fact straight forward, with macOS pre-Mojave on Intel Macs without T1/2 chips. Then it got increasingly difficult with SIP introduced, depending on the specific Mac hardware + OS setup..

I would approach this differently in your case: provide an adequate enough reason to bother doing this in the first place. Traditionally, changing swap location was only meaningful when your primary boot volume has issues also being the swap target as well, such as capacity; this was a pretty common issue when SATA SSD was a new thing for consumers in 2008 or so where even a 64GB was expensive.
 

sublunar

macrumors 68020
Jun 23, 2007
2,311
1,680
Thanks for your reply @sublunar.

Speed isn’t a consideration, as even 700Mb/s will be more than enough and faster than the Mac it replaces. The project is on a budget and the 4TB is no extra cost, unlike any other configurations.

My original question is unanswered though, which I’ll ask slightly differently:

If I boot from an external drive on an M2 Mac, is it possible to set the internal storage as the location for the system Swap file?

I think the next thing to consider would be reliability from sleep, some older Mac minis used to have sleep issues where USB connected storage would occasionally disconnect and when the external device is the boot drive that's pretty catastrophic.

What @Chancha said also rings a bell, how about just making your external drive the boot disk altogether? If you've got a high performance (Samsung 980 Pro?) then I'd be looking to get a suitable Thunderbolt 4 enclosure to house it at full speed. It's 4Tb so trying to cheap out on the swap file is too sketchy in my opinion.

Obviously you don't want to have to spend any more money than you have to.

So, if it were me doing a bespoke setup - and I've done something similar in the past with my 2012 Mini - I'd just install the full OS on the external device and have a full OS setup on the internal drive as a backup.

I'd also research having just the boot device and apps on the internal storage and work on files and scratch on the external if possible. I used to have as low as 512Gb storage on the boot drive for apps and used direct attached external storage for files etc.
 

Basic75

macrumors 68020
May 17, 2011
2,126
2,487
Europe
It was possible, in fact straight forward, with macOS pre-Mojave on Intel Macs without T1/2 chips. Then it got increasingly difficult with SIP introduced, depending on the specific Mac hardware + OS setup..
This sysctl variable can't be changed?
Code:
$ sysctl vm.swapfileprefix
vm.swapfileprefix: /System/Volumes/VM/swapfile
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.