Performance of Java on FBSD vs. others...

Kazuyuki Shudo shudo at computer.org
Mon Nov 13 10:39:47 UTC 2006


Hi Nikos,

> On Sun, Nov 12, 2006 at 09:46:30PM +0900, Kazuyuki Shudo wrote:
> > I found your code does polling with 50 msec sleeps between checks in
> > src/netcins/p2p/dhs/testing/DHSSingleMetricTest.java:
>
> Yes. I've already changed all those Thread.sleep(...) calls to
> Thread.yield() (which, if i got it right from the jdk source code,
> translates to a sleep(1) on freebsd).

So we guess you say you've already done the following too:

    PastryNode pn = ...

    synchronized (pn) {
      while (!pn.isReady()) {
        try {
          pn.wait();
        } catch (InterruptedException e) {
          System.out.println(e);
        }
      }
    }

We should not do polling with PastryNode#isReady() because we can
Object#wait() on an instance of PastryNode.


| On Sun, Nov 12, 2006 at 09:46:30PM +0900, Kazuyuki Shudo wrote:

| Anyway, JDK 5.0 on FreeBSD seems not to perform as well as on Linux
| and Windows.

Anyway, on FreeBSD, even polling should perform as well as on Linux
and Windows.

  Kazuyuki Shudo	2006 at shudo.net		http://www.shudo.net/


More information about the freebsd-java mailing list