ols icon indicating copy to clipboard operation
ols copied to clipboard

Buffer Overflow and High CPU Usage with Serial Port bit rates above 115.2k

Open markusgritsch opened this issue 13 years ago • 5 comments

When using 460800 bps for the serial connection, and selecting the maximum of 262016 samples as the recording size, the transfer via an FT232 adapter takes about 6 seconds. However, during this time OLS needs 100% CPU usage, records only a bit less than half of the expected data and stalls then.

Details: http://dangerousprototypes.com/forum/viewtopic.php?t=4265&p=45735#p45683

markusgritsch avatar Nov 08 '12 07:11 markusgritsch

I think the author of PureJavacomm is concocting a fix as I see from its commit logs. As mentioned on the forums, I'll try to reproduce it myself using the current and the latest greatest version of PureJavacomm...

jawi avatar Nov 12 '12 11:11 jawi

Great! Looking forward to it.

markusgritsch avatar Nov 12 '12 11:11 markusgritsch

This fix greatly improves the performance. It seems to be restricted only by the transfer speed the logic sniffer device can provide now. I have a device which can transfer the data at about 500 kB/s and was able to transfer 256 kSamples in about 0.6 seconds, with a negligible CPU usage of the OLS client.

markusgritsch avatar Dec 14 '12 08:12 markusgritsch

Alas, I notices a regression in the transfer speed when using a newer snapshot: With an older snapshot (2013-03-13) transferring of 256 kB takes 0.46 seconds. Using the current snapshot (2013-06-05) yields a transfer time of 1.63 seconds.

markusgritsch avatar Jun 07 '13 08:06 markusgritsch

See: https://github.com/nyholku/purejavacomm/issues/32

jawi avatar Jun 23 '13 21:06 jawi