From owner-freebsd-java@FreeBSD.ORG Sun Nov 12 12:46:31 2006 Return-Path: X-Original-To: freebsd-java@freebsd.org Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4F2E516A417 for ; Sun, 12 Nov 2006 12:46:31 +0000 (UTC) (envelope-from shudo@computer.org) Received: from www721.sakura.ne.jp (www721.sakura.ne.jp [59.106.19.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id D0F9943D6D for ; Sun, 12 Nov 2006 12:46:29 +0000 (GMT) (envelope-from shudo@computer.org) Received: from utagoe.com (softbank219179114027.bbtec.net [219.179.114.27]) (authenticated bits=0) by www721.sakura.ne.jp (8.12.11/8.12.11) with ESMTP id kACCkOEB045049 for ; Sun, 12 Nov 2006 21:46:26 +0900 (JST) (envelope-from shudo@computer.org) Date: Sun, 12 Nov 2006 21:46:30 +0900 (JST) Message-Id: <20061112.214630.485563740.shudo@utagoe.com> To: freebsd-java@freebsd.org From: Kazuyuki Shudo In-Reply-To: <20061111035758.GA88440@ace.b020.ceid.upatras.gr> References: <20061110221501.GC72658@ace.b020.ceid.upatras.gr> <20061111035758.GA88440@ace.b020.ceid.upatras.gr> X-Mailer: Mew version 5.1 on XEmacs 21.4.19 (Constant Variable) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: Performance of Java on FBSD vs. others... X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 12:46:31 -0000 > From: Nikos Ntarmos > 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 :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/