JBoss AS 5 Performance Tuning
|Also available on:|
- 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 DetailsLanguage : 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, JBoss, Open Source
Table of ContentsPreface
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
- 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
- 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
- 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
- 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 onesfrom 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?
- 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
- 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
- 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?
- 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
- 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
- Tuning web services
- Performance of web services
- Elements influencing the performance of web services
- Reducing the size of SOAP messages
- Faster JBossWS provider
Like many technicians, I respect technical knowledge. This book is crammed full of it, and it's all presented in a readable manner. What's the bottom line? I'd recommend this book to any JBoss user (strongly), any JEE developer (with little reservation, especially Tomcat users), or any Java coder (who has a little extra money to spend.)
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.
Errata- 1 submitted: last submission 06 Nov 2012
Errata type: Other | Page number: 5
Please ignore the Code Download tip, this book has no Code bundle
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.
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.