Re: [Idr] why has 4096 bytes limit on BGP messages size?
Erblichs <erblichs@earthlink.net> Thu, 14 June 2007 22:25 UTC
Return-path: <idr-bounces@ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com) by megatron.ietf.org with esmtp (Exim 4.43) id 1HyxlB-00011y-4d; Thu, 14 Jun 2007 18:25:45 -0400
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1HyxlA-00011t-HK for idr@ietf.org; Thu, 14 Jun 2007 18:25:44 -0400
Received: from elasmtp-galgo.atl.sa.earthlink.net ([209.86.89.61]) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1Hyxl8-0001nI-3z for idr@ietf.org; Thu, 14 Jun 2007 18:25:44 -0400
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=K4U7gWWeO0v1CnRYNpjX2TPlLh/iwGSnp3ds/SACdLdK79revNpeV6KxuagxVy6g; h=Received:Message-ID:Date:From:X-Sender:X-Mailer:X-Accept-Language:MIME-Version:To:CC:Subject:References:Content-Type:Content-Transfer-Encoding:X-ELNK-Trace:X-Originating-IP;
Received: from [68.164.92.78] (helo=earthlink.net) by elasmtp-galgo.atl.sa.earthlink.net with asmtp (Exim 4.34) id 1Hyxl6-0006I2-Qi; Thu, 14 Jun 2007 18:25:41 -0400
Message-ID: <4671C047.FFB88AAA@earthlink.net>
Date: Thu, 14 Jun 2007 15:25:11 -0700
From: Erblichs <erblichs@earthlink.net>
X-Sender: "Erblichs" <erblichs@earthlink.net@smtpauth.earthlink.net> (Unverified)
X-Mailer: Mozilla 4.72 [en]C-gatewaynet (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Vishwas Manral <vishwas.ietf@gmail.com>
Subject: Re: [Idr] why has 4096 bytes limit on BGP messages size?
References: <20070614105451.9C6C11140496@mail.zjgsu.edu.cn> <20070614135339.GA10519@scc.mi.org> <77ead0ec0706141127i61017d2av74151c7dd4004044@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-ELNK-Trace: 074f60c55517ea841aa676d7e74259b7b3291a7d08dfec793e84ad32fffc3f1b494aed9a4b1fc330350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c
X-Originating-IP: 68.164.92.78
X-Spam-Score: 0.1 (/)
X-Scan-Signature: b280b4db656c3ca28dd62e5e0b03daa8
Cc: idr <idr@ietf.org>
X-BeenThere: idr@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Inter-Domain Routing <idr.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/idr>, <mailto:idr-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/idr>
List-Post: <mailto:idr@ietf.org>
List-Help: <mailto:idr-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/idr>, <mailto:idr-request@ietf.org?subject=subscribe>
Errors-To: idr-bounces@ietf.org
Group, If one decided to pre-allocate fix buffer sizes, then.. What is wrong with a pre-allocating a buffer size of say 128bytes and assume that it will cover 90+% of your needs and on the other 10% of the time, allocate a buffer larger on demand?? I believe this is legacy.. However, if one likes to look at memory allocators then the "Slab Allocator" would be one I would suggest to look at first. Mitchell Erblich ---------------- Vishwas Manral wrote: > > Hi Jeff, > > I had a few doubts. > > > - Messages encoded in some sort of TLV format probably need a full PDU > > kept in memory at the same time. This is because a sane > > implementation will validate the PDU contents against TLV constraints > > (either implied by the TLV or by the protocol) before doing *anything* > > to it. > Are you saying keeping/ allocating a PDU bigger than 4k bytes is a problem? > > > - Having a fixed sized buffer means you can allocate it *once* and be > > done with it. > If I remember correctly what glibc does, it does not make a brk system > call everytime, it itself keeps a pool of memory, and does not give it > back to the OS. I think allocating a few buffers of different sizes > for such a design would help. > > > - You're going to have one of these buffers for each of your peering > > sessions. You don't want it to be large. > Its again a memory management issue of an implementation right. We > could allocate a central pool and extract memory from there. > > Thanks, > Vishwas > > On 6/14/07, Jeffrey Haas <jhaas@pfrc.org> wrote: > > On Thu, Jun 14, 2007 at 06:58:06PM +0800, Fenggen Jia wrote: > > > Then why not other limit,how is 4096 bytes derived, thanks. > > > > It wouldn't shock me if it had to do with the MTU of a FDDI link but > > that's complete speculation. > > > > Aside from the 4k limit, here's some things to keep in mind when writing > > protocols. Mostly IMO: > > - Messages encoded in some sort of TLV format probably need a full PDU > > kept in memory at the same time. This is because a sane > > implementation will validate the PDU contents against TLV constraints > > (either implied by the TLV or by the protocol) before doing *anything* > > to it. > > - Having a fixed sized buffer means you can allocate it *once* and be > > done with it. > > - You're going to have one of these buffers for each of your peering > > sessions. You don't want it to be large. > > - You want the PDU to be "big enough" to be able to transport your > > information usefully. If you're regularly exceeding a 4K message in > > BGP, you're probably not passing around Internet reachability. > > > > -- Jeff > > > > _______________________________________________ > > Idr mailing list > > Idr@ietf.org > > https://www1.ietf.org/mailman/listinfo/idr > > > > _______________________________________________ > Idr mailing list > Idr@ietf.org > https://www1.ietf.org/mailman/listinfo/idr _______________________________________________ Idr mailing list Idr@ietf.org https://www1.ietf.org/mailman/listinfo/idr
- [Idr] why has 4096 bytes limit on BGP messages si… Fenggen Jia
- Re: [Idr] why has 4096 bytes limit on BGP message… Tony Li
- Re: Re: [Idr] why has 4096 bytes limit on BGP mes… Fenggen Jia
- Re: Re: [Idr] why has 4096 bytes limit on BGP mes… Jeffrey Haas
- Re: [Idr] why has 4096 bytes limit on BGP message… Enke Chen
- Re: [Idr] why has 4096 bytes limit on BGP message… Pekka Savola
- Re: Re: [Idr] why has 4096 bytes limit on BGP mes… Vishwas Manral
- Re: [Idr] why has 4096 bytes limit on BGP message… Erblichs
- Re: [Idr] why has 4096 bytes limit on BGP message… Danny McPherson
- Re: [Idr] why has 4096 bytes limit on BGP message… Danny McPherson
- Re: [Idr] why has 4096 bytes limit on BGP message… Erblichs
- Re: [Idr] why has 4096 bytes limit on BGP message… Curtis Villamizar
- Re: [Idr] why has 4096 bytes limit on BGP message… Curtis Villamizar
- Re: [Idr] why has 4096 bytes limit on BGP message… Curtis Villamizar
- Re: [Idr] why has 4096 bytes limit on BGP message… Pekka Savola
- Re: [Idr] why has 4096 bytes limit on BGP message… Curtis Villamizar
- Re: [Idr] why has 4096 bytes limit on BGP message… Curtis Villamizar
- RE: [Idr] why has 4096 bytes limit on BGP message… Susan Hares
- RE: [Idr] why has 4096 bytes limit on BGP message… Susan Hares
- Re: Re: Re: [Idr] why has 4096 bytes limit on BGP… Fenggen Jia
- Re: [Idr] why has 4096 bytes limit on BGP message… Tony Li
- Re: [Idr] why has 4096 bytes limit on BGP message… Curtis Villamizar
- Re: [Idr] why has 4096 bytes limit on BGP message… Vishwas Manral
- RE: [Idr] why has 4096 bytes limit on BGP message… Bhatia, Manav (Manav)