Understanding the LAN traffic issues
2013-04-23 17:25:24| 分类：
The image data are streamed from the host (GigE Camera) to client (PC) using the UDP protocol.
In case some of the packets is not delivered in time, it is lost — the client does not ask for it again, because such handshaking would increase significantly the network traffic and would introduce unwanted delays.
Normally, the packets are lost only in case there is some bottleneck or overflow on the network path.
One typical example is a wireless connection on the path. It has a lower bandwidth than the rest of the LAN. However, the host (GigE Camera) is not aware of it (it can determine only the speed to the nearest port), so it simply tries to stream out the data as fast as possible, which can lead to the buffer overflow on the wireless gate. This kind of problem can be fixed by introducing an inter-packet delay, which reduces the bandwidth.
Note that the streaming with the reduced bandwidth need not have an impact to the image data delivery if the transfer is still fast enough to transfer all the image data before the next image is acquired. For example, if the camera is triggered, and thus has long time gaps between frames, the increase of the inter-packet delay can solve the problem without any side effects.
Another problem can occur when acquiring simultaneously from multiple cameras connected to single NIC through a switch, namely if they are all triggered at the same time. When the cameras start stream out the packets at the same time, the switch must serialize the packets to one output line. The capability of doing this depends on the switch internal construction and thus is different for various manufacturers and models. The main factor influencing this is the size of the memory buffer dedicated for each port. The higher is the amount of the memory, the better.
For example, the 8-port switch has 144 kB of memory equally split between the ports, so one port has 18 kB of memory. When using a streaming packet size of 9 kB, only 2 packets fit to the buffer. In case 3 cameras send a packet to the input ports at the same time, the switch must transfer 3 packets to the output port, and this (depending on the switch construction) can fail due to the memory on the output port not capable to hold all 3 packets (27 kB). The solution in such case would be to use a smaller packet size, for example 5.9 kB, so that all 3 packets fit in. Another problem can happen, if the outgoing line is too slow to send out all the packets before new 3 packets come from the cameras — then it is necessary to reduce the bandwidth by increasing the inter-packet delay, as already explained.
As mentioned, due to the internal construction of the switches, the capability of the switches to manage such critical situations differs from switch to switch.