Processing lots of data with Java can require significant computing power. Oracle engineers have taken a two prong approach to improving Java performance. First, on general Java performance, Oracle's SPARC M7 and SPARC S7 processors provide up to a 1.5x performance per core advantage over x86 cores as shown by these benchmark results "SPECjbb2015: SPARC T7-1 World Record for 1 Chip Result" and "SPECjbb2015: SPARC S7-2 Multi-JVM and Distributed Results". This was achieved by focusing on Java (JVM) performance as a goal in processor design. Second, using the Stream API in Java 8, we have a high-level, concise programming API that can be utilized to improve performance. The SPARC M7 and SPARC S7 processors contain the Data Analytics Accelerator (DAX) offload coprocessor that can provide 3x to 22x improvement for Java Streams processing. For more information on Java Streams and the performance benefits of using DAX, see "Accelerating Java Streams with the SPARC Data Analytics Accelerator".
The Stream API was introduced in Java 8. See "Processing Data with Java SE 8 Streams, Part 1" and "Part 2: Processing Data with Java SE 8 Streams" for more on what can be done using Java Streams. Java Streams can condense verbose collection processing code into simple and readable stream programs. These programs provide the ability to process data that can be accelerated on modern processors. You can write abstract, query-like code leveraging the Stream API without going into the details of iterating over the collection entities. Eclipse Collections offers an API that can also take advantage of accelerations due to Java Stream performance.
With the SPARC M7 processor, Oracle added a number of Software in Silicon (SWiS) features by building in higher-level software functions into the processor. One of the new features introduced in the SPARC M7 processor is called the Data Analytics Accelerator, or DAX, and the multiple DAX on the processor deliver unprecedented analytics efficiency. DAX is an integrated coprocessor which provides a specialized set of instructions that can run very selective functionality – Scan, Extract, Select, Filter, and Translate – at fast speeds. The multiple DAX share the same memory interface with the processors cores so the DAX can take full advantage of the 140-160 GB/sec memory bandwidth of the SPARC M7 processor. The DAX coprocessor were originally intended to speed up Oracle Database and have been used in production to run an SQL query in parallel at query rates of 170 billion rows/second.
Other programming methods have also been shown to be able to take advantage of DAX. As an example, consider how the SQL statement that is accelerated in the Oracle Database can be written in other programming styles. These additional programming styles can also be accelerated using DAX.
SQL (Oracle Database):
SELECT count(*) from citizen WHERE citizen.age > 18
Apache Spark SQL (DSL - Domain Specific Langauge, or Language Integrated Query)
val nvoters : Int = citizen.filter($”citizen.age” > 18).count()
Java Streams API
int nvoters = arrayList.parallelStream().filter(citizen-> citizen.olderThan(18)).count();
Eclipse Collections (formerly Goldman Sachs Collections)
int nvoters = fastList.count(citizen-> citizen.olderThan(18));
The DAX has also been used to accelerate other software applications such as ActivePivot from ActiveViam, and their results of 6x to 8x faster with DAX were reported at the 2016 Oracle Open World. More information on ActivePivot performance can be found at "Accelerating In-Memory Computing with ActivePivot on Oracle".
The following is a summary of the potential performance benefits of using DAX along with Java Streams.
Copyright 2016, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
The previous information is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle's products remains at the sole discretion of Oracle.