Posts Tagged DNS-323
Samba vs NFS on DNS-323
So far, I was using Samba to share the files stored on my D-Link DNS-323. However, people tend to say that NFS is quicker than Samba. So let’s benchmark those two protocols and figure out which one is actually quicker.
First of all, here is my configuration:
Server | Client |
---|---|
D-Link DNS-323 Linux dlink-5610E5 2.6.12.6-arm1 Samba 3.0.24 UNFS3 0.9.20 |
Raspberry Pi Linux alarmpi 3.6.11-15-ARCH+ CIFS utils 6.1-1 NFS utils 1.2.8-9 |
I used IOzone to benchmark these protocols from the Raspberry Pi. You can find the package for Arch Linux ARM on one of my previous post.
I first mounted the Samba and NFS share drives in the two respective folders /mnt/storage_smb
and /mnt/storage_nfs
.
I then ran the following commands (not at the same time):
iozone -RazcR -U /mnt/storage_smb -f /mnt/storage_smb/testfile -b smb_excel_output.xls iozone -RazcR -U /mnt/storage_nfs -f /mnt/storage_nfs/testfile -b nfs_excel_output.xls
You can download the output files here and here.
Or, you can simply have a look at a summary of these two files in the following table which basically compare the average speed (in Kbytes per second) for both Samba and NFS:
Samba | NFS | |
---|---|---|
Write | 7683 | 6676 |
Re-write | 7544 | 6795 |
Read | 21862 | 50464 |
Re-read | 22383 | 50210 |
Random read | 6348 | 6444 |
Random write | 7603 | 6751 |
Backward read | 5909 | 5246 |
Record rewrite | 80294 | 87225 |
Stride read | 15629 | 11868 |
Fwrite | 7471 | 6700 |
Re-fwrite | 7494 | 6671 |
Fread | 7739 | 7685 |
Re-fread | 7596 | 7639 |
As you can see, it looks like NFS is quicker for read operations but slower for write operations than Samba. But please remember that this is true for this very specific configuration ; It could be completely different for another one.
In conclusion, I personally decided to use both Samba and NFS depending of what I need. If I need a read only access to my data, I use NFS. However, if I need to write data, I use Samba.
NB: Another reason why I didn’t completely stop using Samba is because symbolic links don’t work with NFS. Instead, you need to use binding (mounting a folder inside another folder), but this is kind of incompatible with my use of rsync to backup my data. 🙁
ntpd process on D-Link DNS-313
During the configuration of a D-Link DNS-313 which is basically a NAS (Network-Attached Storage), I got a serious but easy-to-fix problem. 🙂
In order to get access to the box by command line, I installed the Fonz fun_plug. I then wanted to automatically synchronise the internal time with some NTP Pool Time Servers. But, for some reason, the version of the ntpd
process provided with fun_plug is completely freezing the NAS. I wasn’t able to find the root cause of it, trust me, I tried everything I could think of!
Please also note that the same process is working perfectly fine on his brother, the D-Link DNS-323. As I said, I can’t explain why… 🙄
But there is a good news! The ntpd
process is actually part of the D-Link DNS-313 firmware. And it is working fine! 😀 After double-checking, this process is however NOT part of the D-Link DNS-323 firmware. Why is that? Maybe D-Link got complaints from DNS-313 users and fixed it? Who knows…
Anyway, in order to get the ntpd
process to work on the D-Link DNS-313, you need to replace the content of your ntpd
startup script (/ffp/start/ntpd.sh
) by the one below:
#!/ffp/bin/sh # PROVIDE: ntpd # REQUIRE: SERVERS # BEFORE: LOGIN . /ffp/etc/ffp.subr name="ntpd" command="/usr/sbin/ntpd" ntpd_flags="-f /ffp/etc/ntpd.conf" required_files="/ffp/etc/ntpd.conf" start_cmd="ntpd_start" ntpd_start() { # remove rtc and daylight cron jobs crontab -l | grep -vw '/usr/sbin/daylight' | grep -vw '/usr/sbin/rtc' | crontab - proc_start $command } run_rc_command "$1"