AnsweredAssumed Answered

IIO Buffer read delay

Question asked by chrislogic on Jul 19, 2016
Latest reply on Aug 3, 2016 by pcercuei

We are trying to achieve a high speed file write (50MB/s + ) to SSD  which comprises of raw ADC data acquired through libiio.

We are using libiio function ‘iio_buffer_refill’ to get the number of bytes written and the pointer to block of ADC data.

Now the system bottlenecks when trying to write this block of data to SSD.  The pseudo code is 

 

 

bytesfetched = iio_buffer_refill(rxbuf)

bufferlocation = iio_buffer_start(rxbuf);

write(ssd_file_fd, bufferlocation, bytesfetched);

 

If I keep the buffer refill as it is but just write dummy data to SSD, I am able to achieve (100MB/s +) write speed to SSD

So if I do –

 

bytesfetched = iio_buffer_refill(rxbuf);

bufferlocation = iio_buffer_start(rxbuf);

/* Dummy data write */

dummy_buff = malloc(bytesfetched);

write(ssd_file_fd, dummy_buff, bytesfetched);

 

In both cases, amount of data written is same but the performance of first does not reach more than 30-40 MB/s

 

So how could we ensure that we get the same level of performance (100 MBps +) while writing data from pointer returned by the iio library.

 

Linux version     - 3.17.0    SMP PREEMPT armv7l Xilinx Zynq Platform GNU/Linux

IIO library version - Library version: 0.5 (git tag: 1b627d8)

Hardware platform -    Zynq 7030 Picozed + AD9364

Outcomes