Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Network Buffering Question


  • Please log in to reply
4 replies to this topic

#1 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 03 February 2011 - 07:51 PM

I've just been writing up the Sliverlight code I have recently written and doing so caused me to question one of my design decisions. I decided that given the limited resources (i.e. memory) on the N+ I would send data to the browser in 256 byte chunks. On reading this code It caused me to recall my TCP/IP network training which stated that TCP packets were about 1.7Kbytes. My question is, am I being too conservative and would I be better sending the data in say 1.5Kbyte chunks? Alternatively, is my memory failing and I'm having a grey moment :rolleyes: Thanks in advance, Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 03 February 2011 - 08:55 PM

Hi Nevyn, You're probably alright with both. I would try both, and see which one gives you better performance. TCP packets are about 1.5KB, but the data is also buffered internally. Chris

#3 Illishar

Illishar

    Advanced Member

  • Members
  • PipPipPip
  • 146 posts

Posted 04 February 2011 - 08:25 AM

The MTU (Maximum Transmission Unit) is often around 1500. It would be nice to know the exact value for the Netduino though.

#4 Jarrod Sinclair

Jarrod Sinclair

    Advanced Member

  • Members
  • PipPipPip
  • 50 posts
  • LocationSF Bay Area, CA

Posted 05 February 2011 - 10:42 PM

I've just been writing up the Sliverlight code I have recently written and doing so caused me to question one of my design decisions. I decided that given the limited resources (i.e. memory) on the N+ I would send data to the browser in 256 byte chunks. On reading this code It caused me to recall my TCP/IP network training which stated that TCP packets were about 1.7Kbytes.

My question is, am I being too conservative and would I be better sending the data in say 1.5Kbyte chunks?

Alternatively, is my memory failing and I'm having a grey moment :rolleyes:

Thanks in advance,
Mark


If you want to make sure the Netduino (or another other device along the way) is not fragmenting your packets then set your data segments size to 1452. With overhead (48 bytes for TCP and IP headers ) this will result in a packet size of 1500 and your packets should not fragments as they go our over the internet. If you notice fragmentation (drop in performance or using network tools you see it) then drop your segment to 1444 and then your MTU will be 1492 and should support even legacy devices in your network path.

FYI - If you want to see if your getting fragmentation using tools ten you can get wireshark for free. Once installed on your computer you will either have to send traffic to / from the device from the computer that has wireshark installed and running or use an old ethernet ***HUB*** (not a switch) and the you can capture the packets going between the netduino and a separate web-server / client

#5 nlatin

nlatin

    New Member

  • Members
  • Pip
  • 3 posts

Posted 23 December 2013 - 04:25 PM

How to change mtu size? I am using gsiot library?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.