Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 May 2007 17:18:42 +0900 (GMT-9)
From:      Akihiro KAYAMA <kayama@personal-media.co.jp>
To:        freebsd-questions@freebsd.org
Subject:   Re: wall-clock time profiling
Message-ID:  <20070531.171842.91755455.kayama@personal-media.co.jp>
In-Reply-To: <20070531032505.GB26400@ayn.mi.celestial.com>
References:  <465DB587.6010109@mac.com> <20070531.114515.133762361.kayama@personal-media.co.jp> <20070531032505.GB26400@ayn.mi.celestial.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <20070531032505.GB26400@ayn.mi.celestial.com>,
Bill Campbell <freebsd@celestial.com> writes:

freebsd> On Thu, May 31, 2007, Akihiro KAYAMA wrote:
freebsd> >In article <465DB587.6010109@mac.com>,
freebsd> >Chuck Swiger <cswiger@mac.com> writes:
freebsd> >
freebsd> >cswiger> Akihiro KAYAMA wrote:
freebsd> >cswiger> > Hi all.
freebsd> >cswiger> > 
freebsd> >cswiger> > What is the right way to measure wall-clock time in profiling on FreeBSD?
freebsd> >cswiger> 
freebsd> >cswiger> The time shell builtin command or "/usr/bin/time -l _program_"?
freebsd> >cswiger> 
freebsd> >cswiger> The latter variant displays the rusage struct (ie, from "man getrusage")?
freebsd> >
freebsd> >Thanks for your response.
freebsd> >
freebsd> >Yes, we can know whether the program is I/O bound or CPU bound by
freebsd> >time(1). But it is still unclear which part of the program is really
freebsd> >waiting for I/O. So profiling is needed for tuning, although CPU time
freebsd> >profiling gives me non-distinct result on I/O bound programs.  It is
freebsd> >reason why I want wall-clock time profiling.
freebsd> 
freebsd> Wall clock time doesn't generally tell you anything reliably
freebsd> useful on a multi-tasking system as it's very dependent on other
freebsd> system activity.  I had many fights back in the mid '70s with
freebsd> people in accounting who wanted to bill wall-clock time on
freebsd> Burroughs main frames which generally had 20 programs in the mix
freebsd> at any time (I guess they were accustomed to IBM 360s that
freebsd> couldn't walk and chew gum at the same time :-).

Yes, I know UNIX was born as TSS in 1970. And today I occupy my FreeBSD
box. It is not necessary to share it with my colleagues.  Thanks to
Moore's Law and so many FreeBSD guys.

It is easy to prepare a dedicated machine for debugging purpose and
run a test program only.  Daemons are still running in background but
they are almost asleep (load averages: 0.00) so will not be critical
on wall-clock time profiling.

Wall-clock time profiling will be useful to know what routines/system
calls take time in complex code, especially I/O related routines.

--
Akihiro KAYAMA



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070531.171842.91755455.kayama>