Return-Path: X-Original-To: apmail-jmeter-user-archive@www.apache.org Delivered-To: apmail-jmeter-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B6D649073 for ; Wed, 14 Dec 2011 15:41:21 +0000 (UTC) Received: (qmail 95761 invoked by uid 500); 14 Dec 2011 15:41:21 -0000 Delivered-To: apmail-jmeter-user-archive@jmeter.apache.org Received: (qmail 95730 invoked by uid 500); 14 Dec 2011 15:41:21 -0000 Mailing-List: contact user-help@jmeter.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "JMeter Users List" Delivered-To: mailing list user@jmeter.apache.org Received: (qmail 95721 invoked by uid 99); 14 Dec 2011 15:41:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Dec 2011 15:41:21 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of woolfel@gmail.com designates 209.85.212.43 as permitted sender) Received: from [209.85.212.43] (HELO mail-vw0-f43.google.com) (209.85.212.43) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Dec 2011 15:41:12 +0000 Received: by vbbfq11 with SMTP id fq11so856833vbb.2 for ; Wed, 14 Dec 2011 07:40:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=Rslac7Jlyx1zh8iwElvuLgH9CWz8mFxhefrGw+pCKfQ=; b=ShS0PJ7p5/g1LjvoEz9LQCWFOqFqPS6tIuquO9Z45wehzXK0R+zObFnyHb8XM3K37k ko0R1PFBKZ3QXjZ7yIwoXkl2xAMOtwxRyt0vXVIBOYTXOVIzNnq9VaFRiLLSCryEvUnS VwkrSDDWYpcsSUjG5dwsZqehQ6QlWYtDfnRIc= MIME-Version: 1.0 Received: by 10.52.66.65 with SMTP id d1mr4952882vdt.108.1323877252046; Wed, 14 Dec 2011 07:40:52 -0800 (PST) Received: by 10.220.193.13 with HTTP; Wed, 14 Dec 2011 07:40:51 -0800 (PST) In-Reply-To: References: Date: Wed, 14 Dec 2011 10:40:51 -0500 Message-ID: Subject: Re: Performance OpenJDK compared with SunJDK From: Peter Lin To: JMeter Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Great discussion by the way. Before I talked to henrik, I had no clue how complex timers are in the JVM. It was too much info to fit in my brain and got GC-ed. I can only imagine what Azul is seeing with their hardware. On Wed, Dec 14, 2011 at 10:33 AM, Kirk wrote: > Well, I'm not sure why he's seeing a difference in performance. I've not = spoken to Henrik about timers so I can't comment on what he's telling you. = I can only say that there is currently an open CR w.r.t monotonic timers an= d there is some discussion on the subject in the CR. I've also spoken to Cl= iff Click about Azul timers and to point to the confusion here.. he was cer= tain that the JDK was using the TSC, something that I was told by Charlie H= unt wasn't the case. So I went digging to find out which of these two was r= ight. Turns out the answer is pretty complicated as it really depends on th= e OS and what the hardware has. RedHat was the last to touch the OpenJDK ti= mer code and they did so only in the Linux build and only to have the high = res timer used if it was available. > > Not a very clear picture.. and all of these timers come with their own se= t of faults.. which could be worked around if only we knew which one was be= ing used =A0;-) > > And to add to the confusion is thread scheduler efficiency which comes in= to play.... and I'm very suspicious of hypervisor interference with thread = scheduling.Azul has found some very very weird (almost harmonic) interferen= ce patterns that can adversely =A0affect the ability to utilize cores. With= out access to proper counters it's almost impossible to say for sure whats = going on. > > Regards, > Kirk > > On Dec 14, 2011, at 4:09 PM, Peter Lin wrote: > >> thanks kirk for digging up those details. >> >> My memory is faulty, but that is basically what henrik told me back in >> 2006/2007. I had noticed a difference between System.currentTimeMillis >> and System.nanoTime on all JVM (sun, jrockit, ibm). Digging deeper, >> henrik explained to me that windows uses the high performance timer, >> which is considerably faster than linux timer. >> >> I agree that more threads results in more pressure on the thread schedul= er. >> >> what got me curious is the user sees a difference between openJDK and >> sunJDK. perhaps there is some other process running on that linux >> system contributing to the extra CPU load. >> >> >> On Wed, Dec 14, 2011 at 10:00 AM, Kirk wrote= : >>>> >>>> >>>> Unfortunately it turns out that nanoTime drifts quite badly relative >>>> to currentTimeMillis, so currentTimeMillis has to be used to anchor >>>> that drift. >>>> Otherwise the times just don't add up properly. >>>> >>>> The JMeter property "sampleresult.useNanoTime" can be set to "false" >>>> to disable the use of nanoTime. >>> >>> Right, if nanoTime in Windows uses a TSC I would expect drift especiall= y on newer processors. Not all cores receive all clocks and since the value= in the TSC * CPu frequency is the current time, not having an accurate cou= nt of clocks would cause drift. currentTimeMillis relying on a RTC would ha= ve smaller amounts of drift which would only be noticed between machines (w= hich would be correct with NTP). So your correction of drift would be consi= stent with this. On Solaris, the drift between the TOD clock and the TSC is= correct after a 1ms drift 125us at a time. I think MS has attempted someth= ing similar (due to complaints from gamers) but I'm not aware of the detail= s. >>> >>> Regards, >>> Kirk >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org >>> For additional commands, e-mail: user-help@jmeter.apache.org >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org >> For additional commands, e-mail: user-help@jmeter.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org > For additional commands, e-mail: user-help@jmeter.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org For additional commands, e-mail: user-help@jmeter.apache.org