From owner-freebsd-questions@FreeBSD.ORG Thu May 6 11:34:18 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DC68F106564A for ; Thu, 6 May 2010 11:34:18 +0000 (UTC) (envelope-from cronfy@gmail.com) Received: from mail-iw0-f193.google.com (mail-iw0-f193.google.com [209.85.223.193]) by mx1.freebsd.org (Postfix) with ESMTP id A51E08FC0A for ; Thu, 6 May 2010 11:34:18 +0000 (UTC) Received: by iwn31 with SMTP id 31so7398021iwn.27 for ; Thu, 06 May 2010 04:34:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=VhpuIYNKoW0UXglkOHqE8zquq7bw3os4dZ2VtiOdj0c=; b=p7caVaSa8cs2xoGqSSqVn/e4ovQ7nDPzuItHlAJ2g76vZgliKEKwOojbVBuR+Whemk FxeREeVrUPpB6lymnx2JlLjSyDLdtJ68E4Qxx8hT1LmFfTwnhctxsWTJyvKlr+/vyxX/ gfc26JxN4eUpbBL7227YcE50Jhkkc6PktTz/U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=uCBRDL5LzYX6Bzuw62YRgoJm8dzb1poMyRMcOjtam6D1QHjzTCYYxfhQGsXuX0S0ZU GsocdkLi7dkA/oZxjh3UOMdZAJVBxUAD9vB/TL2J8y7Mz7eJmKJdfcQVAgHIVkAQHj90 eK577ui0mge5PLLaArz7rqS6s897gcpbR6mek= Received: by 10.231.159.134 with SMTP id j6mr1394465ibx.29.1273145650152; Thu, 06 May 2010 04:34:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.59.73 with HTTP; Thu, 6 May 2010 04:33:40 -0700 (PDT) In-Reply-To: References: From: cronfy Date: Thu, 6 May 2010 15:33:40 +0400 Message-ID: To: freebsd-questions , Ivan Voras Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: Re: User cpu time VS system cpu time 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: Thu, 06 May 2010 11:34:18 -0000 Hello, >> I want to understand difference between user CPU time and system CPU >> time in system accounting. > But keep in mind that "kernel time" is a broad category - while IO time in > itself does not count as CPU time, file system operations for example do, > because they really can be CPU intensive. Ivan, thanks for the great explanation. I think that I can measure user filesystem usage with sa - it reports number of IO operations per user/command. In which other cases kernel time is used instead of user time for a process? I do not mean all of them - just that usually occur in practice. I've noticed that there are moments when system load in top for system time is very high (60-80% while user load is 15-25%, this produces very high LA also). All processes that were run at this time show high kernel time usage, although they usually do not. System is getting back to normal after Apache restart (I think this is related to Apache shared memory somehow, but not sure). This makes me suspect that system time in sa can not be relied on while measuring user system usage, because it notably varies under some circumstances for same operations. Am I wrong? -- // cronfy