azul zing java performance ebook

20
Zing ® The Java Supercharger Java for the Real Time Business From the award-winning leader in Java runtime technology

Upload: azul-systems-inc

Post on 10-May-2015

1.079 views

Category:

Technology


5 download

DESCRIPTION

This eBook describes the barriers to consistent performance for Java applications and how to overcome them. It uses real world examples in enterprise search (Solr/Lucene), SaaS, low latency and user interactive applications. The eBook provides information on how to accurately measure Java application performance and how to achieve consistency.

TRANSCRIPT

Zing®

The Java Supercharger

Java for the Real Time Business

From the award-winning

leader in Java runtime technology

Table of Contents

Java Performance Barriers . . . . . . . . . . . . . . . . . . . .3

A Better Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4

Measuring Java Performance . . . . . . . . . . . . . . . . . .5 Real World Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . .6 Tuning? Nah . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Java for the Real Time Business

2

1Java Performance Barriers

Java performance is great – until it isn’t .

This graph is all too familiar to Java

shops . As usage grows, then suddenly

processing stops or the JVM crashes .

Sometimes this is due to out-of-memory

errors or the JVM pausing to perform

garbage collection .

Login attempts

Minutes

Restart

Total players in the game

10,000

8,000

6,000

4,000

2,000

0

Legacy JVMs h i t scaLabiL i ty L iMits

Graph courtesy of Smart Bomb Interactive

Java for the Real Time Business

3

2A Better Java: Zing Innovations

Zing is a better JVM that delivers:

Consistent response times, even under load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Java SE compliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Efficient hardware and human capital utilization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Faster time to market for new features and applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

New avenues for business innovation and additional revenue

Java for the Real Time Business

Z ing incorporates aZuL’s unique c4 “pauseLess” garbage coLLect ion aLgorithM

4

3How you measure and report the

performance of your systems is critical .

Response time is usually NOT a normal

distribution . You need to understand both

the average and maximums . Azul’s jHiccup

tool was designed to provide an accurate

view of a production application .

Read more about how NOT to measure

latency here .

DownLoaD the open source Jh iccup tooL

Measuring Java Performance

An average response time of 0 .8 msec is good, right?

Not if the maximum response time violates your SLA, frustrates your customers or causes you to miss revenue opportunities .

Hiccups by Time Interval

Hiccups by Percentile Distribution

Max=49.728

0% 90% 99% 99.9% 99.99% 99.999%

0 100 200 300 400 500 600 700 800 900

Elapsed Time (sec)

60

50

40

30

20

10

0

60

50

40

30

20

10

0

Hiccups by Percentile Distribution

Max=3448.832

0% 90% 99% 99.9% 99.99% 99.999% 9.9999%

4000

3500

3000

2500

2000

1500

1000

500

0

Max Per Interval 99% 99.90% 99.99% Max

Java for the Real Time Business

5

4““

Real World Examples

Example 1: Supercharging Search

This example is from NetDocuments,

one of the first SaaS companies .

Their application is built around search .

In testing on Apache Solr™, their current

JVM experienced pauses of almost

50 seconds .

Running on Zing, the max pause was

under 10 milliseconds .

60 sec

50 sec

40 sec

Ap

plic

atio

n P

ause

, in

mse

c

Minutes

0

30 sec

20 sec

10 sec

60 seccecc

500 sesecceecc

404000 seseecccc

Ap

plic

atio

n P

ause

, in

mse

c

0

303000 sesecccceecccss

20 eeecccceeccccs

10 ececsee

s

ee

ee

10 msec

0

DownLoaD the netDocuMents case stuDy

Without Zing we would not have been able to deploy Apache Solr for our production system . Our customers could have experienced long pauses when searching for critical documents .

– Mou Nandi, Search Engineer and Architect NetDocuments

Java for the Real Time Business

6

Zing: The Java Supercharger

Mike McCandless, Apache Lucene

committer and PMC member tested

Lucene on Zing . His results clearly show

the response time advantages of using

Zing with Lucene deployed with a large

RAMDirectory:

…I remain impressed with Zing, and I wish its C4 collector were the default for Java! Then we all would stop having any GC worries and could freely use Java with very large heaps, funda- mentally changing how we build software in this age of very cheap RAM

– Mike McCandless Apache Lucene committer and PMC member

reaD Mike ‘s bLog posts

0% 500 1000 1500 2000

200

180

160

140

120

100

80

60

40

20

0

20,000

15,000

10,000

5,000

0

Res

pons

e Ti

me

(mse

c)

Max Response Time vs QPS

QPS

CMS MMap

CMS RAM

Zing RAM

100 300 500 700 900

MAX: 8.768MIN: 0.062AVG: 0.4290 Percentile: 0.6999 Percentile: 4.06

