How to properly calculating the throughput in PCIe

Questions and discussions about the Xillybus IP core and drivers

How to properly calculating the throughput in PCIe

Postby mohdamir »

Hi Eli and all,

I use Xillybus and Xilinx VC707. There are two streams; and it just a loopback at the moment. What I want to calculate is the throughput for each direction, both directions and total throughput if I put my design in the middle.

My first reference is from the Xillybus' page itself: http://xillybus.com/doc/bandwidth-guidelines. But I am not quite sure about this.

What I've done is putting a clock tick for write/read using clock() (in the <time.h> function). I use C code in Windows btw. And this code also involve writing to a disk (using malloc to store the reading and fwrite to write to a file).

I just want to make a clarification, are these the correct results of what I have obtained for a loopback (of each different filesize)?

filesize; write; read
--------; ------; -----;
1 MB; 60 MBps; 60 MBps
2 MB; 130 MBps; 130 MBps
4 MB; 260 MBps; 260 MBps
8 MB; 420 MBps; 530 MBps
16 MB; 430 MBps; 1000 MBps
33 MB; 380 MBps; 1100 MBps
55 MB; 380 MBps; 1200 MBps
130 MB; 340 MBps; 1270 MBps
214 MB; 304 MBps; 1250 MBps
439 MB; 215 MBps; 1250 MBps

Then, how do I get the throughput for both directions? Is that just taking the lowest throughput to represent the 'whole throughput' in the loopback?

For example, taking 130 MB, should the throughput for both direction is 340 MBps, or something else? If something else, could you give me a hint/reference to obtain these.

And finally, I will break these two FIFOs and connect them with my design, and let say my design produce a throughput of 400 MBps, how do I calculate the whole throughput for my system?
Because I got (for 130 MB filesize): 340 MBps + 400 MBps + 1270 MBps. So how do I calculate the whole throughput.

Thanks for your answer.

Xillybus is great.
mohdamir
 
Posts: 15
Joined:

Re: How to properly calculating the throughput in PCIe

Postby support »

Hello,

It's a bit unclear what you've been doing, and why you're interested in measuring throughput. The demo bundle for VC709 gives you 800 MB/s simultaneously in each direction.

Since you referenced that page on Xillybus' website -- you're aware that you've broken rule 1 and 2 given there? Looping back is not going to give you a result you can relate to, and involving the disk can give you pretty random results, depending on the state of the Windows' disk cache.

Besides, POSIX' clock() measures consumed CPU time, not wall-clock time. So it's not clear why you're using that. You probably want to use clock_gettime() with CLOCK_MONOTONIC. See https://blog.habets.se/2010/09/gettimeo ... -time.html

And if you've looped back, there is no way that the throughput in one way is different from another. Maybe because of the use of clock().

So I suggest taking a closer look on the guide you referenced. It will save you some work.

Regards,
Eli
support
 
Posts: 802
Joined:


Return to Xillybus