Ps4000 max throughput in streaming mode

Post your C and C++ discussions here
Post Reply
docjordan
Newbie
Posts: 0
Joined: Tue Jun 09, 2015 6:55 pm

Ps4000 max throughput in streaming mode

Post by docjordan »

Hello

I'm trying to optimize the streaming througput for a PS4224
program is based on the PS4000_console sample file.
basically it just adds a thread wrapper around ps4000GetStreamingLatestValues with prio THREAD_PRIORITY_HIGHEST.
2 channels with no aggregation (downsample ratio 1)
no further processing of the data. simply to memory

on an almost 9yeas dual core (2.4Ghz) Windows XP I get around 520KS. this is OK. CPU load is 40%
but on a brand new machine 3Ghz core i7 quadcore windows 8.1 64bit, I get around 270ks.
Of course the code is the same (32bit win32). I played around with buffer sizes, but does not have that impact

Any ideas?

Frank

docjordan
Newbie
Posts: 0
Joined: Tue Jun 09, 2015 6:55 pm

Re: Ps4000 max throughput in streaming mode

Post by docjordan »

Hello,

I found it myself. I assumed that a captured blocksize of around 5000-15000samples should be sufficient to get full throughput. This is not the case especially on windows 8. If you put sleeptimes of around 200ms, then you get throughputs to 2MS (more might be possible, but I did not test it, because I'm also limited by my DSP features to 500ks.
A few words in the user manual about recommended block size would help. There will be an max blocksize, where further sizes have no impact on the througput, just on the delay, and maybe on the CPU load. But also a blocksize
where you get a significant lower througput. It also depends on the OS and number of CPUs
Such table would be extremly useful, because with such large blocksizes, I will need a differnt buffering architecture for my DSP code for optimum performance. Such table in the user manual could save a lot of engineering time.....

Frank

Hitesh

Re: Ps4000 max throughput in streaming mode

Post by Hitesh »

Hi Frank,

You are correct in that the overview buffer size needs to be sufficiently large enough to retrieve data from the device each time that the callback function is called.

We recommend a buffer size large enough to accommodate the data that is collected during each iteration of the loop that calls the ps4000GetStreamingValues function. This will be based on the time of execution of the loop and the sampling rate that is set. Setting too large a buffer size, as you have mentioned, may not be efficient.

We will look to see what information we can provide to help in the future.

Best wishes,

Post Reply