Java™ Zone - Devices that use JavaWith built-in support for concurrent programming to make multi-threading easier, Java technology is already taking advantage of some of the benefits of AMD’s platform. But there’s a lot more going on between AMD and the Java community that you may not know about. AMD Java Labs has been working with the major JVM vendors for several years now, helping to improve JVM performance, finding ways to make Java work better across multi-core environments, deal with data concurrency more efficiently, and handle garbage collection more effectively. We are building performance advantages directly into Java tools and environments, making developers’ jobs easier. Read on to learn more. View datasheet: Java™ Technology on AMD Opteron™ Processors

Tools and Downloads

Aparapi: Aparapi is an API for expressing data parallel workloads in Java. Learn more

Apache Hadoop Performance-tuning Methodologies and Best Practices

Apache Hadoop Performance-tuning Methodologies
and Best Practices

This guide attempts to educate the audience on the challenges involved in tuning performance of a Hadoop setup, the different tools available for monitoring and diagnosing performance bottlenecks, tuning best practices, empirical data on the effect of various tunings on performance, and some possible future directions.

This guide attempts to educate the audience on the challenges involved in tuning performance of a Hadoop setup, the different tools available for monitoring and diagnosing performance bottlenecks, tuning best practices, empirical data on the effect of various tunings on performance, and some possible future directions.

CodeSleuth

CodeSleuth is an open source Eclipse plug-in that brings the functionality of AMD CodeAnalyst to Java code. CodeSleuth uses AMD CodeAnalyst to collect and analyze compiled Java code from within the Eclipse IDE. This tool enables you to track counter information from raw address locations, through the machine code emitted by Java Virtual Machines (JVMs), and back to the Java source. Once you identify the location of performance issues in the Java source, you can modify the code to improve application performance.

Community

AMD Java Labs Blog

OpenJDK

Our work with the OpenJDK project has yielded faster performance over the years, and we continue to contribute to the project for key improvements.

One such contribution was a small yet useful code change. Previously, the 32-bit OpenJDK JVM emitted VectorPath instructions to carry out left shift operations on certain data types. We made changes to the JVM source so that low latency DirectPath instructions get generated in certain left shift operations. This yielded approximately 33% improvement on a micro-benchmark that we used for testing this code change.

Another recent contribution helps overcome a long standing problem in the HotSpot JVM, that is that there was no mechanism in the JVM to recover if the code cache of compiled Java methods became full. Our solution, developed in coordination with the Sun/Oracle Hotspot team, allows the program to continue normal operation, keeping the JIT compilers operating normally, and the application continues to run at full speed with basically no noticeable effect on the performance of the application.

Java Posse Podcast

April 14, 2009

The Java Posse interviews Azeem Jiva, Gary Frost, and Ben Pollan to discuss a range of topics, including JVM performance, multi-core programming, developer tools, and more.

Send us your feedback

We’d like to hear your thoughts and ideas on how we can better help you with your Java programming needs. Whether it’s a feature enhancement you’d like to see implemented, a technical topic you want to learn more about, or a discussion topic you want us to blog about, we want to know. Have an application that is highly scalable, has low latency, or just plain runs great on AMD hardware? Let us know about it and we’ll feature it in our blogs.

Technical Articles

Architecture-specific code generation changes for Java programs often require modifying the Java Virtual Machine (JVM) to support new target machine instructions or sequences of these instructions. This article discusses how to add this support to the Oracle® Java HotSpot Virtual Machine, using as a running example the addition of an instruction sequence for a floating-point conditional move optimization. By the end of this article, the reader should better understand the process of adding new instructions or instruction sequences that support their own optimizations.

This article takes a detailed look at the garbage collection (GC) characteristics of TeraSort workload running on top of an Apache Hadoop framework deployed on a seven-node cluster. We discuss our recommendations for Java Virtual Machine (JVM) flags that can help tune GC behavior on a similar TeraSort setup and show how GC tuning helped us achieve as much as a 7% gain in TeraSort’s performance on our experimental cluster. We also discuss GC characteristics and associated tuning guidelines for both Map and Reduce task JVMs.

This article looks at the effect of enabling the attachment of a debugger on Java application performance, specifically examining a piece of the Java Platform Debugger Architecture called the JDWP agent. We will see how this agent may cause unexpected negative effects on performance on some Java Virtual Machines (JVMs), even when we are not actually debugging. We will then show how we applied some changes to improve the performance of the Hotspot JVM in the OpenJDK when it is started with debugging enabled but the debugger has not yet attached.

