From owner-freebsd-questions Sun Nov 22 11:44:54 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA06068 for freebsd-questions-outgoing; Sun, 22 Nov 1998 11:44:54 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from echonyc.com (echonyc.com [198.67.15.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA06060 for ; Sun, 22 Nov 1998 11:44:50 -0800 (PST) (envelope-from benedict@echonyc.com) Received: from localhost by echonyc.com (8.9.1/8.9.1) with SMTP id OAA22755 for ; Sun, 22 Nov 1998 14:44:15 -0500 (EST) Date: Sun, 22 Nov 1998 14:44:15 -0500 (EST) From: Snob Art Genre Reply-To: ben@rosengart.com To: questions@FreeBSD.ORG Subject: X and my WM using 40% CPU on an idle system Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello hackers, I noticed today that wmaker and XF86_S3V were stealing precious cycles from my rc5 client! As in: PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 1224 ben 105 19 744K 456K RUN 295:40 60.23% 60.23% rc5des 1102 ben 2 0 2848K 2296K select 53:34 18.58% 18.58% wmaker 1099 ben 2 0 11208K 10292K select 52:21 17.93% 17.93% XF86_S3V This seems more than a little weird on an idle system. Furthermore, quite a bit of this excessive CPU usage is in the kernel. CPU states: 16.3% user, 54.5% nice, 28.8% system, 0.4% interrupt, 0.0% idle I'm running 3.0-current, and XFree86 version 3.3.2.3. I don't know how long this has been going on, I just noticed it today. The X server seems to be looping on read, writev, gettimeofday, select, like so: 1099 XF86_S3V RET writev 32/0x20 1099 XF86_S3V CALL gettimeofday(0xefbfd8c4,0) 1099 XF86_S3V RET gettimeofday 0 1099 XF86_S3V CALL select(0x80,0x1ed930,0,0,0) 1099 XF86_S3V RET select 1 1099 XF86_S3V CALL read(0x7,0x3ec008,0x1000) 1099 XF86_S3V GIO fd 7 read 4 bytes "+\0\^A\0" Wmaker seems to be doing something similar. I'm not sure where either of these loops begins or ends, but here's what seems to be a complete cycle from wmaker: 1102 wmaker CALL read(0x3,0xefbfda10,0x20) 1102 wmaker GIO fd 3 read 32 bytes "\^A\^B\M^D\M-x\0\0\0\0\^Q\0\0\^A\0\0\0\0\0\0\0\0\^A\0\0\0\0\0\0\0\^T\ \M-C\^_\0" 1102 wmaker RET read 32/0x20 1102 wmaker CALL ioctl(0x3,FIONREAD,0xefbfd21c) 1102 wmaker RET ioctl 0 1102 wmaker CALL select(0x4,0xefbfdbb8,0xefbfdb38,0xefbfdab8,0xefbfdab0) 1102 wmaker RET select -1 errno 22 Invalid argument 1102 wmaker CALL gettimeofday(0xefbfdc38,0) 1102 wmaker RET gettimeofday 0 1102 wmaker CALL ioctl(0x3,FIONREAD,0xefbfd424) 1102 wmaker RET ioctl 0 1102 wmaker CALL ioctl(0x3,FIONREAD,0xefbfd424) 1102 wmaker RET ioctl 0 1102 wmaker CALL gettimeofday(0xefbfda2c,0) 1102 wmaker RET gettimeofday 0 1102 wmaker CALL write(0x3,0x63800,0x4) 1102 wmaker GIO fd 3 wrote 4 bytes "+\0\^A\0" 1102 wmaker RET write 4 I have a weird feeling they're talking to each other. If I suspend wmaker, XF86's CPU usage drops to zero. Does anyone out there have any clues for me? Ben "You have your mind on computers, it seems." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message