Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 02 May 2008 06:53:16 -0400
From:      Adam McDougall <mcdouga9@egr.msu.edu>
To:        Dominic Fandrey <kamikaze@bsdforen.de>
Cc:        kan@FreeBSD.org, freebsd-stable@freebsd.org
Subject:   Re: ubsa speed limit
Message-ID:  <481AF29C.9080706@egr.msu.edu>
In-Reply-To: <481AD8D1.7090004@bsdforen.de>
References:  <481AD8D1.7090004@bsdforen.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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);
                }
        }




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?481AF29C.9080706>