Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Question: UDP, TCP transmission while image is larger than 255x255

Hi,
I have asked this question on 9/15.
So far, I still cannot get any solution.
The problem I have is the following:
I am using TCP/IP in labview to transmit real-time uncompressed images. The image size is 640x480. The transmission is very slow (0.7 fps) under a 100Mbps "Intranet" (only connect between two PCs). Then, I find that if I reduce the image size to 255x255, the transmission boosts up to 16 fps. The ratio between two different sizes is 5; but the speed is 20 times faster. I wonder what causes this dramatically increase.
Also, I tested with UDP later. I find a similar situation. If the image I transmit is larger than 255x255, the UDP cannot receive the data correctly. (I am sure
there is no error during the transmission since we hard-wire cable between two PCs.) If I divided my image into small portions (each part is fewer than 255x255), everything works and it can transmit up to 32 fps (it almost utilizes 80 Mbps out of 100Mbps).
Can any technical support people provide me any valuable suggestion please? This question has been sit there for almost two weeks. Thanks! BTW, I can also provide sample code if any one needs to see it.

Shawn
0 Kudos
Message 1 of 3
(3,680 Views)
Hi Shawn,

I noticed your other post but have been busy at work (I only answer Q's in my spare time).

Check out the thread below for alot of talk about optimizing ethernet throughput.

There is something called the "Nagle algorithm" (sp?) that goes like this.

Ethenet packets are not nessesarily sent when you request. The are allowed to pile up until enough data available to make optimal use of the network. If the pile does not get big enough in a fixed amount of time, the TCP stack will time out and send the less than optimal packet.

This option can be shut off,
or
you can take this fact into concideration and make sure you are transmitting packets of optimum size.

http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506
50000000800000007BE0000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0&USEARCHCONTEXT_INCLUDE_0=ben+ethernet&USEARCHCONTEXT_INCLUDE_S=0&UPostedFromTimeSearchArg_0=29&UPostedFromTimeSearchArg_1=3&UPostedFromTimeSearchArg_2=2001&UPostedFromTimeSearchArg_S=4&UPostedToTimeSearchArg_0=25&UPostedToTimeSearchArg_1=9&UPostedToTimeSearchArg_2=2004&UPostedToTimeSearchArg_S=4&USEARCHCONTEXT_TIER_0=2&USEARCHCONTEXT_TIER_S=0

RE:UDP
UDP does not guarentee that a packet will be delivered
or
that it will transmit packets in the order you send them.

I think of UDP as advertising or junk mail. You have to keep sending the same thing over and over if you want to get your message out.

Typical uses for UDP would be announcing a node is available to serve a printer.

I hope this helps,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 3
(3,680 Views)
Have you seen this KB?

http://digital.ni.com/public.nsf/websearch/7EFCA5D83B59DFDC86256D60007F5839?OpenDocument

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 3
(3,680 Views)