Crafting a Home and Work-Ready Power-Efficient DIY NAS with AI TPU

Avatar picture of Andy Haluza

Andy Haluza

JS developer, tech geek
0
0
  • #DIY
  • #IoT
  • #home-lab
  • #micro-pc
  • #technology
  • #virtualization
Represent Crafting a Home and Work-Ready Power-Efficient DIY NAS with AI TPU article
5m read

Prolog

I've decided to build a custom NAS (Network Attached Storage). Honestly, I've first looked at already built like Synology. But after some research into a wide variety of their models and competitors, I've become a bit disappointed about them. Yeah, it's all about price and hardware. As for me, it's quite expensive for such outdated hardware in 2023.

Keep in mind this article it's not a definitive step-by-step tutorial, it's a story about my path and how I walk through it. Also, there would be no price aspects mentioned, if needed I'd rather make some other article by requests.

The path

So, I've started to look into building a DIY NAS. I've investigated how it is possible to make it power-efficient to be able to use it with a combination of UPS (Uninterruptible Power Supply). The goal was to build a powerful and at the same time power-efficient system. When I'm talking about power-efficient I mean that in the average state, the server should be used as less as possible Watts.

The starting point of investigation was finding this spreadsheet with various of user's builds, it's partially in German, so I've made a copy with a translation to English for personal convenience. And it's so good, you might choose any combination from the list and it would be quite a good system. But there are a bit more requirements for a NAS, so not so fast, cowboy.

Regarding the minimal list of personal requirements of the system. In general, it should be a system with a TrueNAS or Unraid on the board, which contains a 2 x 3.5" HDD (more is better), because I already have 2 disks and for now it's quite enough for my purposes. So motherboard should have at least 2 SATA 3.0 interfaces and one more separate interface for an operating system, better it would be a socket for SSD M.2 PCIe. Last but not least CPU should be powerful and power-efficient, so it should be quite new to be built with advanced Lithography, which is a matter for this case.

So I've noticed the most power-efficient systems are using Mini-ITX motherboard (MB) form-factor. The key parts for power efficiency are a CPU (GPU), MB, and power supply,  the rest is not so affecting, so there would be no words about choosing which is better RAM, HDD, SSD, etc. I've started to search for something in an e-store. I've started of course from the mentioned list, but they are built on quite old hardware. So the search continued until I found this one - Asrock N100DC-ITX.

This is perfect! It has soldered a new (Q1'23) Intel N100 4-core chip (up to 3.4 GHz), which has 6 W TDP*. The rest of the motherboard is also quite good. I'll not copy full specs, but only describe what makes a huge impact in the build.

TDP - Thermal Design Power represents the average power, in watts, the processor dissipates when operating at Base Frequency with all cores active under an Intel-defined, high-complexity workload. Refer to Datasheet for thermal solution requirements.

Motherboard overview

As were mentioned the CPU is perfect for this build. But also it supports all and even more what was required:

  • 1 x DDR4(3200) DIMM RAM
  • 2 x SATA 3 - for the drives
  • 1 x M.2 (PCIe Gen3x2) - for OS

That is not all the cool stuff of it. There few things that made this MB even cooler. The PCIe 3.0 x4 (x2 mode) slot, allows connecting some extension boards and having two more M.2 connected disks, or a few extra SATA3. Quite cool, yeah, for such a mini system?

The next awesome feature is covered behind the DC symbols in the name. It means that MB uses an extended power supply. First of all, this makes it possible to use more energy-efficient power supplies tailored to your system, without excess power, subsequently eliminating the extra cost of handling and maintaining a less powerful device. And also you can fit it in a smaller box.

The cherry on top

And the last one which is making me fall in love with this MB it's one more slot. It's M.2 Key E. Mostly always used for a dedicated chip for Wi-Fi and Bluetooth, and even on the official web page it's marked as "for Wi-Fi". But what is the cool part of it? NAS using a wireless connection will suck it in any case, you've said. But! There is a big but! And the roots came from Google. A Google Coral project. It's a Tensor Processing Unit (TPU). What is it for? In general, it helps operate some AI stuff. The documentation said that it

Each Edge TPU coprocessor is capable of performing 4 trillion operations per second (4 TOPS), using 2 watts of power. For example, it can execute state-of-the-art mobile vision models such as MobileNet v2 at almost 400 FPS, in a power-efficient manner.'

With the two Edge TPUs in this module, you can double the inferences per second (8 TOPS) in several ways, such as by running two models in parallel or pipelining one model across both Edge TPUs.

But let's back into our build. There is a variety of types and sockets for Coral TPU, but this system perfectly fits two of them it is a USB version(honestly it fits every because mostly has some available USB ports), but the big disadvantage of it is reliability, in common USB is not very good for persistent and critical connectivity. So get back again to the  M.2 Key E slot. There is a perfect match - M.2 Accelerator with Dual Edge TPU for this socket. The coolest part it's the variety of usage of this. For example, initially, I'll use it for AI detection of movement in the Frigate NVR.

Frigate is an open-source NVR built around real-time AI object detection. All processing is performed locally on your own hardware, and your camera feeds never leave your home.

It will help reduce the load on the CPU and increase the performance of AI calculations. That sounds to me just perfectly.

Summary

So in general we'd managed to build a brand new NAS with more advantages in comparison with sale analogs. In short build cost is barely half of Synology DS723+, without dedicated TPU. As a result, it's a powerful, power-efficient, and flexible system built for NAS and additional virtualized services on it. Of course, it could be used not only as NAS but also as any other server for home lab purposes or a regular PC for entertainment like watching videos up to 4k resolution, web browsing, etc.

So that is all that I wanted to share with you. Thanks in advance for reading and keep in touch.

Avatar picture of Andy Haluza
Written by:

Andy Haluza

Author bio: JS developer, tech geek

There are no comments yet
loading...