About "time yum --help".
Nifty Hat Mitch
mitch48 at sbcglobal.net
Tue Jan 18 00:45:20 UTC 2005
On Wed, Jan 12, 2005 at 03:43:44PM -0200, Vinicius wrote:
> Mogens Kjaer escreveu:
> >Vinicius wrote:
...
> >>time yum --help takes:
> >>real 0m7.125s
...
> >>Why, please?
Why so long or why so short?
> >You can do a:
> >strace -t -o/tmp/yum.log yum --help
> I see several lines as "open("/usr/lib/python2.3/lib-dynload/yum.so",
> O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)" for example.
> Is it relevant?
The open() ENOENT calls are commonly quick.
strace has flags that help you time system calls (-tt -r -T).
This open() returns ENOENT.
open("/usr/lib/python23.zip/sitemodule.so",.... <0.000013>
So to me 0.000013 is not relevant to me unless there is a pile of them.
Run it through strace twice in a row with different log files and the
additional time information flags then match up the files (vim -d
might work) and match the system calls.
Something like... presents me with hints that I think answer
the question.
# time yum -help
....
real 0m2.097s
user 0m0.200s
sys 0m0.085s
# time yum -help
....
real 0m0.349s
user 0m0.205s
sys 0m0.026s
This quickly tells me that a lot of time
is being spent waiting on my disk IO. YMMV....
--
T o m M i t c h e l l
spam unwanted email.
SPAM, good eats, and a trademark of Hormel Foods.
More information about the fedora-list
mailing list