Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Sep 2003 20:30:01 -0700 (PDT) Received: from pizda.ninka.net (IDENT:root@pizda.ninka.net [216.101.162.242]) by oss.sgi.com (8.12.10/8.12.10) with SMTP id h8J3TtFx026560 for ; Thu, 18 Sep 2003 20:29:56 -0700 Received: (from davem@localhost) by pizda.ninka.net (8.9.3/8.9.3) id UAA05685; Thu, 18 Sep 2003 20:17:43 -0700 Date: Thu, 18 Sep 2003 20:17:43 -0700 From: "David S. Miller" To: Kristen Carlson Cc: netdev@oss.sgi.com Subject: Re: patricia tries vs. hash for routing? Message-Id: <20030918201743.11d88366.davem@redhat.com> In-Reply-To: <20030918172910.GA22091@sirius.cs.pdx.edu> References: <20030918172910.GA22091@sirius.cs.pdx.edu> X-Mailer: Sylpheed version 0.9.2 (GTK+ 1.2.6; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 50 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev Content-Length: 790 Lines: 17 On Thu, 18 Sep 2003 10:29:10 -0700 Kristen Carlson wrote: > I'm wondering if somebody has already written a patch that replaces the > current routing algorithm (hash) with one that is based on a trie based > algorithm? I'm also wondering if anybody has done any performance > comparisons with very large route tables to see which one scales better? Patricia trees aren't going to help, most of the overhead in the routing lookup is in implementing the various fancy features our routing code supports. For example, equal cost multi-pathing and other such things. The front end routing cache is a straight hash and is thus the fastest way to lookup a route. In the presence of well behaved traffic and routing tables that do not change too often, it is optimal.