From owner-freebsd-questions@FreeBSD.ORG  Sun Sep 24 04:33:29 2006
Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
X-Original-To: questions@freebsd.org
Delivered-To: freebsd-questions@FreeBSD.ORG
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 4BDB616A40F
	for <questions@freebsd.org>; Sun, 24 Sep 2006 04:33:29 +0000 (UTC)
	(envelope-from cswiger@mac.com)
Received: from pi.codefab.com (pi.codefab.com [199.103.21.227])
	by mx1.FreeBSD.org (Postfix) with ESMTP id E0FAB43D49
	for <questions@freebsd.org>; Sun, 24 Sep 2006 04:33:28 +0000 (GMT)
	(envelope-from cswiger@mac.com)
Received: from localhost (localhost [127.0.0.1])
	by pi.codefab.com (Postfix) with ESMTP id D0A6B5F71;
	Sun, 24 Sep 2006 00:33:27 -0400 (EDT)
X-Virus-Scanned: amavisd-new at codefab.com
Received: from pi.codefab.com ([127.0.0.1])
	by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id iTRpfHRA9bUj; Sun, 24 Sep 2006 00:33:27 -0400 (EDT)
Received: from [192.168.1.251] (pool-68-161-96-195.ny325.east.verizon.net
	[68.161.96.195])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pi.codefab.com (Postfix) with ESMTP id 9C4645C6E;
	Sun, 24 Sep 2006 00:33:26 -0400 (EDT)
Message-ID: <45160A98.9010500@mac.com>
Date: Sun, 24 Sep 2006 00:33:28 -0400
From: Chuck Swiger <cswiger@mac.com>
User-Agent: Thunderbird 1.5.0.7 (Windows/20060909)
MIME-Version: 1.0
To: Paul Schmehl <pauls@utdallas.edu>
References: <188DD322AA361E26DFC311B9@paul-schmehls-powerbook59.local>
In-Reply-To: <188DD322AA361E26DFC311B9@paul-schmehls-powerbook59.local>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: questions@freebsd.org
Subject: Re: Device polling - worthwhile?
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
	<mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions>
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
	<mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 24 Sep 2006 04:33:29 -0000

Paul Schmehl wrote:
> I've been reading about device polling.  I'm wondering if it's worth 
> doing on a busy website (4,000,000+ hits/month, 45GB+ bandwidth use).  I 
> understand what polling is and how it queues traffic as opposed to the 
> "old-fashioned" interrupt method, but do you really gain 
> performance-wise? Are there any pitfalls to enabling it in the kernel?  
> (I understand you can enable/disable it using ifconfig.)  Any gotchas 
> regarding tuning? (This is a production website.  I don't want to cause 
> problems that are hard to figure out.)
> 
> If it matters, I'm running 6.1 RELEASE, GENERIC kernel, Broadcomm GIG 
> NICs, 3.2GHz processor, 2GB of memory, apache 1.3.*

If your NIC can do interrupt moderation, and most GB NICs will, that already 
provides most of the advantages of device polling without as much CPU 
overhead.  Polling is best suited for routers and firewalls and very simple 
services like NTP.

If this is a production website, you clearly should experiment with polling on 
another system until you are satisfied that you can make it work OK for your 
needs, right...?

-- 
-Chuck

PS: 4 million hits/month is about 1-2 hits per second, and about 2 KB/sec of 
bandwidth on average.