On Friday, May 31, 2013 3:30:42 AM UTC+1, TJ wrote:
I can contribute my dns-to-dns performance, and pc-to-dns performance but I think we should decide on specifically what software we should use.
That is a very important prerequisite.
Unfortunately I'm a very picky person, as you will see below.
If you search the net for "samba low speed", or similar, you will find lots of miraculous solutions.
But you will often find followup-posts of users that applied the solution and it didn't work for them!
The reason is the same as when Dr. House starts prescribing drugs to their patients without having first correctly diagnosed their disease :-)
To apply a cure to a problem one has to first know the source of the problem.
I'm not an expert on none of these, but all the following can affect performance.
One has to first identify which one is the culprit, as applying cures to the wrong one will often causes issues on the others, specially on our low power cpu and memory box.
1-physical network status or setup
2-network setup on the box
3-protocol tune
4-disk "layout"
5-filesystem type
6-test files
1-physical network status or setup
Gbps network, routers, switches, defective network cables, excessive traffic, collisions...
2-network setup on the box
frame size (MTU), send or receive buffers, other box activity; 'ifconfig', '/proc/sys/net/ shows most of these. All services must be stopped in the box.
You will find in the net many setups for these, the first one I got was
http://www.cyberciti.biz/faq/linux-tcp-tuning/, but remember that most of those are for desktop computers with Giga bytes of memory, and if you use one of those settings in our box it will strongly degrade other system functions.
3-protocol tune
ftp is the simplest, and has almost no tunable parameters (don't use SSL!).
samba has some 386, yes, at least 386, tunable parameters!
Read my last post in the NEWS topic regarding samba setup (the samba package). You will find thousands of references in the net regarding those settings, but read first the samba author comment on those. Samba authors also say that samba performance should be equal to ftp, but I strongly doubt that!
Also, the operation system version matters, winXP is different from Vista /Win7/8 or linux, so always state which one you are using.
4-disk "layout"
RAID requires most of the box, so there must be two sets of tests, for standard and RAID1 setups. Always state which one you are using.
5-filesystem type
ext2 is the fastest, it is used by default in the D-Link fw, ext4 is the next fastest. So always state which one is in use.
But this is not all -- is the disk in use a newly formated one, or has data for several months or years? Is it near full? It makes a difference!
Converting filesystem type from ext2 to ext3 or ext4 will not change the files by itself (read about 'chattr'), and only new files will benefice.
Also, what mount options are in use? Some options make the data to be more secure, but they also slow down access time ( see 'barrier' or 'data' mount options)
I opted for the most secure mount options by default, as Alt-F was motivated by the poor security that exists in the stock firmware.
As a rule of thumb, *all* packages are shipped with its tunable settings as the software author think that's is best -- after all he must be an expert!
6-test files
Are files fragmented? the 'filefrags' program will show this. If the disk head has to move forth and back often, you will see irregular transmission speed, with many speed drops, if you use a network graphic tool. A few tens or hundreds of extends are of no concern.
Are you transmitting a single large file, or hundreds of small files? It is different, as the filesystem starts to play a big role here. Always use a single large (GB) file, and be aware of cache effects on the desktop computer.
To establish a baseline, I propose to use the default network settings, and use ftp and samba to measure the read throughput of a single GB file with most services stopped.
And repeat the transfer a couple of times.
-Using Samba from a linux computer, Gbps network, standard MTU, standard disk, standard ext4 mount options (rw,relatime,barrier=1,data=ordered), reading a 700MB/9 extents file from the box
Reading:
Samba:
# smbclient -N //nas/sda4 -c "cd foo; get Immortel.avi"
getting file \foo\Immortel.avi of size 733151232 as Immortel.avi (18358.6 KiloBytes/sec) (average 18358.6 KiloBytes/sec)
Same file, a few minutes latter:
# smbclient -N //nas/sda4 -c "cd foo; get Immortel.avi"
getting file \foo\Immortel.avi of size 733151232 as Immortel.avi (16864.6 KiloBytes/sec) (average 16864.6 KiloBytes/sec)
ftp:
-Same, but on a (degraded) RAID1, standard ext4 mount options, reading a 700MB/182 extents file from the box
# wget ftp://ftp@nas:RO/Videos/Immortel.avi
...
2013-05-31 18:51:04 (21.2 MB/s) - `Immortel.avi.1' saved [733151232]
Same results a few minutes latter
Writing:
samba:
# smbclient -N //nas/sda4 -c "cd foo; put Immortel.avi"
putting file Immortel.avi as \foo\Immortel.avi (12891.5 kb/s) (average 12891.5 kb/s)
a few minutes latter:
# smbclient -N //nas/sda4 -c "cd foo; put Immortel.avi"
putting file Immortel.avi as \foo\Immortel.avi (12837.4 kb/s) (average 12837.4 kb/s)
samba "tuned":
Same, but adding SO_SNDBUF=87380 SO_RCVBUF=87380 to socket options in smb.conf and restarting samba:
# smbclient -N //nas/sda4 -c "cd foo; put Immortel.avi"
putting file Immortel.avi as \foo\Immortel.avi (17291.8 kb/s) (average 17291.8 kb/s)
ftp: (lukemftp client)
writing to the degraded RAID1:
# ftp -u ftp@nas:RW/foo Immortel.avi
...
733151232 bytes sent in 00:45 (15.37 MB/s)
writing to the standard fs:
# ftp -u ftp@nas/mnt/sda4/foo/ Immortel.avi
...
733151232 bytes sent in 00:43 (16.00 MB/s)
I don't yet have netcat/netperf to remove the disk and filesystem variables from the equation (someone please fill-in a package request for this, so I will not forget)
And I don't have a second DNS-323 to perform this topic's tests, but making write tests should provide the same info (and a clear separation of issues -- is it a read or a write problem?)
As a final! consideration, remember that Alt-F is based on free (as in beer and speech) software.
The DNS-323 support was contributed to the linux kernel by Marvell, the maker of our box SoC/CPU, but some details was left out from the contribution -- perhaps those missing parts can explain why the D-Link fw is in some aspects faster then the free software, I don't know.
> Can poll threads be started on here?
I'm afraid not.
But you could create a new Topic and maintain data on its first post, editing it when users contribute new data