Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: chu@tes-mail.jpl.nasa.gov (Eugene Chu)
To: axp-list@redhat.com
Subject: Re: A few questions about compiling code and performance
Date: Wed,  1 Nov 2000 12:38:05 -0800 (PST)	[thread overview]
Message-ID: <20001101203805.7E10D6F5D@tes-mail.jpl.nasa.gov> (raw)

J. Pedro Sousa do Amaral wrote:

>Another question is about bogometer benchmarking. How useful is to use
>the function time to benchmark the performance of a given program
>compiled across different machines? From the man time: "The time
>utility executes and times utility. After the utility finishes, time
>writes the total time elapsed, the time consumed by system overhead,
>and the time used to execute utility to the standard error stream."
>What is exactly the meaning of the two last times reported?

The CPU time used by system overhead is usually for I/O operations.
Most I/O in most flavors of UNIX is still buffered, so there is copying
between system memory and user memory before the data is actually
transferred to/from the I/O devices.  The user CPU time is the the
actual amount of time yoru program spent using up CPU cycles doing
whatever it does.  A lot of times, the sum of these two are less than
the elapsed time, and the difference is usually due to the delay in
I/O operations.  Moving data to/from physical devices usually takes
orders of magnitude longer than moving it between memory, or just
processing the data.  This is why you can't reliably predict the
performance of your program based just on CPU or memory speeds.

eyc




             reply	other threads:[~2000-11-01 20:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-01 20:38 Eugene Chu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-11-01 22:26 A few questions about compiling code and performance Brad Lucier
2000-11-01 12:02 Custom AXP kernel Greg Lindahl
2000-11-01 14:36 ` A few questions about compiling code and performance J. Pedro Sousa do Amaral
2000-11-01 19:34   ` Ross A Knepper
2000-11-01 19:52   ` arthur m coucouvitis
2000-11-02  0:50     ` W Bauske
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox