[lug] q: multithreading on smp weirdness
Zan Lynx
zlynx at acm.org
Wed Dec 1 09:50:32 MST 2004
On Tue, 2004-11-30 at 21:14 -0700, karheng at softhome.net wrote:
> that's an interesting guess! i've gotta watch out for
> that.. i don't think it's the reason though, at least
> not for the test app.
>
> for the test app, i've replaced the chunk fetching
> function with a routine that simply does some computation
> over a small buffer. that buffer doesn't grow or
> shrink, & all i do is toggle the number of iterations
> over that buffer. so it should exclude issues caused by
> the cpu cache line...
>
> actually, the test app i have is part of a bigger app.
> thread 1 of the bigger app fetches data & thread 2
> processes them.
> i've extracted & simplified that code out and made both
> threads only do computation on a small buffer to
> reproduce the problem from the bigger app.
>
> anyway, i've also tested the threads in the bigger app,
> & i've found that data returned from thread 1 is
> consistently sufficient to keep thread 2 busy.
> (thread1:thread2 elapse time ratio is approx 6:4, in my
> test app, it's made to be 1:1).
> in theory, i should be getting about 40% or 30%
> performance improvement in my bigger app, & always 40%
> to 50% performance improvement in my test case.
Something else that I just thought of that could help. CPU performance
counters. Intel's Vtune software uses these to profile software in all
sorts of interesting ways. I don't know if Itanium has the same
performance registers that the P4 has, but if they were good I don't see
why Intel would leave them out.
I also don't know if Intel has anything like Vtune for Itanium. *goes
to check Google* Ah, yes they do. And there's another thing called
Thread Checker (http://www.intel.com/software/products/threading/tcwin/)
I don't know if Intel offers an evaluation copy or if you'd have to buy
it. Geez. I just looked. They want $1,198 for the Vtune package (that
includes Thread Checker).
There may be other tools to do this sort of thing out there.
--
Zan Lynx <zlynx at acm.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20041201/a6f501ee/attachment.pgp>
More information about the LUG
mailing list