Ultra fast Thunderbolt NAS with Apple M1 and Linux
chrisbergeron.com
chrisbergeron.com
What I really want is lightning quick network storage, but I don't think it would be feasible to roll out 10g networking in my current rental home.
But at least SMB has been pretty stable for years. NFS support has had some hiccups. A few 10.14 macOS releases broke NFSv3 and NFSv4 for me, but it was fixed in later releases.
NFS doesn't have a lot of metadata, so you loose a lot of functionality. iPhoto for example could cause major issues if you persisted its library on a nfs, potentially making the library irreparable.
TLDR: A caching proxy for Docker; allows centralized management of (multiple) registries and their authentication; caches images from any registry. Caches the potentially huge blob/layer requests (for bandwidth/time savings), and optionally caches manifest requests ("pulls") to avoid rate-limiting.
https://github.com/rpardini/docker-registry-proxyI need a fat block store for that.
I had this pain with my last macbook. I ALWAYS ran out of disk space. Never again! I went with a 1 TB drive for my M1.
I'm shocked by how much disk I've used actually.
Looks like local docker server should just work exactly same way as local docker while you at same location.
A NAS is great, because you can back up to it and have the backup stored on local hard drives, but it also has a CPU and it can be responsible for uploading the data to the cloud. This is better to do from a dedicated device, especially if you are uploading large amounts of data with limited bandwidth, which I am.
The constraint is that locally backing up to a NAS is slow, even though it is sitting next to my computer. Instead of buying into 10GbE networking, it’d be nice to just use a Thunderbolt cable.
Agree about 10Gb devices being expensive especially if you’re invested in the UniFi ecosystem. I’m tempted to do a direct 10Gb SFP+ connection using used intel or Mellanox 10Gb NICs but I haven’t pulled the trigger. 10Gb Thunderbolt NICs are too expensive and give off questionable amounts of heat.
SFP+ is the way to go right now and gives you options. Fiber, DAC (copper), or Ethernet.
I'm running Linux
root@nas-04:~ # ifconfig thunderbolt0 10.1.1.2
root@nas-04:~ # ifconfig thunderbolt0
thunderbolt0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.10.2 netmask 255.0.0.0 broadcast 10.255.255.255
The IP on the interface is different than the one that it was theoretically configured with. My suspicion is that perhaps the IP used was changed at some point and this is just an editing slip.> Now that the interface has an IP, we have to add a static host route entry for it to communicate:
If both sides are configured with an appropriate netmask on the same subnet, there's no need for a specific host route.
What the hell Intel...
I'm aware that the pactor modem itself is probably a software defined device like an FPGA, but it is much better than the software on the PC - and I can use it with an anemic laptop from 2007 with no issues at all, since it just sends text back and forth over a serial port - via USB.
I don't understand any of it ...
If I wanted to add a LPT parallel port to my motherboard, I would find an appropriate add-in card with the physical port and plug it into the PCI bus and locate an appropriate driver.
Thunderbolt is just another kind of port, right ? If you buy the add-in card to get the physical port and you have a driver to drive the card ... what in the world is "enablement" and why would it be required ?
But to find out is does so little that shorting two pins together gets around it is just too funny.
The dongle is QNAP QNA-T310G1S Thunderbolt 3 to 10GbE Adaptor, US$169 on Amazon.
For other devices in the network that do not impose Thunderbolt though, Melanox 40G NICs are surprisingly cheap.
The cables and cards for PC Thunderbolt retrofit are far (like 3-5X!) more expensive than the MLNX cards and optical cables.
$0.02 :)
I added new Thunderbolt3 PCIe cards (Gigabyte Titan Ridge) to two of my 2012 Mac Pros for around $100 each a bit over a year ago and the prices have dropped since, so I don't get how that is 3-5x more expensive than MLNX cards. Expense was way way lower a factor than the finesse it took to get MacOS to support them for me, but it was the only path that worked for my needs (different need than OP article) and so I endured the pain of getting it working.
In fact, I really love the idea that I could have to walk to a particular room in order to view a particular set of old photos. Wearing some AR glasses, of course. And that I could grant view access to visitors. Would suck if the photos accidentally glitched through the floor and I had to dig down through a foot of concrete to get them back though.
I love this race between network speeds, drive speeds, and RAM speeds. The classic "net vs disk vs ram vs cache vs register" interview question is much trickier these days.
This is an interesting angle of attack, though I'll note that 10Gbps Ethernet was added as an option on the M1 Mac Minis.
I wonder what's the simplest option. could it be made to work with a virtual interface, like wireguard?
It doesn't look like it's going to be supported for M1 Macs or is really all that compatible with Big Sur. From their site, it seems that you have to jump through a few hoops to add a kernel extension to get it to work[1].
Sounds like a good opportunity for Apple to roll something into the OS.
[1] https://support.studionetworksolutions.com/hc/en-us/articles...
Also, I believe USB4 was designed for smaller files / blocks and Thunderbolt is designed for more raw output.
[0] https://liliputing.com/2020/11/differences-between-thunderbo...
Or at least I tried to set it up. 10G pcie cards are now cheap enough, but routers are not. Thunderbolt adapters are also expensive, bulky and use a ton of power[1]. I’m keeping my eye open for a surplus router and cheaper adapters but in the meantime I am only using a 2 port card in my main machine to serve at 10Gbps to one other machine. I wonder if I could also serve my m1 MacBook using thunderbolt 3.
[1] In my work life I also tried to use Ethernet in some embedded projects. It turns out Ethernet is just power hungry in general. Even 100Mbps Ethernet uses about 0.5W per port. There are standards for lower power but I’ve yet to see anyone use them.
Can you quantify that? (I'm wondering if it might be good-enough for my needs.)
Getting back to the OP, this could be interesting for me if and only if I can get fiber based Thunderbolt-4, but it seems to not yet be available.
Current Big Sur release, not a Beta.
From what I can find, Catalina should still be supported for more than a year from now, right?
Edit: well, that's bizarre. Caniuse.com [0] lists the same restriction, WebP is only available from Big Sur onwards. And then people wonder why nobody likes developing for Safari.
I suppose Apple doesn't want to include a software fallback for platforms where hardware isn't available to discourage developers from using the format. It's not like Apple would need to write any complicated decoding algorithms when there's already an open source implementation that's free to use.
I'm just saying it's not unprecedented to have the same browser version supporting different audio/video/image formats depending on OS or hardware.
For image formats it's not as usual, but if someone is making a site only supporting webp then I'd assume they'd look up some support matrixes beforehand.
VP9 and WebP patents are all granted freely by Google. WebP images aren't as terrible for power consumption even in software because the browser doesn't decode 60 of them every second.
Regarding the examples, when it comes to Ogg Vorbis there is no issue with software decoding (it's software everywhere), AV1 was granted software decode support on some OS'es but not others in the exact same browser, version and hardware (and IIRC it's the encoding perf that is especially bad for AV1, not decoding) and the chrome on android issue also shows how legal or hardware issues are not the only things limiting what is available (it can also be bugs that just stay around).
All I'm saying is that testing for browser version A is not a surefire test. Either check the support or test on browser A version B on OS C version D on hardware E (for each of the A/B/C/D/E variants) or just stick with what works across the board. Either way you probably won't end up shipping a site with only webp support.
So Safari gets free accelerated handling of new formats and codecs but only when the underlying OS supports them.
I also use some javascript to delay rendering until the browser window stays on an image. That could very well be introducing some wonkiness.
However I’m still slightly disappointed because I expected an article describing an M1 Mac Mini as a NAS, running Linux (this dream probably isn’t technically there just yet, as Thunderbolt [and network?] drivers are so far still missing from the Asahi project).
Local storage falls apart the moment you need that storage accessible from another machine…
0. https://support.apple.com/guide/mac-help/share-mac-files-wit...
1. https://support.apple.com/guide/mac-help/set-up-file-sharing...
Everything has its place, but I wasted so much time trying to get a nas to work as storage for my home server.
Don't get me wrong I have nothing but problems with NFS and SMB access on the Linux clients. Windows works perfectly, as in whatever I set on the Synology is what I get on windows.
There's got to be a better way!
Everything I found was basically FUSE style things where it looks kind of like local storage but any time you want to use advanced features or high performance it would fail.
SSHFS was secure and easy to set up but was maxing out the CPU on my NAS and also did not support file permissions.
If you need reasonable access to your storage from more than one computer, you need networked storage(of any kind).
Alternatively, if you are running say a database server, and you know the primary storage could be local, it is ideal to choose better performing local storage and of course plan for backups to networked storage.
As much as I agree with your pain points of networked storage, it’s not like you can “replace” it with local storage everywhere.
I have dealt with a couple PB of networked storage for a research cluster. (FreeBSD+ZFS) over NFS on a dedicated network to a cluster of about 100 servers running recent versions of Linux. It worked like a charm while we admittedly kept things simple in terms of file system features.
All clients mount the appropriate NFS shares they need via autofs(only when they are needed).
ZFS being ZFS was just a marvel of software engineering, was solid as a rock. While giving us transparent compression, superb read caching in memory, and cheap snapshots.
So what's your point?
There are also PCI-E x16 with multiple NVMe slots. There's nothing stopping some company from making something similar for Thunderbolt.
And I guess the cost is too high and the connectors would be too bulky, but it would be nice to have something like a SODIMM for flash that separates the memory from the controller.
The redundancy a NAS can provide means losing an entire drive (or more depending on config) in the unit without data loss. Even with that failed drive, the data is still accessible. The failed thing can then even be replaced and the system can be brought back to the normal full redundant state. Your "redundancy" of an SSD doesn't allow for that to happen.
I feel like I'm actually feeding trolls with this
In general, you can usually do faster local than over the network. People use a NAS for other reasons.