JBoss AS 5 Performance Tuning

JBoss AS 5 Performance Tuning
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 15%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • Follow the practical examples to make your applications as efficient as possible
  • Written to version 5.1 and includes advice on upgrading to version 6.0
  • Accurately configure the persistence layer and clustering service
  • Learn how to tune all components and hardware

Book Details

Language : English
Paperback : 312 pages [ 235mm x 191mm ]
Release Date : December 2010
ISBN : 184951402X
ISBN 13 : 9781849514026
Author(s) : Francesco Marchioni
Topics and Technologies : All Books, Enterprise Products and Platforms, JBoss, Open Source

Table of Contents

Chapter 1: Performance Tuning Concepts
Chapter 2: Installing the Tools for Tuning
Chapter 3: Tuning the Java Virtual Machine
Chapter 4: Tuning the JBoss AS
Chapter 5: Tuning the Middleware Services
Chapter 6: Tuning the Persistence Layer
Chapter 7: JBoss AS Cluster Tuning
Chapter 8: Tomcat Web Server Tuning
Chapter 9: Tuning Web Applications on JBoss AS
Appendix: A Tuned Mind
  • Chapter 1: Performance Tuning Concepts
    • Preface
    • What you will get from this book?
    • What is performance?
    • Scalability: the other side of performance
    • The tuning process
      • Tuning in the software development cycle
      • Building the performance test
        • Establish a baseline
        • Collect data
        • Analyze data
        • Configure and test again
    • Tuning Java Enterprise applications
      • Areas of tuning
    • Summary
    • Chapter 2: Installing the Tools for Tuning
      • Welcome to scientific tuning
        • The rationale behind the choice of the tools
      • Profiling the Java Virtual Machine
        • Installing the JVM
        • Installing VisualVM
          • Connecting to a local server
          • Connecting to a remote server
        • Monitoring your server
          • The Monitor tab
          • The Threads tab
          • The Profiler tab
        • Collecting snapshots
        • Extending VisualVM
      • Profiling your applications with Eclipse Test and Performance Tools Platform (TPTP) Project
        • Installing the TPTP suite
          • Updating Eclipse
        • How to profile an application
          • Going beyond the basics of TPTP
      • Load testing your application with JMeter
        • Building a Test Plan
          • Step 1: Create a Thread Group
          • Step 2: Create a Sampler
          • Step 3: Create a Listener
          • Making your test plan a bit more realistic
        • How to create a complex Test Plan
        • Running JMeter as a shell
      • Operating system tools and commands
        • Windows users
        • Unix users
          • Dealing with low CPU utilization
          • Dealing with high CPU utilization
          • Dealing with high resource contention
          • Dealing with high disk utilization
      • Summary
      • Chapter 3: Tuning the Java Virtual Machine
        • The starting point
        • Choosing the JVM settings
          • Setting the correct heap size
            • The correct amount of memory to grant your application
            • I cannot allocate enough memory for the JVM!
            • Where do I configure JVM settings in JBoss AS?
          • Sizing the garbage collector generations
        • Which is the correct ratio between the young and old generations?
          • The garbage collector algorithms
          • Choosing the right garbage collector for your application
            • The G1 garbage collector
          • Debugging garbage collection
          • Making good use of the memory
            • Avoid creating large Java objects
            • Handling 'Out of Memory' errors
            • Finding the memory leak in your code
        • A practical example
          • Application description
          • Setting up a test bed
            • Benchmark aftermath
        • Summary
        • Chapter 4: Tuning the JBoss AS
          • From release 4.x to 5.x, and on
            • Comparing server releases
            • Creating a custom application server configuration
          • JBoss AS pools
            • The System thread pool
              • Finding out if the System thread pool is a bottleneck
            • JDBC connection pool
              • Calculating the optimal min-pool-size and max-pool-size
              • Using Prepared Statements efficiently
              • Detecting connection leaks
              • Should you reuse connections or acquire new ones from the pool?
          • Logging for performance
            • Choosing the best logging strategy
              • Which is the fastest appender?
              • Should I use the AsyncAppender to improve my log throughput?
              • Which layout should I choose for my logs?
              • Is it enough to increase the log threshold to get rid of log charge?
              • How does logging hierarchy influence performance?
          • Summary
          • Chapter 5: Tuning the Middleware Services
            • Introduction to Enterprise Java Beans
              • Session Beans
                • How to configure the optimal size for stateless pool?
                • How to configure the optimal size of stateful cache?
                • Comparing SLSBs and SFSBs performance
                • Session Beans and Transactions
            • Introduction to the Java Messaging system
              • Entering the JBoss Messaging system
              • Tuning JBoss JMS provider
                • Tuning JBoss Messaging (JBoss AS 5.x)
                • Tuning HornetQ (JBoss AS 6.x)
                • Basic JMS tuning
            • An example use case with HornetQ
            • Summary
            • Chapter 6: Tuning the Persistence Layer
              • Designing a good database
                • Reducing the space needed by your database
                • Partitioning the database
                • Using indexes
              • Tuning JDBC
                • Using a Connection Pool
                • Setting the proper fetch size
                • Use batch updates for bulk insert/updates
                • Use Prepared Statements instead of Statements
                • Tuning JDBC networking
              • Tuning Hibernate and JPA
                • Optimizing object retrieval
                  • Limiting the amount of data fetched with pages
                  • Fetching parent and child items with a single query
                  • Speeding up your Hibernate queries with batches
                  • Using named queries to speed up your queries
                • Improving the performance of bulk SQL statements
              • Evaluating using caches to speed up your queries
                • Hibernate caches
                • The first-level cache
                • The second-level cache
                  • Configuring the second-level cache on JBoss AS
                • The query cache
                  • Entity cache versus query cache
              • Optimizing data synchronization
              • A sample use case
              • Summary
              • Chapter 7: JBoss AS Cluster Tuning
                • Introduction to JBoss clustering
                • Configuring JGroups transport
                  • How to optimize the UDP transport configuration
                  • How to optimize the JGroups' Protocol stack
                • Tuning JBoss Cache
                  • Understanding JBoss Cache configuration
                    • Configuring cacheMode
                    • Configuring cache concurrency
                • Tuning session replication
                  • Override SFSB's isModified method
                  • Use buddy replication
                    • Advanced buddy replication
                    • Buddy replication and session affinity
                  • Configure replication granularity and replication trigger
                    • How to configure the replication-trigger
                    • How to configure the replication-granularity
                  • Tuning cache storage
                    • Where does cache data get stored?
                • Summary
                • Chapter 8: Tomcat Web Server Tuning
                  • JBoss Web server basics
                    • Configuring Connectors for optimal performance
                      • How do you calculate the threads for your application?
                      • The long life of Web threads
                      • Is there a maximum amount of connections the Web server can handle?
                    • Using Apache Portable Runtime
                    • Integrating JBoss Web server with Apache Web server
                      • Load testing Apache-JBoss connectivity
                    • mod_cluster to the rescue?
                    • Last tips before rolling JBoss Web server in production
                  • Summary
                  • Chapter 9: Tuning Web Applications on JBoss AS
                    • Choosing a framework for your web applications
                      • Comparing framework performance
                        • The performance of tabular data
                        • The performance of rich tree
                      • Increasing the performance of JSF and RichFaces
                        • Configuring JSF state saving efficiently
                        • Using Ajax to speed up your JSF applications
                        • Speeding up CSS and JavaScript file loading
                    • Tuning web services
                      • Performance of web services
                        • Elements influencing the performance of web services
                        • Reducing the size of SOAP messages
                        • Faster JBossWS provider
                    • Summary

                    Francesco Marchioni

                    Francesco Marchioni is a Sun Certified Enterprise Architect employed for an Italian company based in Rome. He started learning Java in 1997 and since then has followed the path to the newest application program interfaces released by Sun. He joined the JBoss community in 2000, when the application server was running release 2.x.

                    He has spent many years as a software consultant, where he has envisioned many successful software migrations from vendor platforms to open source products such as JBoss AS, fulfilling the tight budget requirements of current times.

                    Over the past 5 years, he has been authoring technical articles for OReilly Media and is running an IT portal focused on JBoss products (http://www.mastertheboss.com).

                    He has authored the following titles:

                    • JBoss AS 5 Development, Packt Publishing (December 2009), which describes how to create and deploy Java Enterprise applications on JBoss AS (http://www.packtpub.com/jboss-as-5-development/book)
                    • AS 5 Performance Tuning, Packt Publishing (December 2010), which describes how to deliver fast and efficient applications on JBoss AS (http://www.packtpub.com/jboss-5-performance-tuning/book)
                    • JBoss AS 7 Configuration, Deployment, and Administration, Packt Publishing (December 2011), which covers all the aspects of the newest application server release (http://www.packtpub.com/jboss-as-7-configurationdeployment-administration/book)

                    He has also co-authored the book Infinispan Data Grid Platform, Packt Publishing (August 2012), with Manik Surtani, which covers all the aspects related to the configuration and development of applications using the Infinispan Data Grid Platform (http://www.packtpub.com/infinispan-data-grid-platform/book).

                    Submit Errata

                    Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


                    - 1 submitted: last submission 03 Mar 2014

                    Errata type: Other | Page number: 5

                    Please ignore the Code Download tip, this book has no Code bundle


                    Sample chapters

                    You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                    Frequently bought together

                    JBoss AS 5 Performance Tuning +    iPhone Game Blueprints =
                    50% Off
                    the second eBook
                    Price for both: $39.00

                    Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                    What you will learn from this book

                    • Understand the correct tuning methodology and how it fits into the overall software development cycle
                    • Install and configure the instruments for tuning, including VisualVM, JMeter, Eclipse TPTP Platform, and basic O/S tools
                    • Improve the performance of your application by properly configuring the JVM heap and the garbage collector knobs
                    • Efficiently configure the JBoss System Thread Pool, the Connection Pool, and the Logging Service
                    • Tune the middleware services including EJB tuning and JMS tuning
                    • Learn the principles of good database design and core concepts about Java Persistence API with special focus on JBoss's implementation (Hibernate)
                    • Set up the JBoss Clustering service both as a standalone solution and integrated with Apache Web server
                    • Configure the JBoss Web server (Tomcat) for optimal performance including the mod_jk, mod_proxy and mod_cluster modules.
                    • Develop faster web applications by tuning the JSF and RichFaces component libraries.


                    In Detail

                    Today's organizations need to deliver faster services to a large set of people and businesses. In order to survive this challenge, enterprises need to optimize the performance of their application server along with its components and hardware. Writing faster applications is no longer just an option for your products; it's an imperative requirement, which you cannot ignore.

                    JBoss AS 5 Performance Tuning will teach you how to deliver fast applications on the JBoss Application Server and Apache Tomcat, giving you a decisive competitive advantage over your competitors. You will learn how to optimize the hardware resources, meeting your application requirements with less expenditure.

                    The performance of Java Enterprise applications is the sum of a set of components including the Java Virtual Machine configuration, the application server configuration (in our case, JBoss AS), the application code itself and ultimately the operating system. This book will show you how to apply the correct tuning methodology and use the tuning tools that will help you to monitor and address any performance issues.

                    By looking more closely at the Java Virtual Machine, you will get a deeper understanding of what the available options are for your applications and how their performance will be affected. You will learn about thread pool tuning, EJB tuning, JMS tuning, Enterprise Java Beans, and the Java Messaging Service.

                    The persistence layer and JBoss Clustering service each have a chapter dedicated to them as they are two of the most crucial elements to configure correctly in order to run a fast application.

                    You will also learn how to tune your web server, enabling you to configure and develop web applications that get the most out of the embedded Tomcat web server.

                    A practical guide to configure and develop lightning fast applications on JBoss AS and its embedded web server, Apache Tomcat


                    Packed with practical examples, this book looks at a different aspect of performance tuning in each chapter and shows the reader how to apply them to their existing Java applications. Written to version 5.1, this book also has information about the upcoming 6.0 release and how you can upgrade your existing applications.

                    Who this book is for

                    This book is for Java architects who design and configure Enterprise applications. It is great for Java developers who want to get into the inner details of the application server and of the correct tuning methodology. Application testers will also find this book useful as they will learn how to monitor the performance of the middleware with the correct instruments.

                    Code Download and Errata
                    Packt Anytime, Anywhere
                    Register Books
                    Print Upgrades
                    eBook Downloads
                    Video Support
                    Contact Us
                    Awards Voting Nominations Previous Winners
                    Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                    Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software