Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Nov 2006 21:46:30 +0900 (JST)
From:      Kazuyuki Shudo <shudo@computer.org>
To:        freebsd-java@freebsd.org
Subject:   Re: Performance of Java on FBSD vs. others...
Message-ID:  <20061112.214630.485563740.shudo@utagoe.com>
In-Reply-To: <20061111035758.GA88440@ace.b020.ceid.upatras.gr>
References:  <20061110221501.GC72658@ace.b020.ceid.upatras.gr> <Pine.LNX.4.62.0611102345280.3696@decibel.pvv.ntnu.no> <20061111035758.GA88440@ace.b020.ceid.upatras.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
> From: Nikos Ntarmos <ntarmos@ceid.upatras.gr>
> Date: Sat, 11 Nov 2006 05:57:58 +0200

> > is it possible to post the program for others to test? (if there's no
> > trade secrets or similar in it) I'd like to run it;

> Of course. No trade secret there... :) Grab [1]. It's an implementation
> of [2] over [3]. Example command line arguments:
> 	java -classpath <all jars in .../lib>:classes \
> 		netcins.p2p.dhs.testing.DHSSingleMetricTest \
> 		1000 100000 64 32 10
> where 1000 is the number of nodes in the simulated system, 100000 the
> number of items to be added, and the other numbers are parameters of the
> simulated application. It should take a while to do the whole hog, but
> don't wait for it to finish. After all nodes are online, it prints out
> the time it took it to generate them all. If it takes more than
> 200-220'' (win32 and linux times respectively), we're done. On my 1.7GHz
> Pentium-M it's more like 800''...

I found your code does polling with 50 msec sleeps between checks
in src/netcins/p2p/dhs/testing/DHSSingleMetricTest.java:

  public void addNodes(int numNodes) {
    ...
    if (curNodeIndex == 0)
       node = bootstrapNode = factory.newNode((rice.pastry.NodeHandle) null);
    else
       node = factory.newNode(bootstrapNode.getLocalHandle());

    // the node may require sending several messages to fully boot into the ring
    while (!node.isReady()) {
      try {
        Thread.sleep(50);
      } catch (InterruptedException e) {
         e.printStackTrace();
      }
    }

Such a polling results in execution time which is not in inverse
propotion to the performance of the underlying Java runtime.

This addNodes() method is called 1000 times but the sleep(50) is
hardly called on Linux and Windows because the exec time is 200-220.
On FreeBSD, we can guess that the sleep(50) is called once an
invocation of addNode().

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


> [1] http://ntarmos.dyndns.org/Misc/DHS-FreePastry-2.0b2.tgz
> [2] N. Ntarmos, P. Triantafillou, and G. Weikum. "Counting at large:
> 	 Efficient cardinality estimation in Internet-scale data networks."
> 	 In Proc. ICDE '06.
> [3] http://freepastry.org/


  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?20061112.214630.485563740.shudo>