delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/17/03:14:04

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Injected-Via-Gmane: http://gmane.org/
To: cygwin AT cygwin DOT com
From: "Alex Vinokur" <alexvn AT connect DOT to>
Subject: Re: Percent of CPU this job got > 100%
Date: Fri, 17 Oct 2003 09:13:15 +0200
Lines: 83
Message-ID: <bmo4rd$n4d$1@sea.gmane.org>
References: <bmleem$b2n$1 AT sea DOT gmane DOT org> <20031016144119 DOT GA30475 AT redhat DOT com> <bmmjhd$mmf$1 AT sea DOT gmane DOT org>
X-Complaints-To: usenet AT sea DOT gmane DOT org
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

"Shankar Unni" <shankar AT cotagesoft DOT com> wrote in message news:bmmjhd$mmf$1 AT sea DOT gmane DOT org...
> Christopher Faylor wrote:
>
> > On Thu, Oct 16, 2003 at 08:38:33AM +0200, Alex Vinokur wrote:
>
> >>$ /bin/time -v a 1000
> >>[...]
> >> Percent of CPU this job got: 133%
>
> > Automatic, built-in meanness at no extra charge.
>
> :-).
>
> Alex: is it possible your program is multi-threaded, and you have one of
> those shiny new hyperthreading P4s? Remote, but that could give you this
> behavior..

No, it isn't.


Here is program t.c :

------------------
#include <stdio.h>
#include <assert.h>
int main (int argc, char** argv)
{
int i;
  assert (argc > 1);
  for (i = 0; i < atoi(argv[1]); i++);
  return 0;
}
------------------

>
> But even otherwise, small discrepancies between wall clock and computed
> CPU clock are not uncommon, and given that your running time is pretty
> close to one CPU "HZ" tick, you can get weird anomalies like this.
>
> Try timing "a 1000000".
> --
> Shankar.
>

===========================================
Windows 2000 Professional
CYGWIN_NT-5.0 1.5.4(0.94/3/2)
gcc version 3.3.1 (cygming special)
GNU time 1.7
===========================================

$ gcc t.c

$ command time -v a 1000

        Command being timed: "a 1000"
        User time (seconds): 0.03
        System time (seconds): 0.03
        Percent of CPU this job got: 127%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.04
        [---omitted---]

$ command time -v a 100000000

        Command being timed: "a 100000000"
        User time (seconds): 18.82
        System time (seconds): 0.04
        Percent of CPU this job got: 99%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:19.03
        [---omitted---]


 =====================================
   Alex Vinokur
     mailto:alexvn AT connect DOT to
     http://mathforum.org/library/view/10978.html
     news://news.gmane.org/gmane.comp.lang.c++.perfometer
   =====================================






--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019