Computer virtualization during the last five years has spread to standard x86 based servers and personal computers. Follow along in this article as we explore some virtual machine configurations running Java and various settings that affect its performance.

The number of flags that someone can change on the Sun Java Virtual Machine (JVM) is astounding. Most of them are garbage collection (GC)-related and have many dependencies, not only on the system you are using but also to each other. Tuning GC flags seems like it should be difficult and error-prone, but following a few easy steps can help improve application performance in only a few minutes.

This article explains why inlined methods raise challenges for source mapping and how the Java Virtual Machine can make inlining information visible to tools by passing it through the JVMTI layer. AMD Java Labs has implemented this technique, which we call JVMTI Event Piggybacking, in the Sun Hotspot JVM without changing the JVMTI specification.

Learn about this free and open source Eclipse plugin designed to give programmers access to CPU performance counter data within a familiar software development environment.

Learn about how the AMD Opteron™ processor can handle large memory pages in a Java Virtual Machine (JVM) and why large pages can improve performance.

Learn how AMD CodeAnalyst can be used to profile Java applications and analyze their performance.

Got a lot of threads to run? Leverage multicore and multiprocessor hardware by putting them in a pool. Then, Java 5.0′s extensive thread-pool capabilities will manage them for you.

Using AMD CodeAnalyst™ to profile Java applications.

From Sun Developer Network:

Conference Sessions

Accelerating Java Workloads via GPUs
JavaOne 2010 Technical Session

Session ID: S313888
Speaker: Gary Frost

Abstract::
Multicore CPUs are no longer new, and optimized Java Virtual Machines already enable you to easily take advantage of them. The next wave of opportunities will come from tapping graphics processing unit (GPU) computing resources.

This session will explore tools, techniques, and APIs that help exploit GPUs to yield huge performance boosts for compute-intensive workloads. It will cover:

  • What to expect in performance from a GPU
  • How Java can be used to offload computations
  • How to identify Java workloads suitable for offloading
  • Tools, techniques, and APIs available today

This session is for Java developers who want to explore the GPU capabilities to drive better application performance or simply want to stay ahead of new technologies.

The Role of the Microprocessor in the Evolution of Java Technology
JavaOne 2008 Keynote
Speaker: Leendert van Doorn, Senior Fellow, AMD

Abstract:
As our every day lives continue to move toward web-based management and as application portability becomes a priority – for education, banking, commerce and more – applications must be able to respond in Internet time. In this session, AMD will offer its vision for Java technology, address the importance of industry-wide support of the technology and offer insight into the key role hardware plays in Java technology’s proliferation and the impact on the end customer.

Virtualizing a Virtual Machine
JavaOne 2008 Technical Session

Session ID: TS-5227
Track: Java Platform, Enterprise Edition (Java EE)
Speakers: Azeem Jiva, AMD; Shrinivas Joshi, AMD

Abstract:
The current trend in Java™ Platform, Enterprise Edition (Java EE platform) server application deployments is to deploy servers in a virtualized environment. Virtualization enables you to deploy several Java EE technology-based application servers in isolation onto a single physical system, lowering costs on hardware, data center space, and power.

Virtualization adds an abstraction layer between the host operating system and the virtualized guest application. This abstraction is a trade-off between performance and ease of maintenance, but there are techniques for maximizing performance. This session discusses various virtualization techniques, including bare metal, paravirtualization, and platform virtualization. It demonstrates virtualization best practices as they pertain to Java technology-based enterprise applications and how Java virtual machines are affected by virtualization. Attendees will learn about performance, resource allocation, bottlenecks, and consolidation.

Analyzing Java Performance Using Hardware Performance Counters
EclipseCon 2008 Technical Session
Speaker: Gary Frost, AMD

Abstract:
Most Java profilers depend upon timing information to help developers locate performance issues. Although this timing information can be useful for finding ‘hot’ methods, quite often the reason why the method is problematic is not revealed and is left as an exercise for the reader.

In this talk we will demonstrate CodeSleuth, an open source Eclipse plugin which can collect data from performance counters embedded within the CPU and correlate with the original Java source.

Information from these counters can provide insight into interactions between processor and code that can be used to determine the cause of performance issues.

Armed with this information developers can consider alternate code choices to avoid such performance bottlenecks. We will walk through various examples and will show how some typical code patterns may be refactored to improve performance.

Other Resources

Sun Java site