Choice of C compiler doesn't matter much for Java...

Article: Nehalem Performance Preview
By: Henrik S (henrik.stahl.delete@this.nospam.oracle.nothanks.com), April 11, 2009 10:06 pm
Room: Moderated Discussions
EduardoS (no@spam.com) on 4/11/09 wrote:
---------------------------
>Henrik S (henrik.stahl@nospam.oracle.nothanks.com) on 4/11/09 wrote:
>---------------------------
>>Sure, what did you have in mind more specifically?
>
>1) Does Large (Huge) pages made difference? Don't know if >Rockit uses them...

It's JRockit with a J. Yes, you enable large pages with a -Xlargepages flag, which will use large pages both for JIT compiled code and the Java heap, to avoid ITLB and DLTB misses respectively. Java is susceptible to both of these issues; ITLB because many J2EE apps tend to have very big code bases and DLTB because of the random access nature of the Java heap.

SPECjbb2005 is a relatively small app from a code perspective, so the main benefit from large pages is for the Java heap. IIRC, the impact is on the order of 10%. jbb is quite memory intensive and has few other bottlenecks, so the benefit to your average Java application is probably slightly less but still noticeable.

>2) There is some differences in OSes (Linux, Solaris, Windows, ect) that may change
>the result? Like schedulling and memory allocation.

Well, the OS has to work as expected or the result might be bad. For example, Windows 2003 had issues handling affinitized large page allocation on NUMA (AMD and Nehalem) systems, so the JVM had to work around that by allocating a page at a time (iirc) instead of just doing the equivalent of mmap:ing the whole heap in one go. We have had issues with large pages and NUMA on Linux too, but not in recent years.

Apart from that, we don't use the OS much for SPECjbb2005. Threads are mapped 1-to-1 to OS threads, so thread scheduling matters a bit. The JVM handles its memory allocation itself from a large mmaped memory area. Locks in Java code are implemented as adaptive spinlocks in the JVM (when they are not removed by the optimizer, or "ignored" through the lazyunlocking feature). And jbb doesn't use other OS facilities since there is very little I/O going on.

>3) Any specific OS function that the JVM rely?

mmap/VirtualAlloc :-)

On Linux, we did see a benefit from the introduction of NPTL in 2.6 kernels, and from epoll on workloads like SPECjAppServer. We make some use of libnuma on Linux etc.

All OSes that we support are rather mature. I suspect that if we ported JRockit to a less common server OS (like OSX) then we would see other bottlenecks.

>So... If I change the version of Windows, what could change the result?

No difference between Windows 2003 and 2008. We get slightly higher scores (1%?) on Windows than Linux, something we believe can be partially attributed to a gcc compiler optimization we don't use on Linux (omit_frame_pointer), but we haven't analyzed it lately so it may be something else (if any Linux gurus here feel like figuring that one out, I'd be happy to help them get started).

Henrik
< Previous Post in ThreadNext Post in Thread >
TopicPosted ByDate
Nehalem review upDavid Kanter2009/04/07 02:43 AM
  Nehalem review upnoone2009/04/07 05:48 AM
  Strange jbb on HarpertownHenrik S2009/04/07 07:29 AM
    Strange jbb on HarpertownDavid Kanter2009/04/07 10:19 AM
      Strange jbb on HarpertownHenrik S2009/04/07 08:33 PM
        Strange jbb on HarpertownChris2009/04/07 11:54 PM
          Strange jbb on HarpertownHenrik S2009/04/08 01:40 AM
  Nehalem review upVincent Diepeveen2009/04/07 07:34 AM
    Nehalem review upJack2009/04/09 03:51 PM
      Nehalem review upVincent Diepeveen2009/04/10 12:58 AM
        Nehalem review upMichael S2009/04/10 02:45 AM
          Nehalem review upEduardoS2009/04/10 06:01 AM
            Nehalem review upMichael S2009/04/10 06:56 AM
          Nehalem review upEugene Nalimov2009/04/10 08:12 AM
          Choice of C compiler doesn't matter much for Java...Henrik S2009/04/10 09:10 AM
            Choice of C compiler doesn't matter much for Java...EduardoS2009/04/10 01:49 PM
              Choice of C compiler doesn't matter much for Java...Henrik S2009/04/11 06:13 AM
                Choice of C compiler doesn't matter much for Java...EduardoS2009/04/11 10:30 AM
                  Large pagesDavid Kanter2009/04/11 01:02 PM
                  Choice of C compiler doesn't matter much for Java...Henrik S2009/04/11 10:06 PM
                    Choice of C compiler doesn't matter much for Java...Paul2009/04/12 12:53 AM
                      Choice of C compiler doesn't matter much for Java...iz2009/04/12 01:59 AM
                      Choice of C compiler doesn't matter much for Java...Henrik S2009/04/12 06:37 AM
                    Choice of C compiler doesn't matter much for Java...EduardoS2009/04/12 07:08 AM
                      Choice of C compiler doesn't matter much for Java...Henrik S2009/04/12 08:25 AM
                        Choice of C compiler doesn't matter much for Java...EduardoS2009/04/12 04:24 PM
                          Choice of C compiler doesn't matter much for Java...Henrik S2009/04/12 09:18 PM
                            Thread costsDavid Kanter2009/04/12 11:12 PM
                              Thread costsHenrik S2009/04/14 01:08 PM
            Choice of C compiler doesn't matter much for Java...Michael S2009/04/11 07:53 AM
              Choice of C compiler doesn't matter much for Java...Henrik S2009/04/11 10:08 PM
          Nehalem review upVincent Diepeveen2009/04/11 03:50 PM
            Nehalem review upMichael S2009/04/11 04:12 PM
              Nehalem review upVincent Diepeveen2009/04/12 02:01 AM
                Nehalem review upMichael S2009/04/12 04:07 AM
  Nehalem review uprwessel2009/04/07 01:01 PM
    Nehalem review upslacker2009/04/08 08:11 AM
      Energy vs. powerDavid Kanter2009/04/08 09:11 AM
        Energy vs. powerVincent Diepeveen2009/04/10 01:08 AM
          Energy vs. powerslacker2009/04/10 08:26 AM
            Energy vs. powerRagingDragon2009/04/10 09:19 AM
              Energy vs. powerDavid Kanter2009/04/10 10:47 AM
              Energy vs. powerJack2009/04/10 03:44 PM
                Energy vs. powerslacker2009/04/10 06:00 PM
                  Energy vs. powerJack2009/04/10 06:31 PM
                  Energy vs. powerDavid Kanter2009/04/10 11:16 PM
      Nehalem review uprwessel2009/04/08 01:32 PM
  Minor font issuegpriatko2009/04/07 03:35 PM
    Minor HTML issueDavid Kanter2009/04/07 08:38 PM
      Minor HTML issueDavid Kanter2009/04/07 08:39 PM
  Good work, i look forward to linux and SP2 numbers (NT)PiedPiper2009/04/08 12:52 AM
  Nehalem review upJoe Chang2009/04/10 02:59 AM
Reply to this Topic
Name:
Email:
Topic:
Body: No Text
How do you spell avocado?