0% 500 1000 1500 2000

200

180

160

140

120

100

80

60

40

20

0

MAX: 790.528MIN: 0.062AVG: 9.4290 Percentile: 5.8499 Percentile: 337.76

Java for the Real Time Business

7

Zing Supercharges Search

In-memory indices of 60 GB and more . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2 - 3X more throughput on the same hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Seamless service and consistent response times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

New opportunities for innovation

DownLoaD a tr iaL copy of Z ing

This example is from a digital and

web-based services provider that did a

side-by-side comparison of Apache Solr

on three different JVMs .

Using Zing they were able to lower

response times 60% and eliminate

outliers.

1400

1200

1000

800

600

400

200

0Median 90% 95% 99% 99.99% Max

percentile

mill

esec

ond

s

HotSpot JVM OpenJDK™ Azul Zing

Java for the Real Time Business

8

““

Example 2

Low Latency Applications

Low latency can refer to machine-level

(microseconds) or user interactive levels

(milliseconds) . Both types of applica-

tions benefit from Zing’s ability to deliver

consistent response .

This machine-level benchmark from

Push Technology highlights the advan-

tages gained from deploying Zing .

Zing delivered 15X more throughput

than Oracle’s HotSpot and eliminated

long response time outliers .

DownLoaD the benchMark report

. . .by running Diffusion™ on Zing, application pauses in latency critical deployments can be effectively removed .

– Push Technology Benchmark Report August 2013

80

70

60

50

40

30

20

10

00% 90% 99% 99.9% 99.99% 99.999%

Service Level Agreement25 Milliseconds Max

HotSpot JVM 15k Users

HotSot JVM 10k Users

HotSpot JVM 5k Users

Azul Zing 15k Users

Percentile

Hic

cup

Dis

tribu

tion

(mse

c)

Java for the Real Time Business

9

““

This benchmark from a financial industry

consulting firm compared performance of

an algo trading engine running under high

load stress on Oracle’s HotSpot vs . Zing .

Oracle’s HotSpotMax response time

790 msec

ZingMax response time

8 .768 msec

Under high stress, Zing shows much lower application latency in comparison to HotSpot .

– Consulting Report

0% 500 1000 1500 2000

200

180

160

140

120

100

80

60

40

20

0

20,000

15,000

10,000

5,000

0

Res

pons

e Ti

me

(mse

c)

Max Response Time vs QPS

QPS

CMS MMap

CMS RAM

Zing RAM

100 300 500 700 900

MAX: 8.768MIN: 0.062AVG: 0.4290 Percentile: 0.6999 Percentile: 4.06

0% 500 1000 1500 2000

200

180

160

140

120

100

80

60

40

20

0

MAX: 790.528MIN: 0.062AVG: 9.4290 Percentile: 5.8499 Percentile: 337.76

Java for the Real Time Business

reaD the white paper JaVa without the J i t ter10

Login attempts

Minutes

Restart

Total players in the game

10,000

8,000

6,000

4,000

2,000

0

DownLoaD the sMart boMb interact iVe case stuDy

Example 3

User Interactive Applications

User interactive applications also need

low latency, just on a different scale .

Users are demanding and will only wait

a couple seconds before clicking away .

Remember this graph?

It’s a recipe for user frustration .

Zing eliminated pauses, stalls and

restarts, and allowed Smart Bomb Inter-

active to grow from 8,000 to 20,000

social gaming users per server– 2 .5X

more capacity on the same hardware–

just by implementing Zing .

““

Azul Zing removed an unacceptable limit on the scalability of our online gaming experience . We’ll use Zing everywhere we need to avoid garbage collection issues .

– Jeff Amis, VP Product Development Smart Bomb Interactive

Java for the Real Time Business

11

Solution – Deploy on Zing

Eliminated GC Pauses . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Reports can be rebuilt more often to incorporate the latest data . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Adding report filters is nearly instantaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Developers have more time to spend adding value for customers

Performance Issues

GC Pauses up to 2 minutes long . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Reports couldn’t be rebuilt often enough as new data was added . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Adding report filters was too slowDevelopers spending too much time on performance tuning and not enough on features

Vocalabs, which provides SaaS-based customer feedback

programs, provides this example . Their report generation

system continually receives new data . As the number of

users grew, this led to unacceptably long GC pauses .

Java for the Real Time Business

12 DownLoaD the VocaLabs case stuDy

This wireless operator replaced 16 JVM instances with a single 98 GB Zing instance . . . . . . . . . . . . . . . . . . . . . . . . . . Better SLA compliance (response times consistently under 2 msec) . . . . . . . . . . . . . . . . . . . . . . . . . . Able to consolidate their online store processing onto a single server from 16, freeing up resources for other initiatives

