You can build a Network Attached Storage (NAS) for less than you think. A Raspberry Pi NAS is not something you would usually associate with performance. After all, there is a reason why a decent NAS will set you back a couple of hundred USD plus the cost of the drives, not $50. As it happens, I built a Raspberry Pi based NAS drive before (with PLEX), and I have been iterating the design since. What is Raspberry Pi NAS speed? Faster than it was before!
New Linux, new speeds?
I upgraded my Raspberry Pi 2 NAS to the latest and greatest Raspberry Pi 3B+ hoping to get the network performance boost promised by an excellent iperf benchmark. Unfortunately, after the upgrade, I discovered that iperf benchmark had very little to do with the actual practical performance.
Disappointed with the results I accepted the failure and moved to other projects. I wanted to improve the NAS speeds to handle the video files (until now, NAS has been hosting all pictures for NotEnoughTech work) so going 1Gbps was pretty much a must. I started to look around for the alternative boards.
Recently, I discovered that the latest change to Linux and kernel and probably the network and USB stack improved the ethernet performance and speed. How fast Raspberry Pi NAS is right now? It almost doubles the speeds from before!
|Raspberry Pi 3B+ (before)||Raspberry Pi 3B+ (now)|
|Read||11 MB/s (2GB file)||19 MB/s (4.20 GB file)|
|Write||10.2 MB/s (2GB file)||18.5 MB/s (4.20 GB file)|
That’s a serious increase! It looks like finally, the NAS can take advantage of the increased bus speed of the Raspberry Pi 3B+. It’s not the theoretical 300Mbps I have seen during the iperf tests, but I’m sending much bigger files that won’t get offloaded to RAM.
Finally, the upgrade paid off, especially that the transfer speed over the improved interface is consistent. I no longer have to limit the interface programmatically. It looks like Raspberry PI 3B+ NAS drive is actually worth considering!
What if you want to go faster, not more expensive?
How fast can you go on a budget?
A couple of weeks ago easeus.com reached out to me asking for cooperation. They specialize in backup and recovery options for computers (Windows/Mac) and mobile devices (Android). Seems like a great match for a NAS based project, so we partnered up to see how fast you can go on a budget. Saved money can be spent on backup software after all.
Since they sponsor this build, they are also providing a nice incentive to use their backup software:
I decided to go for something that is impressive on paper but does not break the bank. OrangePi 3 has been released lately, and this board packs a serious punch:
- H6 Quad-core 64-bit 1.8GHZ ARM Cortex™-A53
- 2GB LPDDR3(shared with GPU)+8GB EMMC Flash
- 10/100M/1000M ethernet
- 4*USB 3.0 Host
- H265/HEVC Main/Main10 profile@Level5.2 High-tier ;4K@60fps, up to 6Kx4K@30fps & H264/AVC BP/MP/HP@level5.1, MVC, 4K@30fps
More than enough on the paper to push 4K content and serve files quickly over 1Gbps network. Everything else at my home is done to the same standard so it seemed like a perfect match.
To see where I’m going to hit the bottleneck, I’m going to test both USB3.0 and USB2.0 SATA connectors. The OrangePi 3 comes with USB3.0 but if I don’t get any speed boost thanks to the improved bus, there is no need to splash out.
I’m using the same drives (2.5″ mechanical HDD) for the sake of the consistency, but I will add a separate benchmark for an SSD once I have one I can spare.
Lastly, I’m not going to use synthetic benchmarks. I’m not interested in anything other than real life performance, so I will play with that 4.20GB file I created earlier. Benching with iperf didn’t get me far last time, I’m not making the same mistake again.
I’m using Samba file sharing via Ubuntu Server edition running on OrangePi 3 over the 1Gbps Ethernet (Cat6) to my Windows 10 based PC with a Gigabit connection.
OrangePi 3 USB2.0
In this scenario, I sent the file to and from the NAS drive to HDD connected via USB2.0 SATA enclosures used in my original Raspberry Pi NAS. The speeds were fairly consistent and I noted the following values
|34-36MB/s (2min 06 sec)||26-30MB/s (2min 38 sec)|
OrangePi 3 USB3.0
It’s time to up the game to see if the USB3.0 will increase the speed. Note that I’m still running mechanical HDDs.
|60-65MB/s (2min 06 sec)||40-70MB/s (2min 38 sec)|
Looks like I’m limited now by the HDD’s read/write speed. The transfers look very promising. It will be interesting to test the SSDs at some point.
Looks like the speed increase is great. The OrangePi 3 NAS costs about 10$ more than the RaspberrPi counterpart. I will provide the full material list in the next part, as some of the items used will be picked especially for the box used to keep the drive. Unfortunately, I won’t be able to repurpose the original NASpi enclosure. If you have any questions feel free to leave it in this Reddit thread.
Once again, big thanks to easeus.com for sponsoring this project. In the 2nd part, I will try to put it all together and make it look like more than just a bunch of wires connected to a board.