From: hlovatt <howard.lov...@gmail.com>
Date: Mon, 7 Apr 2008 03:03:56 -0700 (PDT)
Local: Mon, Apr 7 2008 6:03 am
Subject: Re: Performance characteristics of mutable static primitives?
This is a very interesting discussion and reveals a lot about the
difficulties of programming for multiple cores. I was trying to understand what was going on and was 'messing about'
Going back to the original code. If it is OK to miss a few increments
threads[ j ] =
The above version doesn't show the problem on Java 6 and is quicker
On Apr 2, 6:48 pm, Charles Oliver Nutter <charles.nut...@sun.com>
> I ran into a very strange effect when some Sun folks tried to benchmark
> JRuby's multi-thread scalability. In short, adding more threads actually > caused the benchmarks to take longer. > The source of the problem (at least the source that, when fixed, allowed
> private static int count = 0;
> public void pollEvents(ThreadContext context) {
> }
> So the basic idea was that this would call poll() every 256 hits,
> So I'm rather confused here. Is a ++ operation on a static int doing
> The benchmark does basically the same thing, with a single main counter
> First on Apple's Java 5
> ~/NetBeansProjects/jruby ➔ java -server Trouble 1
> Normal scaling here...1 thread on my system uses about 60-65% CPU, so
> ~/NetBeansProjects/jruby ➔ java -server Trouble 1
> Don't compare the times directly, since these are two pretty different
> So what's up here?
> - Charlie You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||