From owner-freebsd-net@FreeBSD.ORG Wed Apr 8 11:48:24 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78B72106566C for ; Wed, 8 Apr 2009 11:48:24 +0000 (UTC) (envelope-from barney_cordoba@yahoo.com) Received: from web63902.mail.re1.yahoo.com (web63902.mail.re1.yahoo.com [69.147.97.117]) by mx1.freebsd.org (Postfix) with SMTP id 23A2A8FC1B for ; Wed, 8 Apr 2009 11:48:23 +0000 (UTC) (envelope-from barney_cordoba@yahoo.com) Received: (qmail 92696 invoked by uid 60001); 8 Apr 2009 11:48:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1239191303; bh=kdnpCcgWtzdpmadFoMyiWTti7itNG73pQlPd/szdRzg=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=DLsWxNIcUFM8ey1oQQLL8bse7E350lZ/0xyA2WZKAkM1XlJO9uFGeWemnWwrTMqwTna8dz6Vk94bv2BqGR6FtK1x1t2n0c2agBmhCTGsj8/95LR3q0OfqZktx0qRZcbBaH9JZDaxNR1TInKpLsDXwGzMcCQ11AGdUCjImKxcLmk= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=MwA6zm8SrK8bKsSzz/isZzPqqX2mHCNaSGcrybdN0RhLXoByRuFEZlHp/LUBaGVaTfItCrvDKYcAx4Z4ZomlzvxZMFPTXxzm41aIp5QAi475k66L8dBOPdRIj+nNRV4My1IVVmXVwO2+5zHw38rhcE/1hXMmpQBnXTOenxUSSTk=; Message-ID: <477001.91824.qm@web63902.mail.re1.yahoo.com> X-YMail-OSG: o_IEk9YVM1kTpayy3hf6OZf.0yGuAbFpXxpD1EhQlzTxpyJuFQIdDofcQW9VQjupgQQB46dwI9g7z8HOB0rDs5KNx3aWDcwqOozsxCfLAw8NiB2cTcA7x5.VSNfVQ7ksdVzKvZ.qGunr.YW7v0qFccFdfHIHgGg9gR5aF57QM.YyIbMQSPRGFD7DBcjzqthixMlTHU3oMS2tyzi8dr91paH1Hql9xQS1MimOZPeKcTdrTwyi64VvUESTsr8aWeQqQ3X9lbXsy55Yk0rSWqbZPycJfZTo7TCSOHx0HCxZnLMkOu79ZrkLlbFdR.yr Received: from [98.242.222.229] by web63902.mail.re1.yahoo.com via HTTP; Wed, 08 Apr 2009 04:48:23 PDT X-Mailer: YahooMailWebService/0.7.289.1 Date: Wed, 8 Apr 2009 04:48:23 -0700 (PDT) From: Barney Cordoba To: "H.Fazaeli" In-Reply-To: <49DC3961.8090707@sepehrs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-net@freebsd.org, Ivan Voras Subject: Re: Advice on a multithreaded netisr patch? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: barney_cordoba@yahoo.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2009 11:48:24 -0000 --- On Wed, 4/8/09, H.Fazaeli wrote: > From: H.Fazaeli > Subject: Re: Advice on a multithreaded netisr patch? > To: barney_cordoba@yahoo.com > Cc: freebsd-net@freebsd.org, "Ivan Voras" > Date: Wednesday, April 8, 2009, 1:42 AM > Barney Cordoba wrote: > > > > > > --- On Tue, 4/7/09, Ivan Voras > wrote: > > > > > >> From: Ivan Voras > >> Subject: Re: Advice on a multithreaded netisr > patch? > >> To: freebsd-net@freebsd.org > >> Date: Tuesday, April 7, 2009, 5:59 PM > >> Barney Cordoba wrote: > >> > >> > >>> 1) Multiple TX queues are not supported. > There's > >>> > >> some hokey code to > >> > >>> test, but it doesn't properly separate > flows to > >>> > >> the queues. > >> > >>> 2) 2 Rx queues don't work, so only 1 and 4 > work > >>> 3) With 4 queues, it just sucks up CPU under > heavy > >>> > >> load on 4 cpus. It will > >> > >>> blow 4 cpus at a lower load than em will with > 1 > >>> 4) You'll need to fix DMA setup, as it > sets the > >>> > >> alignment requirement > >> > >>> to PAGE_SIZE. I haven't been able to > convince Jack > >>> > >> that its wrong, not > >> > >>> that I've tried very hard since its easy > to just > >>> > >> fix myself. > >> > >> Reading this thread it looks like the development > of both > >> Intel drivers > >> is a bit stalled, doesn't it? AFAIK the em > driver is > >> also > >> semi-officially abandoned, and both from my > experience and > >> others it > >> looks like new development and patches are being > rejected. > >> Time to shop > >> other hardware? > >> > > > > To be fair, the OS doesn't really support > multiqueue yet, or has > > for only a few hours, so lets not go crazy. > > > > It makes a lot more sense to have someone on the > "team" work with > > Jack on improving the performance and working out the > kinks. When > > I asked Jack about the poor performance of if_igb, he > indicated that > > Intel's position is that the drivers are > "just samples", which really > > doesn't give anyone much confidence that they want > to run their business > > on them. You already have Jack doing all of the hard > work; that is > > supporting the new-chip-per-week that intel puts out, > so it seems to > > me the best strategy would be to try to convince Intel > that its in > > their best interest to have drivers that work well so > people don't > > think that their hardware stinks. > > > > As an example, the Chelsio 10gb bypass card is $3495. > and an Intel > > card is ~$1000, so its a big win for the community as > a whole to have > > good intel drivers going forward. > > > > My work is commercially proprietary so I can't > share my code, but > > I can certainly share ideas on things that I've > tested and discovered. > > > > > can you provide more details on the improvements you > achieved? > > > Barney > > > > > > > > _______________________________________________ > > freebsd-net@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-net > > To unsubscribe, send any mail to > "freebsd-net-unsubscribe@freebsd.org" > > > > > > -- As all developers konw, programming is 90% learning and 10% code. So far, I've implemented multiqueue for 7.x and gotten everything to work for both igb and ixgbe. igb isn't all that interesting since em can easily handle 1 Gb/s; so ixgbe is really the goal. The igb and ixgbe are similar designs so the work is somewhat parallel. As of now, I'm working on separating the theory from the real world and getting a feel for which design techniques work best. I'm also *not* designing for a system that uses the stack (a filtering firewall type system), so the things that Robert talks about apply differently. A web server, for example, will likely only have 1 controller and will have many user threads; while a router or firewall will have 2 equally loaded NICs with few if any user threads. Its quite likely that completely different approaches are needed to optimize each. I'm at the point of testing design approaches. So the jury is out as what what can be achieved. What I can say is that multiqueue isn't a panacea or even desirable if its not designed correctly. Out of the box, increasing the number of queues just to "spread interrupts" doesn't seem to have any advantage; in fact it seems to make things worse in terms of utilization. I'm not entirely sure why as of yet. Barney