Dear Sir,
I am sending the data through UDP from MOD5282 to the server program running on windowsXP. now when i keep the packetsize of 1457 bytes ( maxmimum i could set),it works well. because 1457+(20 of ip+14 of ehternet+8 of udp) =1499. which is defined in constatnts.h file AS follow,
ETH_BUFFER_SIZE 1548
ETH_MAX_SIZE 1500
ETH_MIN_SIZE 48
MAX_UDPDATA (ETH_MAX_SIZE-(20+14+8) .
Now, i want to send more than the 1457 byttes in a single packet. i have tried this to set as 1557 but server recievs all as zero. i.e. wrong data. so,can u please suggest me whoat should i do? what are the changes i have to make in an appropriate header file?
i could not get the max rate more then 27 Mbps. how can i acheive this? kindly guide me to achieve this. Thank you all.
how to maximize the packet size in tcp/udp?
-
- Posts: 19
- Joined: Fri Dec 12, 2008 2:54 am
Re: how to maximize the packet size in tcp/udp?
I think fragmenting packets will slow down the overall performance. Keep the UDP packet size at 1457 and send multiple packets.
Re: how to maximize the packet size in tcp/udp?
Hi,
The maximum Ethernet frame size is 1514 bytes, this is defined in the IEEE 802.3 specification. This is not just a limitation for NetBurner devices but for all network devices that use standard frame sizes. Newer Gigabit devices sometimes support Jumbo Frames which can be much larger but all switches and devices on the network that use these frames must have hardware that supports it. The MAX_UDPDATA definition is the most UDP data that can fit in a single packet, this is a hardware limitation and there is no software that can change this.
The 27Mbps rate seems a bit low. I posted a benchmark application in a different thread that runs a UDP test.
http://forum.embeddedethernet.com/viewt ... ?f=5&t=235
Transmitting UDP packets I was able to get a throughput in the 90Mbps range, you can use wireshark on the receiving PC to confirm this. You will not be able to run this benchmark application unless you are using 2.2 or higher. I would upgrade to the newest build if possible since we have consistently been adding performance enhancements to the NNDK. I also suggest looking through the SRAM performance application note:
http://www.netburner.com/downloads/nndk ... rmance.pdf
You should experiment with some of the SRAM settings to see if they boost your performance. For example I found that adding the idle stack to SRAM will boost UDP by about 10% in the benchmark but it will decrease TCP by about 10%. You also should try adding any user task stacks or small global variables to SRAM.
-Larry
The maximum Ethernet frame size is 1514 bytes, this is defined in the IEEE 802.3 specification. This is not just a limitation for NetBurner devices but for all network devices that use standard frame sizes. Newer Gigabit devices sometimes support Jumbo Frames which can be much larger but all switches and devices on the network that use these frames must have hardware that supports it. The MAX_UDPDATA definition is the most UDP data that can fit in a single packet, this is a hardware limitation and there is no software that can change this.
The 27Mbps rate seems a bit low. I posted a benchmark application in a different thread that runs a UDP test.
http://forum.embeddedethernet.com/viewt ... ?f=5&t=235
Transmitting UDP packets I was able to get a throughput in the 90Mbps range, you can use wireshark on the receiving PC to confirm this. You will not be able to run this benchmark application unless you are using 2.2 or higher. I would upgrade to the newest build if possible since we have consistently been adding performance enhancements to the NNDK. I also suggest looking through the SRAM performance application note:
http://www.netburner.com/downloads/nndk ... rmance.pdf
You should experiment with some of the SRAM settings to see if they boost your performance. For example I found that adding the idle stack to SRAM will boost UDP by about 10% in the benchmark but it will decrease TCP by about 10%. You also should try adding any user task stacks or small global variables to SRAM.
-Larry
Re: how to maximize the packet size in tcp/udp?
I just realized you are the same person I originally posted the benchmark application for in the other thread. Have you been able to run this application on your NetBurner? To see your NNDK version look at the following file in a text editor:
C:\nburn\release_tag
You said you are running version 1.2 but that sounds like a DevC++ revision, not the NNDK revision. At NNDK2.0 the IDE switched from DevC++ to Eclipse along with many other major changes to the compiler. I highly suggest you upgrade any version under 2.2, especially since you require the boost in network speeds. There is a support package available through the NetBurner store that comes with a year of email support and software upgrades. All development kits also come with a support package though they are shorter duration.
-Larry
C:\nburn\release_tag
You said you are running version 1.2 but that sounds like a DevC++ revision, not the NNDK revision. At NNDK2.0 the IDE switched from DevC++ to Eclipse along with many other major changes to the compiler. I highly suggest you upgrade any version under 2.2, especially since you require the boost in network speeds. There is a support package available through the NetBurner store that comes with a year of email support and software upgrades. All development kits also come with a support package though they are shorter duration.
-Larry
-
- Posts: 19
- Joined: Fri Dec 12, 2008 2:54 am
Re: how to maximize the packet size in tcp/udp?
Thank you sir,
i will use this benchmark application note and will reply with the NNDK version and the achieved rate. but still i am in dilema, why the UDP rate i am getting currently is 27 Mbps. i am just creating a packet once,and sending it 10k times.
what are the parameters, which are affecting the max. throughput.? is there any changes required on PC side?
i will use this benchmark application note and will reply with the NNDK version and the achieved rate. but still i am in dilema, why the UDP rate i am getting currently is 27 Mbps. i am just creating a packet once,and sending it 10k times.
what are the parameters, which are affecting the max. throughput.? is there any changes required on PC side?
Re: how to maximize the packet size in tcp/udp?
If the NetBurner is simply transmitting UDP to the PC and is not waiting for any responses then the PC can not be limiting your bandwidth. If the NetBurner sends UDP faster then your PC can process or read the data you will simply loose packets. TCP is a different story and there is always two way communication when transmitting packets so either side can be slowing the connection.
The NNDK version is very important for bandwidth because there have been major changes to the way RAM is allocated on the NetBurner. In NNDK versions before 2.2 all data was stored on the SDRAM. NNDK2.2 and higher now make use of the 64K of on-chip SRAM for certain task stacks, system variables and network buffers. This on-chip SRAM can access a 32-bits of data in a single CPU clock cycle where the SDRAM takes can take 10 fold more time. More performance is gained by the fact that the Ethernet peripheral has its own DMA engine. This allows the Ethernet to send/receive data from/to SRAM at the same time as the CPU is accessing SDRAM or vice-versa. This was not possible when all the data was in SDRAM since only one bus master can access the external SDRAM at a time.
I suspect that you are using an old version (pre-2.2) of the NNDK on the MOD5282. When I run the benchmark tests for UDP without using on-chip SRAM, I get about 27Mbit throughput which is what you are seeing. Once I go back to the default NNDK settings with SRAM enabled, I get in the 75-80Mbit range for UDP throughput. The throughput gets even higher for the 150MHz products. The changes that were involved to make the SRAM allocation work are pretty complicated. Changes can be found in nearly every major system source file, linker script and even the crt files. You really need to upgrade to a NNDK version 2.2 or higher if you require these higher bandwidths for your application. Also note that NetBurner products were never advertised to surpass 20-25Mbit bandwidths until a few months ago. This was way after the performance enhancements were added to the NNDK. We always do our best to inform our potential and current customers of the real world capabilities of our products. Before you upgrade, I suggest you contact sales with a list of your performance requirements. This will ensure that the NetBurner platform you are using is capable of meeting your specs with the latest NNDK.
-Larry
The NNDK version is very important for bandwidth because there have been major changes to the way RAM is allocated on the NetBurner. In NNDK versions before 2.2 all data was stored on the SDRAM. NNDK2.2 and higher now make use of the 64K of on-chip SRAM for certain task stacks, system variables and network buffers. This on-chip SRAM can access a 32-bits of data in a single CPU clock cycle where the SDRAM takes can take 10 fold more time. More performance is gained by the fact that the Ethernet peripheral has its own DMA engine. This allows the Ethernet to send/receive data from/to SRAM at the same time as the CPU is accessing SDRAM or vice-versa. This was not possible when all the data was in SDRAM since only one bus master can access the external SDRAM at a time.
I suspect that you are using an old version (pre-2.2) of the NNDK on the MOD5282. When I run the benchmark tests for UDP without using on-chip SRAM, I get about 27Mbit throughput which is what you are seeing. Once I go back to the default NNDK settings with SRAM enabled, I get in the 75-80Mbit range for UDP throughput. The throughput gets even higher for the 150MHz products. The changes that were involved to make the SRAM allocation work are pretty complicated. Changes can be found in nearly every major system source file, linker script and even the crt files. You really need to upgrade to a NNDK version 2.2 or higher if you require these higher bandwidths for your application. Also note that NetBurner products were never advertised to surpass 20-25Mbit bandwidths until a few months ago. This was way after the performance enhancements were added to the NNDK. We always do our best to inform our potential and current customers of the real world capabilities of our products. Before you upgrade, I suggest you contact sales with a list of your performance requirements. This will ensure that the NetBurner platform you are using is capable of meeting your specs with the latest NNDK.
-Larry