From owner-freebsd-stable@FreeBSD.ORG Tue Feb 20 17:17:51 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA5E316A532 for ; Tue, 20 Feb 2007 17:17:51 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 918A113C46B for ; Tue, 20 Feb 2007 17:17:51 +0000 (UTC) (envelope-from sam@errno.com) Received: from [10.0.0.178] ([10.0.0.178]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id l1KHHo22051589 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 20 Feb 2007 09:17:50 -0800 (PST) (envelope-from sam@errno.com) Message-ID: <45DB2D3E.5060803@errno.com> Date: Tue, 20 Feb 2007 09:17:50 -0800 From: Sam Leffler Organization: Errno Consulting User-Agent: Thunderbird 1.5.0.9 (Macintosh/20061207) MIME-Version: 1.0 To: Eric van Gyzen References: <45DA59DA.3040408@vangyzen.net> In-Reply-To: <45DA59DA.3040408@vangyzen.net> X-Enigmail-Version: 0.94.2.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org Subject: Re: ath(4) irq and taskq cpu usage X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Feb 2007 17:17:51 -0000 Eric van Gyzen wrote: > The irq and taskq for my ath(4) card often use excessive amounts of CPU > time, even when my network is idle. They are often above 10% and 15%, > respectively; occasionally, they are as high as 27% and 44%. > > The system is an AMD Athlon64 2800+ running FreeBSD 6.2-RELEASE i386 > with a custom kernel including the wlan_* stuff, ath, ath_hal, and > ath_rate_sample. It is a station using WPA2-PSK with AES-CCMP. The > access point is also a FreeBSD machine with an ath(4) card. > > During periods of high CPU usage, the > > rx failed 'cuz of PHY err > OFDM timing > > fields of the athstats output are increasing rather quickly. For > example, while CPU usage was 25% and 46%, the OFDM timing field was > increasing by 43,000 per second. > > Can anyone explain this? Is it a sign of failing hardware? It means you're seeing lots of noise in the environment. The numbers you cite are way too high (43K/sec is crazy) and the %cpu times see too high for your processor but that's hard to evaluate. You don't indicate what your h/w is (mac+phy) revs but presumably it's old enough that PHY errors are not counted in h/w but instead sent to the host as little packets that must be processed. If you actually use the radio you'll see the error counts go down because the radio will be busy doing useful work. High phy error rates can also be caused by things like faulty antenna connections and/or radio overload (i.e. sta and ap being too close and/or using high power radios). I can add a knob to the driver to turn off this stuff but then you will likely see degraded performance as the PHY errors are used to tune the baseband when there is noise and/or when the case temperature changes (this can significantly affect radio operation). Sam