I need to know if I can get acceleration data from an IMU at 500Hz via USB. I've been going through the code that the manufacturer provides and trying to improve it. Right now I cannot go faster than 166Hz. Things I've tried:Switched from streaming mode to polling. The reason is that in streaming mode the SDK of the manufacturer uses the ioctl library to know if there is new data to be read. The faster I would go was 10Hz. In polling mode, every N milliseconds data gets read from the port using a standard read command. I went from 10Hz to 166Hz, that is, for N=6. But with N<6 I get no improvement. 166Hz is a ceiling right now.Increased the process priority. This has no effect at all. Maybe because I'm only running the browser and the code I'm working on?Yes, I know linux is not a real time system. At the end of the day I'll have to live with that. I may use xenomai later on the code. But right now I need to know how fast I can go. Not theoretically, but in a real application. Any ideas about how to increase the performance?EDIT: This are the timestamps of the time I get the data, in millisencods. Note the bursts. 1449258970519  1449258970519  1449258970525  1449258970531  1449258970531  1449258970543  1449258970543  1449258970543  1449258970549  1449258970555  1449258970555  1449258970562  1449258970567  1449258970567  1449258970573  1449258970579  1449258970579  1449258970585EDIT: The amount of data that I have to transfer is very small... say at most 16 floats, plus some headers. I can safely assume 128 bytes is enough. So 128x1000 is still A LOT less than the 480 Mpbs that USB 2 offers. 
Read data from a device through usb port at high frequency
linux;real time;usb
After looking around quite a log, reading manuals, and getting some output from the linux kernel USB mailing list, I'm going to say that is not a good idea to use a USB for 500Hz continous data transfer.At first I thought that it should be possible, and the math proved it. Meaning, if USB 2.0 offers 480Mbs, I should be able to poll my imu for a few floats at 500Hz. I think that I needed at most 128kps. Well, as proposed by someone at the linux kernel mailing list (someone who very kindly answered all my questions!) I profiled the data transfer and it came at 27 Kbs, which is way lower than the theoretical 480 Mpbs of USB 2.0.Then, on several places I found reference to the issues of bursts in USB data. For reasons that I don't fully understand yet, that's how the USB driver works.So, for frequencies above 150 (maybe even lower), USB is not your guy if you need to get data at regular intervals.I tested different drivers, on different computers, and always got a similar result. Data in burst after a 6ms sampling interval.