From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id 140C130845 for ; Wed, 1 Nov 2000 15:38:07 -0500 (EST) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id eA1Kc6f27714 for axp-list@listman.redhat.com; Wed, 1 Nov 2000 15:38:06 -0500 Received: from tes-mail.jpl.nasa.gov (tes-mail.jpl.nasa.gov [137.78.33.77]) by mail.redhat.com (8.11.0/8.8.7) with ESMTP id eA1Kc6D27710 for ; Wed, 1 Nov 2000 15:38:06 -0500 Received: by tes-mail.jpl.nasa.gov (Postfix, from userid 1001) id 7E10D6F5D; Wed, 1 Nov 2000 12:38:05 -0800 (PST) To: axp-list@redhat.com Subject: Re: A few questions about compiling code and performance Message-Id: <20001101203805.7E10D6F5D@tes-mail.jpl.nasa.gov> Date: Wed, 1 Nov 2000 12:38:05 -0800 (PST) From: chu@tes-mail.jpl.nasa.gov (Eugene Chu) X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0beta4 Precedence: bulk Reply-To: axp-list@redhat.com List-Id: Linux and Red Hat on Alpha processors 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