Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Sep 2014 14:55:20 -0500
From:      Bryan Venteicher <bryanv@daemoninthecloset.org>
To:        mailinglists@debank.tv
Cc:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   Re: Performance problem with slow link behind fast gateway
Message-ID:  <CAMo0n6RRTAD_NSjT-b96paoBXz%2BV11Xx4gRTyVrSondeL_NjCw@mail.gmail.com>
In-Reply-To: <a5d07d35c0e3f423e6782410a175fcd2@debank.tv>
References:  <a5d07d35c0e3f423e6782410a175fcd2@debank.tv>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Tue, Sep 9, 2014 at 4:42 PM, <mailinglists@debank.tv> wrote:

> All,
>
> I'm seeing some performance problems with a slowish VPN connection behind
> a fast gateway, the setup looks like this:
>
> |----------------------------------|
>  |-----------------------------|
> |client (zandbak)  (DSL connection)| ---- 'VPN tunnel' ----- |Gateway
> (vps) using NAT on 1G|------ 'Internet'
> |----------------------------------|
>  |-----------------------------|
>
>
> Transfers from the gateway to the client are reasonably fast (easily
> within usable range for me):
> root@zandbak:/usr/home/rob # scp rob@gateway:test_file ./
> test_file
>                          100%   10MB 445.2KB/s   00:23
>
>
> Transfers from the internet to the gateway are fast:
> root@vps:/usr/home/rob # fetch -4 "http://149.20.53.23/pub/
> FreeBSD/releases/amd64/amd64/ISO-IMAGES/10.0/FreeBSD-10.0-
> RELEASE-amd64-bootonly.iso"
> FreeBSD-10.0-RELEASE-amd64-bootonly.iso       100% of  209 MB   10 MBps
> 00m20s
>
>
> But transfers from the client to the internet through the tunnel are
> showing a very degraded connection speed, the speed jumps up and down but
> averages at around 20kBps:
> root@zandbak:/usr/home/rob # fetch "http://149.20.53.23/pub/
> FreeBSD/ISO-IMAGES-amd64/10.0/FreeBSD-10.0-RELEASE-amd64-bootonly.iso"
> FreeBSD-10.0-RELEASE-amd64-bootonly.iso         0% of  209 MB 8275  Bps
> 07h27m
>
>
> I've tried to eliminate some variables:
> -VPN: tinc as a L2 VPN and openVPN as a L3 VPN, results are the same
> -NAT: pf and ipfw, results are the same
>
> I suspect that there's a problem with the fast link receiving too much
> data and once the buffers are full dropping packets although I'm not sure
> if this is actually the problem.
> My question is: how can I debug this issue?
>
>
>
=E2=80=8BOn the vtnet0 interface in your KVM VM=E2=80=8B, disable checksum =
offloading. What
KVM/QEMU VirtIO provides as the "checksum" in situation likes this does not
work well with what FreeBSD expects. Fixing this has been on my todo list
for awhile, but it is a moderate amount of work to fix this, and touches
many places in the stack. I have plans to do mbuf related work later this
year, and was planning to finally fix this issue as well.



>
> Below some system information, I can supply more info if needed
>
> Thanks!
> Rob Evers
>
>
>
> System info:
> Gateway: This is a VPS on KVM
>
> root@vps:/usr/home/rob # uname -a
> FreeBSD vps.debank.tv 10.0-STABLE FreeBSD 10.0-STABLE #5 r268727M: Wed
> Jul 16 13:17:24 NZST 2014     root@vps.debank.tv:/usr/obj/usr/src/sys/GEN=
ERIC
> amd64
>
> root@vps:/usr/home/rob # ifconfig vtnet0
> vtnet0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu
> 1500
>         options=3D6c00ab<RXCSUM,TXCSUM,VLAN_MTU,JUMBO_MTU,VLAN_
> HWCSUM,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
>         ether 00:16:3c:55:17:b9
>         inet 192.227.xxx.xxx netmask 0xffffff00 broadcast 192.227.xxx.xxx
>         inet6 fe80::216:3cff:fe55:17b9%vtnet0 prefixlen 64 scopeid 0x1
>         nd6 options=3D21<PERFORMNUD,AUTO_LINKLOCAL>
>         media: Ethernet 10Gbase-T <full-duplex>
>         status: active
>
>
> root@vps:/usr/home/rob # ifconfig tap0
> tap0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1=
500
>         options=3D80000<LINKSTATE>
>         ether 00:bd:61:01:00:00
>         inet6 fd7c:3e16:580b:4ccf::50 prefixlen 64
>         inet6 fe80::2bd:61ff:fe01:0%tap0 prefixlen 64 scopeid 0x4
>         inet 172.16.143.50 netmask 0xffffff00 broadcast 172.16.143.255
>         nd6 options=3D61<PERFORMNUD,AUTO_LINKLOCAL,NO_RADR>
>         media: Ethernet autoselect
>         status: active
>         Opened by PID 61485
>
>
> Client: This is a VM on bhyve
>
> root@zandbak:/usr/home/rob # uname -a
> FreeBSD zandbak 10.0-RELEASE-p7 FreeBSD 10.0-RELEASE-p7 #0: Tue Jul  8
> 06:37:44 UTC 2014     root@amd64-builder.daemonology.net:/usr/obj/usr/src=
/sys/GENERIC
> amd64
>
> root@zandbak:/usr/home/rob # ifconfig vtnet0
> vtnet0: flags=3D8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metr=
ic
> 0 mtu 1500
>         options=3D80028<VLAN_MTU,JUMBO_MTU,LINKSTATE>
>         ether 52:54:00:13:fd:78
>         inet 192.168.1.129 netmask 0xffffff00 broadcast 192.168.1.255
>         inet6 fe80::5054:ff:fe13:fd78%vtnet0 prefixlen 64 scopeid 0x1
>         nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>         media: Ethernet 10Gbase-T <full-duplex>
>         status: active
>
> root@zandbak:/usr/home/rob # ifconfig tap0
> tap0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1=
500
>         options=3D80000<LINKSTATE>
>         ether 00:bd:3d:94:05:00
>         inet 172.16.143.55 netmask 0xffffff00 broadcast 172.16.143.255
>         nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>         media: Ethernet autoselect
>         status: active
>         Opened by PID 1411
>
>
>
> _______________________________________________
> freebsd-net@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMo0n6RRTAD_NSjT-b96paoBXz%2BV11Xx4gRTyVrSondeL_NjCw>