hi, i am using labview 2019. i am trying to use tcp/ip for data streaming with target packet sizes of 4096, 8192 bytes that suits my data engine that delivers/ receives data. Data rate required is approx >600 Mbps. So i began with ni example send, receive vi's. Sooner, i realized that smaller packet sizes to larger ones, e.g 512 bytes to 64k, all have an added 200 ms approx delay. i solved the problem by disabling nagle algo. it worked well for smaller packets, but above 8k/16k it gives 200ms delay again. i have created for loop that changes packet sizes on order of 2 from 512 bytes to 64 Mbytes and transmits each packet 50,000 times in a while loop that does nothing else ie transmit on transmitter side and receive on receiver side of 1 Gbps peer-to-peer ethernet connection.
Results varied each time, but they look something like this
512 : 10 Mbps
1024 : 20 Mbps
.
.
.
8192 : 120 Mbps
16384: 150 Mbps
.
.
.
4 MB: 500 Mbps
.
64 MB: 780 Mbps
i also calculated execution time of each transmit loop iteration and plotted same against 50,000 transmissions of each data size. for packets below 16kbytes, peak delay remained at 2-3 ms, max. but when i gave higher sizes than for most cases (not all), i had peak delays of 200 ms, few countable times like 15-30 times per 50,000 iterations with no obvious or common timing gap after which these 200ms spikes arise, whereas other times it was mostly very less like very few ms for smaller packets (eg 32kbytes) to 10-20 ms for very large packets. This is understandable as packet transmission time is related to (packet size in bits + sum total header of ethernet packet in bits) / 1Gbps.
So my question is this,
a. what is causing 200ms delay in larger packets and why not smaller packets. how can it be eliminated? (CPU usage remains very low throughout and same for memory, tried getting rid of extra processes running, but there werent much already etc, labview app running on real-time priority)
b. even for smaller sizes like 1024 bytes or even 8192 bytes, transmission rates of 20 to 120 Mbps are very low. i understand that smaller packet sizes mean more header to payload ratio but still it is far below expectations. how can we improve this?
i have a peer to peer network setup.