Long pauses limited their existing JVM to 4 GB heaps

This example is from a Global telecommunications company:

This example is from SuccessFactors, a major SaaS provider:

Could use only a few GB of heap/instance before pauses became intolerable . . . . . . . . . . . . . . . . . . . . . . . . . . Under load the environment became unstable and repeatedly crashed due to out-of-memory errors . . . . . . . . . . . . . . . . . . . . . . . . . . The company overprovisioned the systems with memory, but this led to low utilization rates outside of peak periods

Increased throughput 4X and user capacity/instance by 2 .4X . . . . . . . . . . . . . . . . . . . . . . . . . . Simplified the infrastructure 3X improved reliability

Scale Up Not Out!

““

With Zing, we can scale up with software . – CIO, SuccessFactors With Zing, we get 2 ½ times the number of users on the same hardware–without crashing . – CIO, Social Gaming Company

Java for the Real Time Business

13

5Tuning? Nah

For most JVMs, tuning parameters look like this

Developers and IT staff can spend hours,

days, and weeks tuning and retuning their

JVM flags each time the application changes .

This is time that would be better spent adding

new capabilities for your business . (And your

developers will be more productive, too!)

Java for the Real Time Business

14

For Zing, tuning parameters look like this

That’s it . Just set the memory high and go .

Now your developers can spend their time do-

ing what they like to do–adding features and

building new capabilities .

And with Zing, there’s no need to re-tune your

JVM when your app changes .

Java for the Real Time Business

15

6Dramatically improve your ROI

Eliminate most JVM tuning

3Days, even weeks of lost developer hours each time the application is modified

Capture lost revenue opportunities

3Retail/eCommerce: increase shopping cart success rates 3% or more

3Insurance: increase success rates for online quoting

3Real time advertising: more successful bids for increased click-through and revenue

3HFT, algo trading, Forex: never miss a trade due to platform stalls

Increase infrastructure efficiency

3Handle 2 - 3X more users or transactions on existing hardware

3Get 40% more utilization from your current servers

3Delay or cancel new hardware purchases

Pursue new opportunities

3Launch Cloud or SaaS services not practical with other JVM technology

3Deploy new algos faster to create competitive advantage

3Add memory-intensive eCommerce features that increase conversion rates and order size

3Manage risk of new initiatives better using more comprehensive real time information

DownLoaD the roi white paper

Java for the Real Time Business

16

7Read Gil Tene’s Blog Post: How Java Got the Hiccups

DownLoaD Jh iccup (free)

anD reaD More on how to use i t here

Getting Started

First, see what your application performance looks like now .

Download and run jHiccup, Azul’s open source Java performance measurement tool . It will create graphs like these:

1

2

Hiccups by Time Interval

Hiccups by Percentile Distribution

Max=49.728

0% 90% 99% 99.9% 99.99% 99.999%

0 100 200 300 400 500 600 700 800 900

Elapsed Time (sec)

60

50

40

30

20

10

0

60

50

40

30

20

10

0

Hiccups by Percentile Distribution

Max=3448.832

0% 90% 99% 99.9% 99.99% 99.999% 9.9999%

4000

3500

3000

2500

2000

1500

1000

500

0

Max Per Interval 99% 99.90% 99.99% Max

Java for the Real Time Business

17

Next, get Zing .

Download and run Azul Inspector to gather information on your current Java deployment .

Request a free trial copy of Zing .

Download and install your copy (takes about 5 minutes) .

Work with your assigned Azul Engineer to optimize and tune your app and environment to achieve the best results .

3

4000

3500

3000

2500

2000

1500

1000

500

0

80

70

60

50

40

30

20

10

0

Hic

cu

p D

ura

tio

n (

mse

c)

La

ten

cy

(mse

c)

12:33:07 13:45:07 14:57:07 16:09:07 17:21:07

0% 90% 99% 99.9% 99.99% 999.999%

Time

Percentile

Oracle’s Hotspot

Oracle’s HotSpot

Zing

Zing

67xImprovement

222xImprovement

Zing delivers loweraverage response time; 1000x lowerworst case response time

FreeTrial

Java for the Real Time Business

18

8Summary

Zing makes all your Java applications run

better – with consistent and reliable

performance – to better support the needs

of your business

Zing – The Java Supercharger

Eliminates pauses, stalls and jitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Supports heaps over 300 GB with no performance penalty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Reduces tuning to just a few parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Opens up new avenues for business innovation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Frees Developers to spend more time adding value for customers

Java for the Real Time Business

Z ing specif icat ions19

@

Learn More

Transform all your applications for

real time business .

contact us20

www .azulsystems .com/zing