From owner-freebsd-hackers Wed May 15 11: 7:31 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from bingnet2.cc.binghamton.edu (bingnet2.cc.binghamton.edu [128.226.1.18]) by hub.freebsd.org (Postfix) with ESMTP id C76C137BAA7 for ; Wed, 15 May 2002 11:07:12 -0700 (PDT) Received: from onyx ([128.226.182.171]) by bingnet2.cc.binghamton.edu (8.11.6/8.11.6) with ESMTP id g4FI75Z14627; Wed, 15 May 2002 14:07:05 -0400 (EDT) Date: Wed, 15 May 2002 14:07:05 -0400 (EDT) From: Zhihui Zhang X-Sender: zzhang@onyx To: Alfred Perlstein Cc: Terry Lambert , Doug White , freebsd-hackers@FreeBSD.ORG Subject: Re: Collect process sleeping statistics In-Reply-To: <20020515174609.GK1585@elvis.mu.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG What if most I/O are asynchronous writes and handled by a background process (e.g. SoftUpdate syncer daemon or a special kernel daemon), then I guess the wait should have something to do with memory or buffer. But I do not know to to confirm this. Maybe some profiling or instrumentation (too much work?) will help. -Zhihui On Wed, 15 May 2002, Alfred Perlstein wrote: > * Zhihui Zhang [020515 10:33] wrote: > > > > Basically I have a program that does a lot of I/O and alloctes/frees a lot > > of memory. The time command gives result like this: > > > > 6.239u 19.329s 7:59.76 5.3% 310+775k 3993+246io 7pf+0w > > > > I want to know why CPU is running only 5.3% of the total time. I just > > want know how long it is waiting for memory and how long it is waiting for > > I/O. No other process is running at the same time. > > When not condending against other processes, almost all time not > spent on CPU is waiting for IO. > > -Alfred > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message