From: Matt Doyle (mdoyle_at_[hidden])
Date: 2008-05-14 17:26:06
> [mailto:boost-bounces_at_[hidden]] On Behalf Of James Sutherland
> Sent: Wednesday, May 14, 2008 2:15 PM
> To: boost_at_[hidden]
> Subject: Re: [boost] very poor thread performance
> >> Any thoughts on what is chewing up the extra time then? Isn't the
> >> total time the correct measure here? Is the difference
> between the
> >> "real" time and the "system" time due to the join_all?
> > There is no extra time, or not much. You seem to be
> > the output of the "time" command. The real time is the
> elapsed time
> > in the real world. The sys plus user time is the time the all cpus
> > spent executing the program in total, which you would
> expect to remain
> > roughly constant.
> > If 2 cpus each spent 1 second running the program in parallel, the
> > real time would be 1 second and the system plus user time
> would be 2
> > seconds.
> > If one cpu each spent 2 seconds running the program, the real time
> > would be 2 seconds and the system plus user time would still be 2
> > seconds.
> > Oh, I also made my version loop 10 times as long, which is why it
> > takes almost 10 seconds.
> Okay, then I am interpreting things correctly, and my
> internal timer seems to be consistent with the output of the
> "time" command that you refer to. To restate, the sum of
> "real" and "system" time is the pertinent measure. The
> results you posted then indicate that there is no speedup
> associated with increasing the number of threads. I am now
> seeing the same thing...
> So any thoughts as to why there is no speedup?
I'm sorry to jump in the middle, but now you've lost me. The way I see
the measurements going from 1 thread to 2 cut the over-all execution
time roughly in half. User time is measuring the amount of work
performed and that didn't change.
Sorry if I missed something obvious here.
> Unsubscribe & other changes: