From owner-freebsd-java@FreeBSD.ORG Sun Feb 24 21:50:34 2013 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6BCDDE0E for ; Sun, 24 Feb 2013 21:50:34 +0000 (UTC) (envelope-from ronald-freebsd8@klop.yi.org) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.78]) by mx1.freebsd.org (Postfix) with ESMTP id 0E9857C7 for ; Sun, 24 Feb 2013 21:50:33 +0000 (UTC) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1U9jSq-0008IJ-Mr; Sun, 24 Feb 2013 22:50:33 +0100 Received: from h253044.upc-h.chello.nl ([62.194.253.44] helo=pinky) by smtp.greenhost.nl with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1U9jSp-0001Io-Sn; Sun, 24 Feb 2013 22:50:32 +0100 Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes To: freebsd-java@freebsd.org, "Jurij Kovacic, OCPEA d.o.o." Subject: Re: Java threads on multiple processor cores References: <51283B84.5050709@ocpea.com> Date: Sun, 24 Feb 2013 22:50:32 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Ronald Klop" Message-ID: In-Reply-To: <51283B84.5050709@ocpea.com> User-Agent: Opera Mail/12.14 (Win32) X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: 0.8 X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.1 X-Scan-Signature: b011d5308189b8f364b008c39e0eea9f X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Feb 2013 21:50:34 -0000 On Sat, 23 Feb 2013 04:46:12 +0100, Jurij Kovacic, OCPEA d.o.o. wrote: > Hi, > > I am running JBoss application server inside a jail on FreeBSD 8.3. > Since the server has a quad-core processor, it would be efficient if the > java process (and its threads) could utilize more than 1 CPU core at a > time, which is not currently the case. > > Is it possible to acomplish this (perhaps with the use of a proper > threading library) or am I barking up the wrong tree? > > Thank you for your reply, > Jurij I don't think there is a clear answer on this. It all depends on what is running in your JBoss application server. If that application does not use more than one thread, there is nothing going to use the other cores. If your application uses multiple threads and you are sure they should all be calculating very hard than you should debug the application for bottlenecks. And look if the bottleneck is in the application code, in the JDK or in FreeBSD. This is not possible without inside information of what your application is doing. Ronald.