From owner-freebsd-java@FreeBSD.ORG Wed Feb 27 16:16:14 2013 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F23C5A67 for ; Wed, 27 Feb 2013 16:16:14 +0000 (UTC) (envelope-from jurij.kovacic@ocpea.com) Received: from out-1.mail.amis.net (out-1.mail.amis.net [IPv6:2001:15c0:ffff:f::4]) by mx1.freebsd.org (Postfix) with ESMTP id 9BB77C20 for ; Wed, 27 Feb 2013 16:16:14 +0000 (UTC) Received: from in-1.mail.amis.net (in-1.mail.amis.net [IPv6:2001:15c0:ffff:f::15]) by out-1.mail.amis.net (Postfix) with ESMTP id D588F4616C; Wed, 27 Feb 2013 17:16:12 +0100 (CET) Received: from in-1.mail.amis.net (localhost [127.0.0.1]) by in-1.mail.amis.net (Postfix) with ESMTP id CBE4314EC85; Wed, 27 Feb 2013 17:16:12 +0100 (CET) X-Virus-Scanned: amavisd-new at amis.net X-Spam-Flag: NO X-Spam-Score: -1 X-Spam-Level: X-Spam-Status: No, score=-1 required=5 tests=[ALL_TRUSTED=-1] autolearn=disabled Received: from in-1.mail.amis.net ([127.0.0.1]) by in-1.mail.amis.net (in-1.mail.amis.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sRlCUCap5lL2; Wed, 27 Feb 2013 17:16:10 +0100 (CET) Received: from smtp1.amis.net (smtp1.amis.net [IPv6:2001:15c0:ffff:f::41]) by in-1.mail.amis.net (Postfix) with ESMTP id 6819514EC93; Wed, 27 Feb 2013 17:16:10 +0100 (CET) Received: from [213.157.241.232] (dhcp-213-157-241-232.amis.si [213.157.241.232]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp1.amis.net (Postfix) with ESMTPSA id 4778DC2DD2; Wed, 27 Feb 2013 17:16:10 +0100 (CET) Message-ID: <512E3148.3000906@ocpea.com> Date: Wed, 27 Feb 2013 17:16:08 +0100 From: "Jurij Kovacic, OCPEA d.o.o." User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130221 Thunderbird/17.0.3 MIME-Version: 1.0 To: Ronald Klop Subject: Re: Java threads on multiple processor cores References: <51283B84.5050709@ocpea.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-java@freebsd.org 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: Wed, 27 Feb 2013 16:16:15 -0000 Hello! On 02/24/2013 10:50 PM, Ronald Klop wrote: > 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. First of all, thank you very much for your reply. As it has turned out, I was not too precise in my earlier question - after some testing I have found that after some intense page reloading, full GC gets triggered. The thread running uses 100% of one core,while all the other threads (presumably), have to wait for it to finish. Is there any way to make full GC run in multiple threads? Kind regards, Jurij