On Tue, Jan 03, 2006 at 10:12:49PM -0500, Edwin Olson wrote: > I have a ftdi_sio FT245BM device to which I am streaming about 15KB/s > (150Kb/s) of data. There's a relatively small amount of data being > returned (<1KB/s). The actual writes are in chunks of about 32B each.
Ick, that's some small chunks :( > I am seeing high CPU usage on my 2.8GHz pentium4 running fedora core 4 > (kernel 2.6.14-1.1653_FC4). CPU usage is about 70% "system", according > to 'top', and my system is generally quite unresponsive while I'm > running my tests (jittery mouse, windows don't redraw promptly). > > In fact, there seems to be an interesting property that if I try to push > a little more data (about 20KB/s), the system damn near locks up. > Sometimes I do end up rebooting, but sometimes the system seems to > recover after a minute of "rest". According to 'top', the CPU usage is > generally lumped in either my userland application or events/0. > > Do you have any suggestions about how to decrease the CPU usage? Is > CONFIG_HZ relevant? No, that shouldn't really matter much here. > (I'm running fedora's standard, which I think is > 1000.) Would rewriting my code to try to perform larger writes help > (this is not easy to do, or I would have already...)? Is usbserial just > the wrong way to be pushing around this volume of data? The problem is you only sending 32 bytes at a time. The ammount of overhead for every individual packet is quite high, and if you can increase the packet size, you will get much better throughput and lower CPU load (the load is transferred to the USB host controller chip, not the main CPU.) I would suggest testing this out wih a small test applicate that sends larger ammounts of data through the device. Good luck, greg k-h ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users
