From owner-freebsd-java@FreeBSD.ORG Mon Nov 13 10:39:46 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 E54EB16A416 for ; Mon, 13 Nov 2006 10:39:46 +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 1C1DF43D93 for ; Mon, 13 Nov 2006 10:38:32 +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 kADAcQe6059096 for ; Mon, 13 Nov 2006 19:38:28 +0900 (JST) (envelope-from shudo@computer.org) Date: Mon, 13 Nov 2006 19:38:35 +0900 (JST) Message-Id: <20061113.193835.719888658.shudo@utagoe.com> To: freebsd-java@freebsd.org From: Kazuyuki Shudo 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> 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: Mon, 13 Nov 2006 10:39:47 -0000 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/