Most people using a file server or a NAS are using CIFS. Why? Because it’s the only protocol supported by Windows by default and it’s been de facto standard for a long time now. But there are alternatives, especially if you run a Mac or use Linux (or any other *NIX system for that matter). Since I use a Mac that’s what’s been used during my tests as the main client hardware and software platform. Maybe it’s time to try something new instead of CIFS, like AFP from Apple or the old work horse NFS that’s been around since 1984. Let the testing begin.
I’ve done two different tests, one using rsync from the console and one using the Finder in Mac OS X. Each of these test’s were done in three sets:
- Read from the file server
- Write to the file server
- Read and write simultaneously to the file server
Each file system (CIFS, AFP and NFS) were mounted to different folders under /Volumes and I used a 10 GB file with random data generated with dd if=/dev/urandom of=./testfile.bin bs=1024k count=10240 as the file to copy back and fourth.
The rsync test was done using rsync –progress command to be able to monitor the transfer speed during the transfer itself. I then used the average transfer speed reported by rsync as result. When doing the read/write test there was one rsync program reading and one writing.
The Finder test was done using drag and drop plus a stop watch. Not 100% precise, but good enough.
Test equipment and configuration
This section describes my test equipment and configuration used.
- Macbook Pro 13″
- Core 2 Duo 2.53 GHZ
- 8 GB RAM
- 128 GB Apple SSD
- Mac OS X 10.6.6
- Standard PC
- Cure 2 Quad
- 8 GB RAM
- 6x 1.5 TB WD Green in RAID-Z with 2x Corsair F60 mirrored as ZIL and 1x Corsair F60 as L2ARC
- Oracle Solaris 11 Express
- Using built in CIFS and NFS servers and Netatalk 2.2 alpha for AFP connectivity
No tuning was done during the tests and no special software was used, just rsync and Finder. The computers are connected via 1 Gbit/s Ethernet.
These are the results from the tests.
AFP wins in both rsync and Finder with a lot better performance in the Finder test. NFS is the only one of the protocols performing worse in Finder than with rsync. The 99 MB/s that AFP delivers is REALLY good, in fact I dare to say it’s pretty rare from a home built system.
The test show pretty much the same as in read performance. (I know it says read MB/s, it should say write of course. But the figures are still correct.) AFP is the fastest with CIFS second and NFS in third. The 91 MB/s I got with AFP is pretty much what you can expect as a maximum from 1 Gbit/s Ethernet.
Simultaneous read and write performance
Something strange is going on here, NFS get 61 MB/s read in the Finder test while only getting 30 MB/s read in the pure read test. No other surprises, about 30-40 MB/s.
If you have a Mac and your NAS or file server can use AFP, use it! It’s much faster than the others, especially when it comes to pure reads.
As you can see there’s a lot of difference between rsync and Finder tests, why this is I don’t know. I don’t use rsync that much, all my backup is done with Time Machine. The strangest thing is the read performance if the read/write test with NFS. Suddenly I got 60 MB/s for some reason. The fact that NFS is so slow in writes is because it always does synchronous writes which is a great deal slower (but more safe when it comes to losing data due to power loss etc.). Another limiting factor in the read/write test is the SSD in the client, I should have used a RAM disk since the SSD may limit the performance in the test to about 40 MB/s read/write as the result shows.
I’d love to do this test, especially the CIFS tests, on a Windows computer but since I don’t have one I can’t do it.