Adamm
Part of the Furniture
So I recently purchased a 2TB WD Elements HDD for the purpose network storage, I formatted this drive ext4. I noticed pretty fast that SMB default values give terrible wireless performance (LAN tests though are great at 100MB/s+ transfer rates).
I decided to-do some tweaking and found some interesting results.
1) Default socket values | Write = 18MB/s - Read = 25MB/s
2) Doubled Send/Receive buffers | Write = 30MB/s - Read = 40MB/s
3) No buffers specified | Write = 50MB/s - Read = 80MB/s
Admittedly I can't say I've looked into this area too much, a quick search of the forum showed previous threads with similar recommendations about increasing the buffer size, but nothing mentioning removing the specified buffer all together which so far has given me the best performance. I'm also unsure of what SMB defaults this to when its not specified which is giving the above results or any potential downsides.
If anyone would like to chip in their findings in further improvements I'm all ears, and potentially we can have some of these tweaks added by default as stock performance is quite terrible.
For anyone wishing to replicate this, create the file "/jffs/scripts/smb.postconf" with the following content (and change the second part of the sed command to your desired config).
After creating the file, chmod it and restart the nasapps service;
I decided to-do some tweaking and found some interesting results.
1) Default socket values | Write = 18MB/s - Read = 25MB/s
Code:
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_KEEPALIVE SO_RCVBUF=65536 SO_SNDBUF=65536
2) Doubled Send/Receive buffers | Write = 30MB/s - Read = 40MB/s
Code:
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_KEEPALIVE SO_RCVBUF=131072 SO_SNDBUF=131072
3) No buffers specified | Write = 50MB/s - Read = 80MB/s
Code:
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_KEEPALIVE
Admittedly I can't say I've looked into this area too much, a quick search of the forum showed previous threads with similar recommendations about increasing the buffer size, but nothing mentioning removing the specified buffer all together which so far has given me the best performance. I'm also unsure of what SMB defaults this to when its not specified which is giving the above results or any potential downsides.
If anyone would like to chip in their findings in further improvements I'm all ears, and potentially we can have some of these tweaks added by default as stock performance is quite terrible.
For anyone wishing to replicate this, create the file "/jffs/scripts/smb.postconf" with the following content (and change the second part of the sed command to your desired config).
Code:
#!/bin/sh
CONFIG="$1"
sed -i "s~socket options.*~socket options = IPTOS_LOWDELAY TCP_NODELAY SO_KEEPALIVE~g" "$CONFIG"
After creating the file, chmod it and restart the nasapps service;
Code:
chmod +x /jffs/scripts/smb.postconf
service restart_nasapps
Last edited: