Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
WildFly Performance Tuning
WildFly Performance Tuning

WildFly Performance Tuning: Develop high-performing server applications using the widely successful WildFly platform , Third Edition

eBook
Can$12.99 Can$55.99
Paperback
Can$69.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

WildFly Performance Tuning

Chapter 2. Tools of the Tuning Trade

In order to practically and efficiently tune a system, you will need the support of some good tools that cover the different aspects of performance tuning. In this chapter, we will focus on the following:

  • The following key features of performance tuning:
    • Profiling
    • Monitoring
    • Load generation
  • Some theory behind these features
  • How the features are being implemented in a few well-known tools
  • Making sure that the tools and WildFly get along
  • Some common use cases that the tools provide support for

There are some great performance-tuning tools on the market from various different vendors, but as we're following the Open Source philosophy in this book, all the tools we will use here come from the open source ecosystem. If you use tools from vendors other than the ones mentioned here, don't worry! This is natural and is something that we as authors come across time and again when assisting various organizations. As long as your toolset is complete...

The key features of performance tuning

Some of the tools in the tuning area have started out with support for one thing or, perhaps, for a few things such as memory analysis or load testing. Over time, however, quite a few of them have evolved in their own right or with the aid of plugins to often have multiple functions. They also often cover several areas in the tuning field.

So, what kind of support do we expect from a set of tuning tools? When looking at the enterprise stack, it becomes clear that we need different types of tools depending on the different layers of the stack:

  • For the Java-based layers of the stack—the JVM, middleware, and application—you'll first and foremost need to perform performance and memory profiling.
  • For the network, hardware, and OS layers, you will mainly need to monitor various resources such as CPU, memory, and network throughput.
  • On top of these, you also need to be able to put the system and its various components under the defined levels...

Profiling

In general, profiling a software system involves analyzing the behavior and performance usage of resources that are involved, as the system executes. This analysis is most often performed to find points of optimization and for the removal of bottlenecks in the system. Profiling is also commonly, but not necessarily, performed under various levels of load on the system.

Profiling is a very powerful function for investigating and helping resolve suspected bottlenecks. Profiling can also be very complex, and the wrong interpretations may lead to disastrous results. It should, therefore, only be performed in stable environments, preferably, by staff that has shown an aptitude for it.

Profiling in production

Conducting profiling during software development and in the performance-tuning phase is quite normal. Then, you're normally confined to your personal development environment such as your desktop/laptop or some test environment where the effects that the actual profiling has on...

Profiling and sampling

In the Java universe, profiling technically involves instrumenting the Java bytecode in order to make accurate calculations of execution down to the method level. Instrumenting the Java bytecode is a time-consuming operation that is performed for all code in the JVM when profiling starts. The amount of instrumented bytecode can, however, be limited by defining what should be included or excluded, thereby speeding up the instrumentation time in profiling. Depending on tool support, theses definitions can be done on package, class, or method level. As the profiling terminates, the bytecode is normally restored.

Sampling is a kind of lightweight profiling. Instead of physically instrumenting the Java bytecode as done in profiling, sampling relies on analyzing the stack traces and thread dumps that are taken at regular time intervals. These intervals can be defined, for example to 10 per second.

So, what approach should you use? As always, the answer is that it depends...

VisualVM

