From owner-freebsd-net@FreeBSD.ORG Wed Oct 29 13:34:08 2008 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 12CBD10656DC for ; Wed, 29 Oct 2008 13:34:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id 946728FC13 for ; Wed, 29 Oct 2008 13:34:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from orphanage.alkar.net (account mav@alkar.net [212.86.226.11] verified) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPA id 226430866; Wed, 29 Oct 2008 15:34:06 +0200 Message-ID: <4908664D.4090900@FreeBSD.org> Date: Wed, 29 Oct 2008 15:34:05 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.14 (X11/20080612) MIME-Version: 1.0 To: Bartosz Giza References: <1225203780.00029971.1225190402@10.7.7.3> <200810290953.28237.gizmen@blurp.pl> <49083CBD.1000701@FreeBSD.org> <200810291337.44899.gizmen@blurp.pl> In-Reply-To: <200810291337.44899.gizmen@blurp.pl> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Wed, 29 Oct 2008 14:23:21 +0000 Cc: freebsd-net@freebsd.org Subject: Re: two NIC on 2 core system (scheduling problem) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2008 13:34:08 -0000 Bartosz Giza wrote: > So now i am lost again. If packet filtering on bge card is counted to irq17: > bge0 process so i think it should use more cpu. > From what you wrote there should be no difference for me if card use tasq > or irq. Those processes do exactly the same thing? If that is true so why > there is so much difference in cpu usage: > > 20 root 1 -68 - 0K 8K - 0 161:01 18.75% em0 taskq > 21 root 1 -68 - 0K 8K WAIT 1 100:10 5.47% irq17: bge0 > 23 root 1 -68 - 0K 8K WAIT 0 75:31 2.98% irq16: fxp1 > > If what you wrote is true that overhead of incomming packet on bge0 should > be counted to irq17: bge0 > So don't understand why there is so big cpu usage on em0. From what you are > saying irq17 and em0 taskq should have similar usage. Even more bge0 passes > about two times more traffic than em0. I simply don't understand this. > So don't understand why there is so big cpu usage on em0. Have no idea, there are too much possibilities to answer without profiling. Different incoming packet rates, different firewall match patterns in opposite directions, different card's hardware at least. I have noticed that even different types of em cards may have twice as different CPU usage due to using different interrupt moderation techniques. > bge0 passes about two times more traffic than em0 Incoming or outgoing? Outgoing does not affect time accounting as much as incoming, because transmit interrupt handler usually does not call network stack. -- Alexander Motin