I have two FreeNAS servers - one in NY and one in CA, with average network latency of about 70ms.
Both locations are connected by an IPSEC tunnel.
NY replicates its datasets to CA. And the replication runs at maximum 2mb/s, with average of around 1mb/s.
A simple "scp" of a file also shows the same speed.
On the other hand, linux-to-linux transfers max out the VPN router's capacity, at around 25-30mb/s (Juniper SSG520, aes128/sha)
Linux-to-FreeNAS - slow. FreeNAS-to-Linux - slow. Linux-to-Linux - fast (with defaults).
I have checked out every TCP tuning guide I could find, to no avail.
Here are the sysctls I have added so far:
kern.ipc.maxsockbuf=16777216
kern.ipc.somaxconn=1024
kern.maxfiles=204800
kern.maxfilesperproc=200000
net.inet.tcp.delayed_ack=1
net.inet.tcp.mssdflt=1460
net.inet.tcp.recvbuf_inc=262144
net.inet.tcp.recvbuf_max=16777216
net.inet.tcp.recvspace=1048576
net.inet.tcp.rfc3042=1 (tried both 0 and 1 - makes no difference whatsoever)
net.inet.tcp.sendbuf_inc=262144
net.inet.tcp.sendbuf_max=16777216
net.inet.tcp.sendspace=1048576
net.inet.tcp.syncookies=0
Some guides also recommend enabling and tuning inflight settings, but:
[root@freenas2-ny] ~# sysctl net.inet.tcp.inflight.enable=1
sysctl: unknown oid 'net.inet.tcp.inflight.enable'
I'm not sure what else to do... :(
Both locations are connected by an IPSEC tunnel.
NY replicates its datasets to CA. And the replication runs at maximum 2mb/s, with average of around 1mb/s.
A simple "scp" of a file also shows the same speed.
On the other hand, linux-to-linux transfers max out the VPN router's capacity, at around 25-30mb/s (Juniper SSG520, aes128/sha)
Linux-to-FreeNAS - slow. FreeNAS-to-Linux - slow. Linux-to-Linux - fast (with defaults).
I have checked out every TCP tuning guide I could find, to no avail.
Here are the sysctls I have added so far:
kern.ipc.maxsockbuf=16777216
kern.ipc.somaxconn=1024
kern.maxfiles=204800
kern.maxfilesperproc=200000
net.inet.tcp.delayed_ack=1
net.inet.tcp.mssdflt=1460
net.inet.tcp.recvbuf_inc=262144
net.inet.tcp.recvbuf_max=16777216
net.inet.tcp.recvspace=1048576
net.inet.tcp.rfc3042=1 (tried both 0 and 1 - makes no difference whatsoever)
net.inet.tcp.sendbuf_inc=262144
net.inet.tcp.sendbuf_max=16777216
net.inet.tcp.sendspace=1048576
net.inet.tcp.syncookies=0
Some guides also recommend enabling and tuning inflight settings, but:
[root@freenas2-ny] ~# sysctl net.inet.tcp.inflight.enable=1
sysctl: unknown oid 'net.inet.tcp.inflight.enable'
I'm not sure what else to do... :(