A very useful and free JVM profiler is VisualVM. At the time of writing this book, this tool normally comes bundled when you download and install the Java Development Kit (JDK) from the Oracle Java site (http://www.oracle.com/technetwork/java/javase). In this distribution, the tool is located in $JAVA_HOME/bin and named jvisualvm.sh (for UNIX-based environments) or jvisualvm.bat (for Windows).

As an alternative, you can download it from its own site (http://visualvm.java.net). This is where you'll find the unbranded bleeding-edge version.

The core of VisualVM is shared by the NetBeans IDE (https://netbeans.org). So, if you use the NetBeans profiler, you'll be using a lot of the functionality that is the same as those found in VisualVM, but with differentiating workflows. There's also a launcher plugin of VisualVM for the Eclipse IDE (http://eclipse.org) available at https://visualvm.java.net/eclipse-launcher.html.

All examples in this book are based on the current...

Monitoring

Keeping track of how your system reacts to different types of influences is imperative when you're testing it, tuning it, and over time in production. The measured values are extremely useful for both technical and business trend analysis as well as for comparing the performance between releases. When done correctly, these trends and comparisons can save your organization a lot of headache and enable it to quickly predict and adapt to upcoming problems.

There are explicit tools that monitor specific features and services, and there are others that give a more collective view of system health and performance. As we have seen, tools such as VisualVM can provide us with a multitude of information from various layers in the enterprise stack. It will give you the basic information about the hardware in terms of CPU usage, and as expected, it will provide a lot of information about the JVM as well as the middleware and the execution of inherent applications within the JVM.

A system...

The key features of performance tuning


Some of the tools in the tuning area have started out with support for one thing or, perhaps, for a few things such as memory analysis or load testing. Over time, however, quite a few of them have evolved in their own right or with the aid of plugins to often have multiple functions. They also often cover several areas in the tuning field.

So, what kind of support do we expect from a set of tuning tools? When looking at the enterprise stack, it becomes clear that we need different types of tools depending on the different layers of the stack:

  • For the Java-based layers of the stack—the JVM, middleware, and application—you'll first and foremost need to perform performance and memory profiling.

  • For the network, hardware, and OS layers, you will mainly need to monitor various resources such as CPU, memory, and network throughput.

  • On top of these, you also need to be able to put the system and its various components under the defined levels of stress or load...

Profiling


In general, profiling a software system involves analyzing the behavior and performance usage of resources that are involved, as the system executes. This analysis is most often performed to find points of optimization and for the removal of bottlenecks in the system. Profiling is also commonly, but not necessarily, performed under various levels of load on the system.

Profiling is a very powerful function for investigating and helping resolve suspected bottlenecks. Profiling can also be very complex, and the wrong interpretations may lead to disastrous results. It should, therefore, only be performed in stable environments, preferably, by staff that has shown an aptitude for it.

Profiling in production

Conducting profiling during software development and in the performance-tuning phase is quite normal. Then, you're normally confined to your personal development environment such as your desktop/laptop or some test environment where the effects that the actual profiling has on the...

Profiling and sampling


In the Java universe, profiling technically involves instrumenting the Java bytecode in order to make accurate calculations of execution down to the method level. Instrumenting the Java bytecode is a time-consuming operation that is performed for all code in the JVM when profiling starts. The amount of instrumented bytecode can, however, be limited by defining what should be included or excluded, thereby speeding up the instrumentation time in profiling. Depending on tool support, theses definitions can be done on package, class, or method level. As the profiling terminates, the bytecode is normally restored.

Sampling is a kind of lightweight profiling. Instead of physically instrumenting the Java bytecode as done in profiling, sampling relies on analyzing the stack traces and thread dumps that are taken at regular time intervals. These intervals can be defined, for example to 10 per second.

So, what approach should you use? As always, the answer is that it depends on...

VisualVM


A very useful and free JVM profiler is VisualVM. At the time of writing this book, this tool normally comes bundled when you download and install the Java Development Kit (JDK) from the Oracle Java site (http://www.oracle.com/technetwork/java/javase). In this distribution, the tool is located in $JAVA_HOME/bin and named jvisualvm.sh (for UNIX-based environments) or jvisualvm.bat (for Windows).

As an alternative, you can download it from its own site (http://visualvm.java.net). This is where you'll find the unbranded bleeding-edge version.

The core of VisualVM is shared by the NetBeans IDE (https://netbeans.org). So, if you use the NetBeans profiler, you'll be using a lot of the functionality that is the same as those found in VisualVM, but with differentiating workflows. There's also a launcher plugin of VisualVM for the Eclipse IDE (http://eclipse.org) available at https://visualvm.java.net/eclipse-launcher.html.

All examples in this book are based on the current version, VisualVM...

Monitoring


Keeping track of how your system reacts to different types of influences is imperative when you're testing it, tuning it, and over time in production. The measured values are extremely useful for both technical and business trend analysis as well as for comparing the performance between releases. When done correctly, these trends and comparisons can save your organization a lot of headache and enable it to quickly predict and adapt to upcoming problems.

There are explicit tools that monitor specific features and services, and there are others that give a more collective view of system health and performance. As we have seen, tools such as VisualVM can provide us with a multitude of information from various layers in the enterprise stack. It will give you the basic information about the hardware in terms of CPU usage, and as expected, it will provide a lot of information about the JVM as well as the middleware and the execution of inherent applications within the JVM.

A system that...

Left arrow icon Right arrow icon

Description

Packed with practical examples, this book looks at a different aspect of performance tuning in each chapter and shows you how to apply them to their existing Java applications. Anyone with an interest in learning more and improving the performance of Java-based technology in general, all the way to WildFly in particular, will find this book useful.

What you will learn

  • Tune and monitor an OS, a JVM, and WildFly with components and applications
  • Make various tuning tools work with WildFly
  • Configure and tune the JVM by analyzing its behavior
  • Understand numerous best practices and howtos
  • Monitor and tune various JEE technologies within WildFly, such as EJBs, WebServices, and JSFbased applications
  • Know the insandouts for getting the most out of the platform, its components, and surrounding infrastructure
  • Discover how to tune a clustered WildFly environment

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jun 25, 2014
Length: 330 pages
Edition : 3rd
Language : English
ISBN-13 : 9781783980574
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Jun 25, 2014
Length: 330 pages
Edition : 3rd
Language : English
ISBN-13 : 9781783980574
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just Can$6 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just Can$6 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total Can$ 209.97
WildFly Configuration, Deployment, and Administration - Second Edition
Can$69.99
WildFly Performance Tuning
Can$69.99
Java EE 7 Development with WildFly
Can$69.99
Total Can$ 209.97 Stars icon
Banner background image

Table of Contents

11 Chapters
1. The Science of Performance Tuning Chevron down icon Chevron up icon
2. Tools of the Tuning Trade Chevron down icon Chevron up icon
3. Tuning the Java Virtual Machine Chevron down icon Chevron up icon
4. Tuning WildFly Chevron down icon Chevron up icon
5. EJB Tuning in WildFly Chevron down icon Chevron up icon
6. Tuning the Persistence Layer Chevron down icon Chevron up icon
7. Tuning the Web Container in WildFly Chevron down icon Chevron up icon
8. Tuning Web Applications and Services Chevron down icon Chevron up icon
9. JMS and HornetQ Chevron down icon Chevron up icon
10. WildFly Clustering Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.8
(6 Ratings)
5 star 16.7%
4 star 66.7%
3 star 0%
2 star 16.7%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Sergiy Pylypets Aug 04, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book surprised me in a positive way. While expecting to read a manual for WildFly configuration and tuning, I found the book to be also a useful guide for the performance tuning of Java EE applications and JVM itself. It covers relational databases, their design and optimization, JDBC, ORM technologies, like Hibernate and JPA, Servlets and JSP, JMS, SOAP and REST Web services, and some other technologies. The content is arranged in a consistent way. The first chapter contains an interesting discussion of performance tuning essentials, approaches and methodologies used for optimization. The second chapter refers tools and applications useful for tuning and monitoring different parts of Java EE systems. The third chapter provides information about JVM optimization for the most common use cases. The next chapters describe performance tuning of the WildFly server and its subsystems, like EJB, persistence layer, Web container, Web applications and services. The last chapter provides receipts for tuning WildFly clusters. The book language is clear and precise. The content includes numerous illustrations, like schemes, tables, and screenshots. Some chapters contain brief technical reminders to refresh knowledge of the technologies being discussed. All these features add value to the book. Also, there are some interesting historical reviews, like WildFly's history or The evolution of web frameworks. In general, I think that this book can be useful for any Software engineer, for anybody who is interested in the performance tuning of computer applications.
Amazon Verified review Amazon
M. Eisele Aug 05, 2014
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
The ContentBeside the title, the book is a more general resource for performance tuning around Java EE applications. Most of the chapters do not really rely on WildFly but give general hints about performance tuning essentials, approaches and methodologies used for optimization, like the first chapter. The second chapter covers tools for monitoring and tuning of various Java EE subsystems.Chapter three gives a introductory overview about general JVM tuning principles and applies to any JVM development. Beginning with chapter four it is going to be a bit closer to WildFly. EJBs are covered in chapter 5, JMS in chapter 9 and a general pattern here is to refer to Java EE concepts and apply the WildFly specific examples and extensions.Writing and StyleThe language is clear and precise. Additional illustrations, tables, and screenshots make it an easy and understandable read. Occasional basic information about Java EE components and concepts make it easy to follow for beginners, too.Conclusion and recommendationBeside the title who implies a very narrow focus, this is a book which can be a useful read for almost any Java EE developer out there. The explanations are good and helpful. If you ever had to deal with performance tuning you probably know most of those concepts but having them all in one place also makes this a perfect reference for the experienced developers.
Amazon Verified review Amazon
Dustin Marx Jul 29, 2014
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Wildfly Performance Tuning presents concepts, tips, and suggestions related to performance of WildFly-hosted applications that include both Java EE standard performance ideas and ideas that are unique to tuning WildFly performance. Because WildFly is an implementation of Java EE, it's not surprising that some of the performance tuning concepts covered in this book are Java EE general and could be applied to other Java EE application servers as well."WildFly Performance Tuning" has ten chapters and the first, second, third chapters and sixth chapters have very little WildFly-specific detail in them. They are more general and mostly apply to other Java EE application servers as well. In some cases, they are even more general than Java EE, applying to Java SE and other languages in some cases. Chapter 3 is among the best introductory overviews I have seen of general JVM tuning principles in a single chapter and mostly applies to any JVM development (not limited to WildFly).Chapter 4 is a general WildFly tuning chapter and the remainder of the chapters focus on components/specifications of Java EE (and of WildFly). For example, Chapter 5 covers tuning EJBs on WildFly and Chapter 9 covers tuning JMS on WildFly. Most of these chapters provide WildFly-specific concepts and examples as well as Java EE-general concepts and examples.Packt Publishing provided me with a PDF version of this book that is the subject of this review, but I have received no compensation for the review.It was nice to have the color screen snapshots in the PDF version of this book. The code examples are well-formatted, but they do not have color coded syntax and do not include line numbers.
Amazon Verified review Amazon
Allen Polo Nov 03, 2017
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Some tips but there are many performance issues that not get addressed, like tools that could be used, how to make a plan for performance improvement issues, how to attack based on a strategy.
Amazon Verified review Amazon
Kindle Customer Sep 17, 2014
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
This book focuses on the latest iteration of the JBoss JEE server, Wildfly. Like many performance books, it offers advice that applies to performance in general, JEE specifically, and a particular technology (Wildfly) especially.The first three chapters deal with methodology for performance tuning, tools of the trade (especially open source tools), and JVM tuning. The first chapter contains material that will be largely familiar to anyone who's done much tuning in the past, but is good for those who are new to tuning. The second chapter outlines tools that will probably be familiar to experienced tuners. There are some good tips here. The third chapter explains JVM tuning. Combined, these three chapters make for a good background for Java tuning.The next six chapters deal with Wildfly. They introduce the server in general, then specifically address EJBs, Persistence/JPA, Web Container (Undertow), Web Applications and Web Services (to include REST), and JMS. These chapters include some really good expert-level tips. If you are a user of Wildfly (or the product version, Red Hat's EAP) then these chapters alone will probably make the book a worthwhile purchase. There's some good advice here for users of other JEE servers, but the real value here is for JBoss users.The final chapter covers Wildfly clustering. If you use Wildfly (or the product equivalent, EAP) for production use, you will want to know about clustering.I thought the book was very strong from a technical standpoint. Users of Wildfly (future EAP) will be quite pleased with the solid advice provided.All things considered, I'd recommend this book for any Wildfly / EAP user. Users of other JEE servers (WebSphere, WebLogic) might consider it, but won't get the same bang for the buck. Users of JEE in general should benefit strongly from the first chapters, but the application-specific tips won't all fit.About 300 pages, this one is worth the money if this is your work area.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.