One of PIs I am running is for file server. An external HDD with NTFS is attached via USB. Ethernet cable is directly connected to the home router. SD card is class 10.
I measured I/O performance with dd command; cf this.
- Write speed: sync; time dd if=/dev/zero of=./test.tmp bs=500K count=1024; time sync
- Read speed: dd if=./test.tmp of=/dev/null bs=500K count=1024
Write speed of SD card is 5MB/s.
Read speed of external HDD with NTFS-3G is 30MB/s, which is surprising.
Write speed of external HDD with NTFS-3G is 5MB/s.
It is interesting that both of them looks similar. I thought that I made some mistake on differentiating HDD from SD card. I am thinking that swap partition thing is limiting the HDD write speed and read speed seems to be limited by the maximum bandwidth that PI can handle.
When I copied a movie file from the file server to Windows 7 PC, the speed is about 50Mbps, which is about 6MB/s. It seems like 6MB/s as NAS is actually excellent compare to other people.
People say the bottleneck as NAS is on CPU due to NTFS-3G being inefficient. While it may be true that NTFS-3G is slow, it doesn't explain why I was getting only 6MB/s while HDD read speed is 30MB/s.
The point is that 30MB/s for HDD reading speed was after NTFS-3G and USB 2.0 bandwidth. Whatever performance of NTFS-3G or USB 2.0 was, I was getting 30MB/s after them.
I think the bottleneck is on the Ethernet port. It is working at 100Mbps not 10Mbps. Theoretically 100Mbps can give me 100Mbps at best, which is about 12MB/s. It means I can never get 30MB/s via wired network. Realistically 100Mbps will give me about half of the speed, which is 6MB/s, which is what I am getting.
For now, 6MB/s is fast enough for movie streaming or any other tasks and it works fine for me. But I think the throughput can be improved if I use USB wireless adapter; probably up to 15MB/s, because the maximum bandwidth, 30MB/s, will be shared by wifi card and HDD.