From owner-freebsd-net@freebsd.org Thu Feb 16 17:18:54 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0216ACE1953 for ; Thu, 16 Feb 2017 17:18:54 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from mail-wr0-x22f.google.com (mail-wr0-x22f.google.com [IPv6:2a00:1450:400c:c0c::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9937A174A for ; Thu, 16 Feb 2017 17:18:53 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: by mail-wr0-x22f.google.com with SMTP id i10so16332191wrb.0 for ; Thu, 16 Feb 2017 09:18:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to; bh=dz0JQHgoeEjsSDvnsDw7F4ax1TJ7twYwRde0qi1Hop0=; b=vso+DZq+fClOViGz4piPfIhS00WHehRk7XbPhcesU0FFUI0s7uw1rKQkhj8i4/mSWi HGKnX7wDQSIFPWCPnWlA76MTx1ifuY4p55Ed1g+5Gjj+HvuBdFc2yA6s2prxaKSoFH2y 7Gm35GkZmKrt6d4g6DxmC9d12fpcva2TUB/T58Q/b7RoPY+UWPKIAotM7mu8T5T8S37l U6eikV/ZirwDz+27SWSGkZbs3OJnl82wWnE6p2s3uAfAlNEpvVB5m3nFT9MTEc9PSvhp Qpk/oWp/XQnGlTeCd1+27vL5g9v0F+aPyV7QeJijwV8vnXf7DWfTXEkHYYLEhEA6QWd3 E96w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=dz0JQHgoeEjsSDvnsDw7F4ax1TJ7twYwRde0qi1Hop0=; b=HeNkALc6IA3MMJqMdM1tnyZXvJh1crAsQbv6/VbAYfq2jcFNp73e/rbg4dkA3VA0nz suXrvxpaHjZTw+/SPveosuqXXX5M+yw6K7KImgAW4qKCFy63X3FqtQ4nc86If6J7boCE PDRyn8RqCFstwFjr1XjWHh6Y3I3ICM6X39ueRA4tE9R2dHztn/04dv1oHqRUDZszO/0S tFwJd8CJudP+bKb8VOTEHTL+gqmCtMoWsdAnj/+FDBEwIo1YviN0WLV8HuL/RkAh8Wur ug9/DnQBuKcg3+YJ+gShY4X9s5yO3XmrfSKuS2ruYpvhBWnnnkV+PNowCT1jcczcqvXL FQTg== X-Gm-Message-State: AMke39nKjyD+mYnlK4VneL5Op+hGY62jlqJiuhQUlj8aPmvnXvrlJAcZP0iFIyustgpy8Nwm X-Received: by 10.223.176.70 with SMTP id g6mr3122671wra.12.1487265531401; Thu, 16 Feb 2017 09:18:51 -0800 (PST) Received: from [10.10.1.58] ([185.97.61.26]) by smtp.gmail.com with ESMTPSA id t202sm1010777wmt.28.2017.02.16.09.18.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Feb 2017 09:18:50 -0800 (PST) Subject: Re: Slow Download Speeds from AWS S3 To: freebsd-net@freebsd.org References: <18e49da9-47eb-1803-e223-b4385e7d8690@multiplay.co.uk> <30F9FC69-CEBE-4CBE-93A9-DEDBD053C6C6@googlemail.com> From: Steven Hartland Message-ID: <673aca75-7bb5-73e7-d23b-b12a25816c8a@multiplay.co.uk> Date: Thu, 16 Feb 2017 17:18:54 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <30F9FC69-CEBE-4CBE-93A9-DEDBD053C6C6@googlemail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Feb 2017 17:18:54 -0000 It does seem to be related to TCP Receive Window Size. When I tested on a 11.0-RELEASE box I got 30MB/s out of the box and the increase of recvspace was only needed on the original 10.2 however the 11 box is only 1.2ms from AWS where as the 10.2 was 17ms away, so likely explains the difference. It seems that when talking to hosts that don't support Timestamps FreeBSD's performance is going to be poor due to lack of auto scaling :( Reading the thread you linked is seems like we need to implement auto scaling based on RTT estimations similar to linux. Regards Steve On 16/02/2017 16:55, Sydney Meyer via freebsd-net wrote: > Hi Steve, > > increasing the buffer size did indeed enhance throughput. > > I am obviously not an expert in this field, but i don't understand why or if the TCP Receive Window Size shouldn't increase automatically. > > I found this thread on the ML and i'm reading myself a bit more into the topic right now. > > https://lists.freebsd.org/pipermail/freebsd-net/2014-August/039495.html > > Thank you for your tip, however.. > > Sydney > >> On 16 Feb 2017, at 16:35, Steven Hartland wrote: >> >> Window scaling and receive buffer scaling is the most likely cause. >> >> Check what the sysctl net.inet.tcp.recvspace is set to, then try increasing it e.g. >> sysctl net.inet.tcp.recvspace=655360 >> >> This jumped the transfer rate with a wget and your test URL from 3MB/s to 30MB/s here. >> >> Regards >> Steve >> >> On 16/02/2017 14:34, Sydney Meyer via freebsd-net wrote: >>> Hello, >>> >>> I'm seeing continuous slow download speeds from Amazon S3, but only on FreeBSD. Other OSes saturate the connection without problems. >>> >>> This happens with 10.3-RELEASE and 11.0-RELEASE and only with AWS S3 in different regions (Ireland, London, Frankfurt, US Standard have been tested) whilst using fetch, curl, et. al. >>> >>> I have tested this on multiple machines, bare metal, bhyve, Xen and VMware VMs, routed setups and direct pppoe links.. all the same. >>> >>> Anyone seeing similar issues? >>> >>> Here's a url to try: >>> >>> http://s3.eu-central-1.amazonaws.com/4f48caf1d8bcbef8/c5b38f8b3625d2b6/zerofile.raw >>> >>> Also, when doing double NAT, i.e. VMware Fusion FreeBSD Guest with "Share with my Mac"-Interface, the machine is doing completely fine, as in saturates the link, 90Mbps otherwise between 12-15Mbps.. >>> >>> I also switched the FreeBSD Routers with Linux-based ones and with the isp-provided router box, with the same result. >>> >>> I have launched VMs with Digital Ocean to "rule out" my ISP and there seems to be the same issue. Downloading from S3 is multiple times slower than any other connection to services outside of S3 or on any other OS. >>> >>> It seems like other people are seeing the same issue: >>> >>> https://forums.freebsd.org/threads/59756/#post-343064 >>> _______________________________________________ >>> freebsd-net@freebsd.org mailing list >>> https://lists.freebsd.org/mailman/listinfo/freebsd-net >>> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"