[Ndn-interest] NDN packet size

Alex Horn nano at remap.UCLA.EDU
Tue Mar 28 15:30:22 PDT 2017


I will also add that if you're doing UDP, and want consistency over the
existing internet - I'd suggest 4k, as any UDP packets larger than that
risk being filtered by existing IP-based systems

IE - early testbed ndnvideo app box would not route to UIUC app box unless
packet size was 3800 bytes (enough for 4k overhead)



On Tue, Mar 28, 2017 at 4:56 PM, Junxiao Shi <shijunxiao at email.arizona.edu>
wrote:

> Hi Klaus
>
> The setting of 8800 octets is indeed based on the reasons given by Nick
> Briggs, which he posted to CCNx mailing list years ago. But that doesn't
> answer why 8800 octets is a limit in the code rather than a recommendation.
>
> The reason for having the practical limit is to reduce memory usage.
> To receive a packet via socket API, NFD needs to allocate a buffer before
> asking the kernel to copy the packet into this buffer. Since the packet
> size is unknown at that time, NFD allocates a buffer of 8800 octets.
> After the packet is received, assuming it is not fragmented by NDNLP, the
> buffer stays around as long as the packet is needed (in PIT or CS), even if
> the packet is much smaller than 8800 octets. The alternative would be
> truncating the buffer to fit the actual packet size, but that involves
> another copying, and we decide to save a copying at the expense of wasting
> some memory (the difference between 8800 octets and the actual packet size).
> Suppose we increase the practical limit to 1MB, NFD would allocate a 1MB
> packet before receiving a packet. If most packets we are dealing with is
> much smaller than 1MB, a lot of memory will be wasted.
>
> Yours, Junxiao
>
> On Tue, Mar 28, 2017 at 2:40 PM, Nick Briggs <nicholas.h.briggs at gmail.com>
> wrote:
>
>> It gets you 8K bytes of data along with necessary metadata and a name
>> that isn't too long in a Content packet.
>> It can be encapsulated in a UDP packet with about 6 fragments when you're
>> do IP encapsulation. (max UDP is 64K bytes)
>> It fits within a 9000 byte jumbo ethernet frame if you're doing direct
>> ethernet encapsulation.
>>
>> -- Nick Briggs
>>
>
> On Tue, Mar 28, 2017 at 2:35 PM, Klaus Schneider <klaus at cs.arizona.edu>
> wrote:
>
>> Btw, what was the reason for setting the default max packet size to 8800
>> in the first place?
>>
>> Is there any drawback to increasing the default, to let's say 1 Megabyte?
>>
>> Best regards,
>> Klaus
>>
>
> _______________________________________________
> Ndn-interest mailing list
> Ndn-interest at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndn-interest/attachments/20170328/ce30f334/attachment.html>


More information about the Ndn-interest mailing list