Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Nov 2006 19:38:35 +0900 (JST)
From:      Kazuyuki Shudo <shudo@computer.org>
To:        freebsd-java@freebsd.org
Subject:   Re: Performance of Java on FBSD vs. others...
Message-ID:  <20061113.193835.719888658.shudo@utagoe.com>
In-Reply-To: <20061113001106.GA74300@ace.b020.ceid.upatras.gr>
References:  <20061111035758.GA88440@ace.b020.ceid.upatras.gr> <20061112.214630.485563740.shudo@utagoe.com> <20061113001106.GA74300@ace.b020.ceid.upatras.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
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@shudo.net		http://www.shudo.net/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061113.193835.719888658.shudo>