From owner-freebsd-stable@FreeBSD.ORG Sun Feb 6 09:19:00 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 723BE10656C5 for ; Sun, 6 Feb 2011 09:19:00 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta01.emeryville.ca.mail.comcast.net (qmta01.emeryville.ca.mail.comcast.net [76.96.30.16]) by mx1.freebsd.org (Postfix) with ESMTP id 52DDB8FC15 for ; Sun, 6 Feb 2011 09:18:59 +0000 (UTC) Received: from omta07.emeryville.ca.mail.comcast.net ([76.96.30.59]) by qmta01.emeryville.ca.mail.comcast.net with comcast id 4ZJz1g0011GXsucA1ZJze8; Sun, 06 Feb 2011 09:18:59 +0000 Received: from koitsu.dyndns.org ([98.248.34.134]) by omta07.emeryville.ca.mail.comcast.net with comcast id 4ZJy1g00M2tehsa8UZJyuC; Sun, 06 Feb 2011 09:18:59 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 5E9FB9B427; Sun, 6 Feb 2011 01:18:58 -0800 (PST) Date: Sun, 6 Feb 2011 01:18:58 -0800 From: Jeremy Chadwick To: Daniel O'Connor Message-ID: <20110206091858.GA50782@icarus.home.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-stable Stable Subject: Re: Xorg in swwrt 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: Sun, 06 Feb 2011 09:19:00 -0000 On Sun, Feb 06, 2011 at 03:19:12PM +1030, Daniel O'Connor wrote: > I updated ports (portmaster -a basically) on this 8.2-PRE box and now I find X takes a long, long time to start up and uses lots of CPU. It shows the wchan as swwrt. > > eg.. > last pid: 21791; load averages: 0.12, 0.29, 0.23 up 0+16:09:07 15:16:15 > 496 processes: 2 running, 494 sleeping > CPU: 0.0% user, 0.0% nice, 46.7% system, 0.0% interrupt, 53.3% idle > Mem: 190M Active, 33M Inact, 3217M Wired, 198M Cache, 15M Buf, 171M Free > Swap: 4096M Total, 621M Used, 3475M Free, 15% Inuse, 212K Out > > PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND > 21787 fiona 1 76 0 168M 134M swwrt 0 0:04 32.37% Xorg > 21788 darius 1 76 0 31860K 4868K pause 1 0:00 1.17% zsh > 2081 darius 4 44 0 113M 11620K ucond 1 9:45 0.10% python2.6 > 656 root 1 44 0 24392K 1096K select 1 3:44 0.00% ppp > 1881 darius 32 52 0 135M 8804K uwait 0 2:24 0.00% python2.6 > > Does anyone else see this? I don't use X, but: The swwrt state is induced by function swap_pager_putpages() in src/sys/vm/swap_pager.c. It seems to imply that there's a certain degree of swapping going on in/out of the process, but the code is beyond my understanding. I see 621MB of swap used on that machine, so it doesn't sound that far-fetched. It would also help to know when your kernel was built (uname -a), since there have been changed during the 8.2-PRERELEASE lifetime to the above code file. http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/vm/swap_pager.c procstat -kk and procstat -v on PID 21787 might also be helpful. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP 4BD6C0CB |