|
Boost Users : |
From: Andrew Chapman (andrew.chapman_at_[hidden])
Date: 2004-10-07 12:14:53
Hi everyone,
I've got an operation which takes 14 seconds on a single thread, but is
taking up to 45 seconds when running via two boost.threads on a dual
proc machine (2x 3ghz Xeons, Fedora Core 1).
The thread functor objects are being passed a lot of references (about
20) to some very large std::vectors. One thread always reads/writes from
the start of the vectors to their midpoint, and the second thread from
(midpoint+1) to the end of the vectors.
The only thing I can think of is that the threads are taking a long time
to fork and get running, perhaps moving a lot of stack data around or
something?
When I look at the output of 'top' with threads displayed, I see the two
threads appear, but they only use about 50-60% CPU utilization each. The
system monitor shows mostly red (Kernel) as opposed to blue (User).
Any ideas?
-- Andrew Chapman Senior Technical Director - Framestore CFC
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net