From owner-freebsd-questions@FreeBSD.ORG Sat Oct 27 12:32:07 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDF2416A475 for ; Sat, 27 Oct 2007 12:32:06 +0000 (UTC) (envelope-from gunther.mayer@googlemail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by mx1.freebsd.org (Postfix) with ESMTP id BD7C113C4B7 for ; Sat, 27 Oct 2007 12:32:05 +0000 (UTC) (envelope-from gunther.mayer@googlemail.com) Received: by py-out-1112.google.com with SMTP id u77so1967511pyb for ; Sat, 27 Oct 2007 05:32:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:message-id:date:user-agent:mime-version:to:subject:content-type:content-transfer-encoding:from; bh=mFw5HdaAoD7B233paBwjtEPLr1XN0AdezgDsAubxgiE=; b=Ez+coW7+NWd88MfemVk3obSWOLASMHI8doQ9VT0vaFh7F1e5zm2pFg6AY5fnKzIpgBtYWUEcghlU3jdwB4v3miHYNVo+QKnGq4t4OGfM9cQsncNJT0iN1JDj8CnLbmYiRE6rX7JHdTKhZbkbSDHR4DkyzILJYuFROlhaMRskgeM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:message-id:date:user-agent:mime-version:to:subject:content-type:content-transfer-encoding:from; b=D0su81F1kl/tCi7iOdrSio+Rqywoxgw3B/wDHSckWOg/lRVuJf5QGpLWIEFdKqcGrsBaj28GYH4QdevA2VUOhb6iH5q5jyZ+6UanHIJwbBT7lLhDWvmkCxQysNVYVYYAmZuBFGG8xQbDz/8OUsErXQY3btD4WHdIXYes61CWYbI= Received: by 10.64.250.7 with SMTP id x7mr8478410qbh.1193486729265; Sat, 27 Oct 2007 05:05:29 -0700 (PDT) Received: from ?172.25.0.16? ( [41.245.181.224]) by mx.google.com with ESMTPS id f16sm2755048qba.2007.10.27.05.05.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 27 Oct 2007 05:05:28 -0700 (PDT) Message-ID: <47232945.10506@gmail.com> Date: Sat, 27 Oct 2007 14:04:21 +0200 User-Agent: Thunderbird 1.5.0.14pre (X11/20071023) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit From: Gunther Mayer Subject: CPU usage 100% but no process hogging CPU X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2007 12:32:08 -0000 Hi there, I'm having some capacity issues on the FreeBSD 6.2/Core 2 Duo/2GB RAM server that I manage. For quite a few days now it constantly shows load averages of around 1 and a CPU usage of around 100%. Yet summing up the CPU usage of the individual processes running I hardly ever get to more than 5%, regardless of how long I watch top. A snapshot of my top output looks like this: last pid: 96102; load averages: 1.28, 1.15, 1.06 up 22+08:33:16 13:55:03 122 processes: 2 running, 119 sleeping, 1 zombie CPU states: 67.3% user, 0.0% nice, 32.7% system, 0.0% interrupt, 0.0% idle Mem: 474M Active, 974M Inact, 186M Wired, 68M Cache, 213M Buf, 93M Free Swap: 4064M Total, 4064M Free PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND 635 root 1 122 0 27304K 2644K select 656:38 1.27% syslog-ng 844 www 20 20 0 411M 300M kserel 360:13 0.00% java 837 user1 3 20 0 29048K 5672K kserel 34:30 0.00% radiusd 788 pgsql 1 96 0 13516K 3824K select 10:03 0.00% postgres 785 pgsql 1 115 0 120M 7436K select 9:02 0.00% postgres 787 pgsql 1 8 0 120M 41112K nanslp 5:15 0.00% postgres syslog-ng is quite busy as I use it to capture logs of more than 50 remote sites. I have lots of slow queries in my postgres logs that I think are related to this bottleneck, though unoptimised queries and an ever growing amount of data are more likely to take the blame for that. High disk I/O in this regard could explain the high system utilisation, however. I found out that I've been bitten by the freebsd-update bug (http://security.freebsd.org/advisories/FreeBSD-EN-07:05.freebsd-update.asc) which replaced my SMP kernel with a GENERIC one and I'm taking corrective action early tomorrow morning, but surely even with just a single CPU the load average should never be as high? Where are those phantom CPU hogging processes? Gunther