From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 23:11:53 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC85316A417 for ; Thu, 2 Nov 2006 23:11:53 +0000 (UTC) (envelope-from devon.odell@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6780343D75 for ; Thu, 2 Nov 2006 23:11:51 +0000 (GMT) (envelope-from devon.odell@gmail.com) Received: by nf-out-0910.google.com with SMTP id p77so1159148nfc for ; Thu, 02 Nov 2006 15:11:50 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=OXi0RL7eEIiF+lzFKMnN4mygTkaLLHmK/g/WZbAVaNxRv7WK5R2zWkq6PUPiElu5s8oY09kfo7AD31SktWUifrNes7OpbZAzbPDQcbMlZOmbhY9rvmxo/JQbvG1wl+N08O8TjthDPYeEX754NjjfCJFlO+HZ7saEvNKFsOO59fc= Received: by 10.82.105.13 with SMTP id d13mr524304buc.1162509061043; Thu, 02 Nov 2006 15:11:01 -0800 (PST) Received: by 10.82.136.13 with HTTP; Thu, 2 Nov 2006 15:11:00 -0800 (PST) Message-ID: <9ab217670611021511l3120d58bhd0b61bf44f8ecc87@mail.gmail.com> Date: Thu, 2 Nov 2006 18:11:00 -0500 From: "Devon H. O'Dell" To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: vr(4) performance X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Nov 2006 23:11:53 -0000 Hey all, So, vr(4) kind of sucks, and it seems like this is mostly due to the fact that we call m_defrag() on every mbuf that we send through it. This seems to really screw performance on outgoing packets (something like 33% the output efficiency of fxp(4), if I'm understanding this all correctly). I'm sort of wondering if anybody has attempted to address this before and if there's a way to possibly mitigate this behavior. I know Bill Paul's comments say ``Unfortunately, FreeBSD FreeBSD doesn't guarantee that mbufs will be filled in starting at longword boundaries, so we have to do a buffer copy before transmission.'' -- since it's been a long day, and I'm about to go home to grab a pizza and stop thinking about code, would anybody mind offering suggestions as to either: a) Pros and cons of guaranteeing that they're filled in aligned (and possibly hints on doing it), or b) Possible workarounds / hacks to do this faster for vr(4) Any input is appreciated! (Except ``vr(4) is lol'') Kind regards, Devon H. O'Dell