eBook: Improving Java performance using Zing, an advanced JVM
Zing. The Java Super Charger. Java for Real Time Business.
Check out this eBook which shares real world examples of how our product, Zing, knocks the ball out of the park as being one of the best JVMs in the business! We talk about measuring Java performance, real world Java use cases and how to get started with Zing!
Please contact us at info at azulsystems dot com or on Twitter:
@azulsystems
http://www.azulsystems.com
Thank you!
3. 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 hit scalability limits
Graph courtesy of Smart Bomb Interactive
Java for the Real Time Business
3
5. 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 jHiccup 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 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
Java for the Real Time Business
5
6. 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
ApplicationPause,inmsec
Minutes
0
30 sec
20 sec
10 sec
60 seccecc
500 sesecceecc
404000 seseecccc
ApplicationPause,inmsec
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
7. “
“
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%
200
180
160
140
120
100
80
60
40
20
0
20,000
15,000
10,000
5,000
0
ResponseTime(msec)
Max Response Time vs QPS
QPS
CMS MMap
CMS RAM
Zing RAM
100 300 500 700 900
MAX
MIN:
AVG
90 P
99 P
0%
200
180
160
140
120
100
80
60
40
20
0
MAX:
MIN:
AVG:
90 Pe
99 Pe
Java for the Real Time Business
7
8. 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 trial copy of Zing
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
0
Median 90% 95% 99% 99.99% Max
percentile
milleseconds
HotSpot JVM OpenJDK™ Azul Zing
Java for the Real Time Business
8
9. “
“
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
0
0% 90% 99% 99.9% 99.99% 99.999%
Service Level Agreement
25 Milliseconds Max
HotSpot JVM 15k Users
HotSot JVM 10k Users
HotSpot JVM 5k Users
Azul Zing 15k Users
Percentile
HiccupDistribution(msec)
Java for the Real Time Business
9
10. “
“
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 HotSpot
Max response time
790msec
Zing
Max response time
8.768msec
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
MAX: 8.768
MIN: 0.062
AVG: 0.42
90 Percentile: 0.69
99 Percentile: 4.06
0% 500 1000 1500 2000
200
180
160
140
120
100
80
60
40
20
0
MAX: 790.528
MIN: 0.062
AVG: 9.42
90 Percentile: 5.84
99 Percentile: 337.76
Java for the Real Time Business
Read the white paper Java without the Jitter10
11. Login attempts
Minutes
Restart
Total players
in the game
10,000
8,000
6,000
4,000
2,000
0
Download the Smart Bomb Interactive 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
12. 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 slow
Developers 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
13. 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
14. 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
15. 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
16. 6Dramatically improve your ROI
Eliminate most JVM tuning
3 Days, even weeks of lost developer hours each time the application is modified
Capture lost revenue opportunities
3 Retail/eCommerce: increase shopping cart success rates 3% or more
3 Insurance: increase success rates for online quoting
3 Real time advertising: more successful bids for increased click-through and revenue
3 HFT, algo trading, Forex: never miss a trade due to platform stalls
Increase infrastructure efficiency
3 Handle 2 - 3X more users or transactions on existing hardware
3 Get 40% more utilization from your current servers
3 Delay or cancel new hardware purchases
Pursue new opportunities
3 Launch Cloud or SaaS services not practical with other JVM technology
3 Deploy new algos faster to create competitive advantage
3 Add memory-intensive eCommerce features that increase conversion rates and order size
3 Manage risk of new initiatives better using more comprehensive real time information
Download the ROI white paper
Java for the Real Time Business
16
17. 7Read Gil Tene’s Blog Post: How Java Got the Hiccups
Download jHiccup (free)
and read more on how to use it 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
Max Per Interval 99% 99.90% 99.99% Max
Java for the Real Time Business
17
18. 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
80
70
60
50
40
30
20
10
0
HiccupDuration(msec)Latency(msec)
0% 90% 99% 99.9% 99.99% 999.999%
Percentile
Oracle’s
Hotspot
Oracle’s HotSpot
Zing
Zing
67x
Improvement
222x
Improvement
Zing delivers lo
average respon
time; 1000x low
worst case
response time
Free
Trial
Java for the Real Time Business
18
19. 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
Zing Specifications19
20. @
Learn More
Transform all your applications for
real time business.
CONTACT US20
www.azulsystems.com/zing