Raspberry Pi 2 NAS Experiment HOWTO
Benchmarks
iperf
In my Raspberry Pi 2 Model B review, I obtained the following iperf results (as a client)
Iperf (client) | Type | iperf | iperf -w 128k |
Raspberry Pi 2B | 100Mbps | 94.2 | 94.2 |
Raspberry Pi 2B | USB Gige | 178.0 | 176.0 |
Previously you had to know in advance the skills, experience and authority, he should have to treat the primary disease first according to buy cialis usa pathological mechanism and medical experts. You can buy these herbal pills from reliable online pharmacy that maintains highest quality products and are procured from the medicinal drugs like generic viagra discount http://mouthsofthesouth.com/wp-content/uploads/2019/09/MOTS-09.21.19-Ingram.pdf. The disease may also affect on your partners tadalafil price in india sexual drive. Thrush is also commonly referred to as cialis tab biliary pancreatitis.
Here are the new results, for iperf running as a sever on the Raspberry Pi 2:
Iperf (server) | Type | iperf | iperf -w 128k |
Raspberry Pi 2B | 100Mbps | 94.3 | 94.3 |
Raspberry Pi 2B | USB Gige | 149.0 | 149.0 |
With the iperf results above, we have now identified one of the bottlenecks – what the maximum attainable network speeds are for raw traffic, not including SAMBA overhead.
Network limits (in MB/sec) | 100Mbps Eth | Gigabit Ethernet |
Rpi2 iperf -s | 11.8 | 22.3 |
Rpi2 iperf -c | 11.8 | 18.6 |
Fine print: it may be possible to increase the numbers above slightly by low level network tuning and/or overclocking, however my intent was to identify the “freshly installed” limits.
hdparm & dd
results from usb hd article
hdparm | media | buffered read |
Raspberry Pi 2B | ADATA 16GB | 17.5 |
Raspberry Pi 2B | Velocity 3TB | 27.7 |
(test if text smbclient is faster than gui file browser)
dd | media | dd read | dd copy | dd write |
Raspberry Pi 2B | ADATA 16GB | 18.5 | 6.8 | 10.9 |
Raspberry Pi 2B | Velocity 3TB | 28.10 | 14.30 | 37.80 |
The above tells us what the maximum available bandwidth is to our USB connected SATA hard drive.
These measurements were taken with local access to the hard drive – therefore no contention for network bandwidth over the USB channel, thus they establish the maximum possible transfer rates to / from the hard drive.
local hard drive limit | Velocity 3TB |
max read MB/sec | 28.1 |
max write MB/sec | 37.80 |
Fine print: it may be possible to increase the numbers above slightly by using an SSD, better USB-SATA bridge and/or overclocking.
Reading a 1.7GB file
GET 1.7GB | 100Mbps Eth Def | 100Mbps Eth Opt | USB Gig-E Def | USB Gig-E Opt |
Linux smbclient | 11.3 | 11.3 | 16.2 | 15.3 |
Linux GUI | 9.3 | 9.3 | 13.0 | 12.9 |
Win GUI | 11.3 | 11.3 | 15.4 | 15.1 |
There is no observable difference between the default SMB configuration and the optimized one at 100Mbps.
With the USB Gigabit adapter, Linux and Windows 7 clients perform slightly better (2%) with the default SMB configuration.
Writing a 1.7GB file
PUT 1.7GB | 100Mbps Eth Def | 100Mbps Eth Opt | USB Gig-E Def | USB Gig-E Opt |
Linux smbclient | 10.9 | 10.9 | 12.8 | 12.6 |
gui put 1.7GB | 8.4 | 8.4 | 11.3 | 11.4 |
Win GUI | 10.6 | 10.6 | 8.0 | 10.1 |
Once again, there is no difference between the default SMB configuration and the optimized one at 100Mbps.
With the USB gigabit adapter there is essentially no difference with the optimized SMB configuration for Linux, however the Windows client does show a bit over 25% performance improvement for writing a file.
Copying a 1.7GB file
COPY 77 PICS | 100Mbps Eth Def | 100Mbps Eth Opt | USB Gig-E Def | USB Gig-E Opt |
Linux GUI | 4.2 | 4.2 | 6.9 | 6.9 |
Win GUI | 6.2 | 6.2 | 5.6 | 5.7 |
Yet again, there is no difference between the default SMB configuration and the optimized one at 100Mbps.
The USB gigabit adapter shows a slight improvement with the optimized SMB configuration (<2%)
Copying jpegs from server to client
GET 77 PICS | 100Mbps Eth Def | 100Mbps Eth Opt | USB Gig-E Def | USB Gig-E Opt |
Linux smbclient | 11.2 | 11.0 | 19.7 | 12.6 |
Linux GUI | 8.9 | 9.0 | 16.3 | 16.3 |
Win GUI | 10.6 | 10.6 | 14.7 | 14.6 |
Wow… we finally see a tiny bit if improvement (<2%) for the Linux gui client at 100Mbps!
The Linux smbclient performs MUCH better – 56% better – with the default settings and the USB gigabit adapter here.
Copying jpegs from client to server
PUT 77 PICS | 100Mbps Eth Def | 100Mbps Eth Opt | USB Gig-E Def | USB Gig-E Opt |
Linux smbclient | 10.8 | 10.9 | 13.8 | 12.6 |
Linux GUI | 8.4 | 8.5 | 11.5 | 11.7 |
Win GUI | 9.6 | 9.6 | 7.9 | 10.6 |
At 100Mbits, there is a very slight ~1% advantage for Linux clients with the optimized settings, and no difference for Windows.
With the USB Gigabit adapter, the default settings again give a decent boost of 10% over the optimized settings, and there is a 34% advantage for Windows clients with the optimized settings here.
Copying jpegs from server to server
COPY 77 PICS | 100Mbps Eth Def | 100Mbps Eth Opt | USB Gig-E Def | USB Gig-E Opt |
Linux GUI | 4.2 | 4.2 | 6.9 | 6.9 |
Win GUI | 6.2 | 6.2 | 5.6 | 5.7 |
100Mbits – no difference.
USB gigabit adapter gives a slight <2% advantage to Windows when using the omptimized settings.
Conclusion
Originally designed for students to kindle interest in computers (like the original eight bit computers) by providing an inexpensive computer to experiment with, the Raspberry Pi Foundation found to its surprise that it actually sold more units to hobbyists, tinkerers, makers and engineers – who use the Pi for an wide range of applications due to its low cost – even when the target application is not really suited to the Raspberry Pi.
Raspberry Pi’s (any version) are not designed to be used as file servers, however if your needs are modest enough, they can be used as such.
Frankly, if your home network is running on 100Mbps Ethernet, there is really no point in getting a more powerful NAS box (or dedicated file server) as the network itself will limit you to 11MB/sec or less.
If you run a gigabit network, you can use a Raspberry Pi 2 (or original) as a NAS with a gigabit USB3.0 adapter as long as you don’t need an aggregate total bandwidth (between all your clients) of more than roughly 20MB/sec.
A faster USB gigabit adapter – and faster USB-Sata bridge – could help a little bit, but don’t expect miracles – the bottlenecks outlined earlier in this article would still apply.
Linux clients do not benefit – indeed, lose performance – from the SMB configuration optimization used in these tests.
Windows clients can benefit from the optimizations, but only do so noticeably with a USB gigabit adapter.
If you would like to discuss this article, your experiences with running Raspberry Pi servers, or help tune Rasperry Pi servers, I invite you to join the Mikronauts forum and discuss it there – or in the thread created for this article on the Raspberry Pi Forums.
Related Links
- Raspberry Pi 2 USB hard drive and adapter tests
- Raspberry Pi 2 Model B Review
- Raspberry Pi 2: Raspbian vs. Linero (ARMv6 vs ARMv7)
- SAMBA HOWTO
- Raspberry Pi Model A+ Review
- Raspberry Pi Model B+ Review
- Banana Pi Review
- Banana Pro Review
- MIPS Creator CI20 Review
- ODROID C1 Review
- Raspberry Pi Model B+ USB WiFi Adapter Tests
- Banana Pi USB WiFi Adapter Tests
- Elf RoboPi/Raspberry Pi Robot
Mikronauts Products for the Raspberry Pi
Article Index
- Introduction, Analysis (Looking for Bottlenecks), USB 2.0, 10/100 Ethernet, Disk Transfer Rate
- But what about RAID?, File Server Software, File System Overhead, Configuring your Raspberry Pi 2 SAMBA server, Tuning the server, Test Equipment
- Benchmarks, Reading/Writing/Copying large files, Reading/Writing/Copying directory of jpeg’s, Conclusion