Date: Thu, 20 Jan 2011 17:04:25 +1030 From: "Daniel O'Connor" <darius@dons.net.au> To: freebsd-usb@freebsd.org Subject: libusb performance on 8.1 Message-ID: <2B69A13C-72BF-4F73-9216-BBAFE3C83B94@dons.net.au>
next in thread | raw e-mail | index | archive | help
Hi, I am building a USB interface to a radar data acquisition chassis based = on the Cypress CY7C68013A. While doing some speed testing I find that FreeBSD does ~4Mb/sec, but = Linux does 17Mb/sec & OS X does 8-10Mb/sec. It is using libusb-1.0 with the async API in a threaded app. I spawn a = thread which sites in the following loop: while (!child_exit) { tout.tv_sec =3D 0; tout.tv_usec =3D 100000; libusb_handle_events_timeout(ctx, &tout); } ugsio_cancelusb(); The parent thread is the rest of the program which and handles reading = data out of the completed transfers and forwarding them to the data = processing children and re-submitting them to the USB stack. I keep 8 transactions of 512 bytes each in flight. The device itself = holds up to 4 packets in a FIFO until the PC is ready. Increasing the = number of transactions in flight has no effect on performance. Does anyone have a suggestion as to how I can look at improving = performance? Deploying Linux is not really an option :) The Linux PC is.. Linux fpgawork 2.6.32-28-generic #55-Ubuntu SMP Mon Jan 10 23:42:43 UTC = 2011 x86_64 GNU/Linux The CPU is a Core 2 E6400 @ 2.13GHz on a Gigabyte 965P-DS3 rev 1 = (http://www.gigabyte.com/products/product-page.aspx?pid=3D2314#ov) which = has an ICH8 chipset. The FreeBSD PC is.. FreeBSD aumond8.gsoft.com.au 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul = 19 02:55:53 UTC 2010 = root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 The CPU is a Core 2 E7500 @ 2.93GHz on a Supermicro C2SBA+ = (http://www.supermicro.com/products/motherboard/Core/G33/C2SBA_.cfm) = which has an ICH9 chipset. Any patches welcome! Thanks. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2B69A13C-72BF-4F73-9216-BBAFE3C83B94>