From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 22 06:35:59 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3404F106564A for ; Tue, 22 Nov 2011 06:35:59 +0000 (UTC) (envelope-from eugen@grosbein.pp.ru) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13::5]) by mx1.freebsd.org (Postfix) with ESMTP id 92EAA8FC0C for ; Tue, 22 Nov 2011 06:35:57 +0000 (UTC) Received: from eg.sd.rdtc.ru (localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.14.5/8.14.5) with ESMTP id pAM6Zsdn086788; Tue, 22 Nov 2011 13:35:54 +0700 (NOVT) (envelope-from eugen@grosbein.pp.ru) Message-ID: <4ECB42C5.6050108@grosbein.pp.ru> Date: Tue, 22 Nov 2011 13:35:49 +0700 From: Eugene Grosbein User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.2.13) Gecko/20110112 Thunderbird/3.1.7 MIME-Version: 1.0 To: Luigi Rizzo References: <4EC39367.4030109@rdtc.ru> <4EC9EE5A.2070204@grosbein.pp.ru> <20111121083003.GA54883@onelab2.iet.unipi.it> In-Reply-To: <20111121083003.GA54883@onelab2.iet.unipi.it> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit Cc: hackers@freebsd.org Subject: Re: dummynet(4) kernel process CPU usage monitoring X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2011 06:35:59 -0000 21.11.2011 15:30, Luigi Rizzo пишет: > On Mon, Nov 21, 2011 at 01:23:22PM +0700, Eugene Grosbein wrote: >> Hi! >> >> I need to draw graph of dummynet's CPU usage. >> "procstat -t 0" shows me TID (thread id) of dummynet kernel thread. >> "ps -Hxo time,lwp" shows me total CPU time consumed by this thread. >> >> Now I see this time has 9 seconds increase during 60 seconds of real time. >> This should be 9/60=15% CPU usage, but "top -SHP" shows me 0.00% meantime. > > apart from the scaling on number of cores (e.g. if you have 8 cores > the 15% becomes a bare 2%) I have 4 cores (no hyperthreading) and it seems that "top -SHP" does not scale anything in this mode. > remember that percentages are computed > with some kind of filtering (EWMA ?) so if the load of dummynet threads > is bursty, the filter might eat most of it. I do not understand what this filter is. Btw, dummynet load is steady here. > not completely sure this explains a steady 0.00%, if that's is > what you are seeing Yes, I see 0.00% except of hours of most load where top shows about 10% and ps shows about 30%. Eugene Grosbein