Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Feb 2011 01:18:58 -0800
From:      Jeremy Chadwick <freebsd@jdc.parodius.com>
To:        Daniel O'Connor <darius@dons.net.au>
Cc:        freebsd-stable Stable <freebsd-stable@freebsd.org>
Subject:   Re: Xorg in swwrt
Message-ID:  <20110206091858.GA50782@icarus.home.lan>
In-Reply-To: <F89B908D-D8AB-46DD-89E9-F49B6A708CF6@dons.net.au>
References:  <F89B908D-D8AB-46DD-89E9-F49B6A708CF6@dons.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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 |




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110206091858.GA50782>