Preface

Welcome to the Java® Performance Companion. This book offers companion material to Java™ Performance [1], which was first published in September 2011. Although the additional topics covered in this book are not as broad as the material in Java™ Performance, they go into enormous detail. The topics covered in this book are the G1 garbage collector, also known as the Garbage First garbage collector, and the Java HotSpot VM Serviceability Agent. There is also an appendix that covers additional HotSpot VM command-line options of interest that were not included in the Java™ Performance appendix on HotSpot VM command-line options.

If you are currently using Java 8, have interest in migrating to Java 8, or have plans for using Java 9, you will likely be either evaluating G1 GC or already using it. Hence, the information in this book will be useful to you. If you have interest in diagnosing unexpected HotSpot VM failures, or in learning more about the details of a modern Java Virtual Machine, this book’s content on the HotSpot VM Serviceability Agent should be of value to you, too. The HotSpot VM Serviceability Agent is the tool of choice for not only HotSpot VM developers but also the Oracle support engineers whose daily job involves diagnosing and troubleshooting unexpected HotSpot VM behavior.

This book begins with an overview of the G1 garbage collector by offering some context around why G1 was implemented and included in HotSpot VM as a GC. It then goes on to offer an overview of how the G1 garbage collector works. This chapter is followed by two additional chapters on G1. The first is an in-depth description of the internals of G1. If you already have a good understanding of how the G1 garbage collector works, and either have a need to further fine-tune G1 or want to know more about its inner workings, this chapter would be a great place to start. The third chapter on G1 is all about fine-tuning G1 for your application. One of the main design points for G1 was to simplify the tuning required to realize good performance. For instance, the major inputs into G1 are the initial and maximum Java heap size it can use, and a maximum GC pause time you are willing to tolerate. From there G1 will attempt to adaptively adjust to meet those inputs while it executes your application. In circumstances where you would like to achieve better performance, or you would like to do some additional tuning on G1, this chapter has the information you are looking for.

The remaining chapter is dedicated entirely to the HotSpot VM Serviceability Agent. This chapter provides an in-depth description of and instructions for how to use the Serviceability Agent. If you have interest in learning more about the internals of the HotSpot VM, or how to troubleshoot and diagnose unexpected HotSpot VM issues, this is a good chapter for you. In this chapter you will learn how to use the HotSpot VM Serviceability Agent to observe and analyze HotSpot VM behavior in a variety of ways through examples and illustrations.

Last, there is an appendix that includes HotSpot VM command-line options that were not included in Java™ Performance’s appendix on HotSpot VM command-line options. Many of the HotSpot VM command-line options found in the appendix are related to G1. And, rather than merely listing these options with only a description, an attempt is made to also mention when it is appropriate to use them.

References

[1] Charlie Hunt and Binu John. JavaTM Performance. Addison-Wesley, Upper Saddle River, NJ, 2012. ISBN 978-0-13-714252-1.


Register your copy of Java® Performance Companion at informit.com for convenient access to downloads, updates, and corrections as they become available. To start the registration process, go to informit.com/register and log in or create an account. Enter the product ISBN (9780133796827) and click Submit. Once the process is complete, you will find any available bonus content under “Registered Products.”


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.126.56