On 05/13/2016 02:45 AM, [email protected] wrote:
> Hi,
>
> Is there any way of getting bigger speeds when sending small chunks of data 
> (~50bytes)?
>
> About my BBB:
>
> Rev: C.
> Kernel version: 3.8.13-bone70.
> Distribution: Debian.
>
> Scenario 1: looping big data chunks (4094 bytes):
>
> Baud rate set to 1500000 with: stty -F /dev/ttyO4 1500000.
> When I send (using write()) a buffer of 4094 bytes of data, and immediately 
> after I read it (using read()), and count the number of loops for one second, 
> I get around 160000 bytes (this means a throughput of ~1.3 Mbps).

Something's wrong with your test jig.

1.5Mbaud includes start bit & stop bit so each char frame is 10bits.
Thus max throughput is 150Kchars/sec.


> Scenario 2: looping smaller data chunks (68 bytes):
>
> Same baud rate, same method, I get around 30000 bytes in one second (~0.24 
> Mbps).
>
> How can I achieve bigger speeds when reading small data chunks?
>
> Is this test that I made relevant? (would be different if using another 
> device that sends me data on UART (1500000 baud and aprox. 1.5 Mbps 
> throughput)?)

There's a limit to how many syscalls/sec are possible and further limited by 
locks and atomics in the read() syscall for ttys.
A smaller read buffer will _always_ produce less throughput.  Newer kernels 
will have better read() throughput though.


Regards,
Peter Hurley

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/573626AD.2000908%40hurleysoftware.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to