From owner-freebsd-stable@FreeBSD.ORG Fri May 2 12:10:46 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BDF7106564A; Fri, 2 May 2008 12:10:46 +0000 (UTC) (envelope-from mcdouga9@egr.msu.edu) Received: from mx.egr.msu.edu (surfnturf.egr.msu.edu [35.9.37.164]) by mx1.freebsd.org (Postfix) with ESMTP id 154378FC19; Fri, 2 May 2008 12:10:45 +0000 (UTC) (envelope-from mcdouga9@egr.msu.edu) Received: from localhost (localhost [127.0.0.1]) by mx.egr.msu.edu (Postfix) with ESMTP id D20D771F1E6; Fri, 2 May 2008 07:53:21 -0400 (EDT) X-Virus-Scanned: amavisd-new at egr.msu.edu Received: from mx.egr.msu.edu ([127.0.0.1]) by localhost (surfnturf.egr.msu.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SlFfxpP4kb7q; Fri, 2 May 2008 07:53:21 -0400 (EDT) Received: from [10.0.0.211] (c-208-53-102-126.chrlmi.cablespeed.com [208.53.102.126]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mcdouga9) by mx.egr.msu.edu (Postfix) with ESMTPSA id 82F5871F155; Fri, 2 May 2008 07:53:21 -0400 (EDT) Message-ID: <481AF29C.9080706@egr.msu.edu> Date: Fri, 02 May 2008 06:53:16 -0400 From: Adam McDougall User-Agent: Thunderbird 2.0.0.12 (X11/20080428) MIME-Version: 1.0 To: Dominic Fandrey References: <481AD8D1.7090004@bsdforen.de> In-Reply-To: <481AD8D1.7090004@bsdforen.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kan@FreeBSD.org, freebsd-stable@freebsd.org Subject: Re: ubsa speed limit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2008 12:10:46 -0000 Dominic Fandrey wrote: > When I download a single file it seems that the download speed is > limited to 32k (raw data as shown by netstat). Under Windows I can > reach values around 60k. I can achieve more throughput (though not as > much as under Windows), when downloading several files at once. > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > Try this hack, its using concepts I gathered from people patching the Linux driver, basically increasing the block size of transfers. Edit ubsa.c and recompile/reload the ubsa driver. Its located around line 362. Basically replace UGETW(ed->wMaxPacketSize); or UGETW(ed->wMaxPacketSize); with 2048. I think the default is 512 and you can play with different values to evaluate its effect on speed. I realized a large performance boost from 2048, I think at least 80k/sec transfer rate. } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { ucom->sc_bulkin_no = ed->bEndpointAddress; - ucom->sc_ibufsize = UGETW(ed->wMaxPacketSize); + ucom->sc_ibufsize = 2048; + // ucom->sc_ibufsize = UGETW(ed->wMaxPacketSize); } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { ucom->sc_bulkout_no = ed->bEndpointAddress; - ucom->sc_obufsize = UGETW(ed->wMaxPacketSize); + ucom->sc_obufsize = 2048; + // ucom->sc_obufsize = UGETW(ed->wMaxPacketSize); } }