Jump to content

Shared variable transfer speed


Recommended Posts

Hello all!

I resently started a project where i combine LabVIEW 8.2 and the new release of labwindows CVI 8.X.

the labwindows CVI package includes a library wich enables communication between the two trough shared variables (or network variables witch they are called in Labwindows).

My problem is the limited transfer speed i get by using the shared variables. I did several tests where i created a send/receive loop in LabVIEW containing arrays from 0 to 10 MB size. I sendt these arrays fram labview, read them in LabWindows, and wrote the values to another variable adress, witch i again read in labVIEW.

By doing this i got a almost linear increase in the transfer speed from a few kB/s to approx. 3 MB/s (24 Mb/s). and even if i tried larger arrays with 5242880 elements (40 MB), the results where always the same: 3MB/s transfer speed.

I also tried to add more shared variable connections, where the idea was to see if the bandwith where limited to each variable, and thous gain more bandwith by simply adding more connections. But the result stayed the same. 3.xx MB/s, and this seem to be the transfer limit. i tried several different approaches, but the result is always the same: 3MB/s transfer rate.

this test was preformed an a 100Mb/s connection, and i guess a Gigabit connection would give 30MB/s and a 10Mb/s connection would give 0.3MB/s.

So my question is: if there is any way to increase the transfer speed of the shared variables, or if this is a fixed limit witch can't be delt with?

All help or suggestions are appreciated :)

oh and if it is of any use, i can upload the project, and the labwindows code, but im really only after some answers on why the shared variables seem to be limited to 3MB/s (24 Mb/s) on a 100 Mb/s (12.5 MB/s) connection.

Link to comment

QUOTE(xavier30 @ Feb 12 2007, 12:19 PM)

I don't think there's much you can do to raise the limit, other than getting a faster ethernet card... Here's a few suggestions:

-Run the shared variable engine on the faster of the two computers. The engine will take up lots of CPU usage, especially during intensive read/write operations, so I would put that on the faster cpu to make sure the CPU isn't holding you down.

-Are you running this on a network which has other network traffic on it? Other network traffic will significantly slow down the data transfer rate. You'd probably get better results if you had a direct connection between the two.

You can take a look at this article on ni.com regarding shared variables:

http://zone.ni.com/devzone/cda/tut/p/id/4679

If you scroll down to Test T3, they're doing the same test you're trying. They first do a large transfer via TCP/IP VIs from one host to another, then they do the same test using shared variables. The results are interesting... It looks like the data rate starts to cap off at about 1000 DBLs (so 8 Kbytes), and that's operating at about 9-10 MB/s (72-80 Mbps). At the bottom they mention they're using a 1 Gbps connection between an RT PXI Controller and a host PC.

That said, they still recommend in the article to use plain TCP/IP VIs for faster performance -- and, as you can see from their graph, the TCP/IP VIs did much better at around 40 MB/s -- 320 Mbps, which isn't too bad since a lot of the TCP/IP bandwidth is header/handshaking information.

Hope this helps!

Link to comment

QUOTE(Jeff Plotzke @ Feb 13 2007, 03:20 AM)

I don't think there's much you can do to raise the limit, other than getting a faster ethernet card... Here's a few suggestions:

-Run the shared variable engine on the faster of the two computers. The engine will take up lots of CPU usage, especially during intensive read/write operations, so I would put that on the faster cpu to make sure the CPU isn't holding you down.

-Are you running this on a network which has other network traffic on it? Other network traffic will significantly slow down the data transfer rate. You'd probably get better results if you had a direct connection between the two.

You can take a look at this article on ni.com regarding shared variables:

http://zone.ni.com/devzone/cda/tut/p/id/4679

If you scroll down to Test T3, they're doing the same test you're trying. They first do a large transfer via TCP/IP VIs from one host to another, then they do the same test using shared variables. The results are interesting... It looks like the data rate starts to cap off at about 1000 DBLs (so 8 Kbytes), and that's operating at about 9-10 MB/s (72-80 Mbps). At the bottom they mention they're using a 1 Gbps connection between an RT PXI Controller and a host PC.

That said, they still recommend in the article to use plain TCP/IP VIs for faster performance -- and, as you can see from their graph, the TCP/IP VIs did much better at around 40 MB/s -- 320 Mbps, which isn't too bad since a lot of the TCP/IP bandwidth is header/handshaking information.

Hope this helps!

Hi Jeff and thanx for your reply.

I'll look into the use of plain TCP/IP, but i tought the Shared Variables would preform better than TCP/IP since they use NI-PSP or "refined" UDP witch should have a smaller header than the TCP/IP.

Cheers

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.