售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
JBoss AS 5 Performance Tuning
Table of Contents
JBoss AS 5 Performance Tuning
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
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
How long should data collection last?
Analyze data
Configure and test again
Tuning Java Enterprise applications
Areas of tuning
Summary
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
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
Step # 1: Finding the maximum heap (-Xmx)
Step # 2: Finding the initial heap size (-Xms)
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
Consideration #1
Consideration #2
Action
Further optimization
Summary
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
Two things to be aware of:
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
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
When things get wilder
Is it possible that Stateful Beans are faster then Stateless Beans?
Session Beans and Transactions
Customizing JBoss EJB container policies
Customizing the single deployment unit
Introduction to the Java Messaging system
Entering the JBoss Messaging system
Tuning JBoss JMS provider
Tuning JBoss Messaging (JBoss AS 5.x)
How do you tune the JBoss Messaging Connection factory?
How do you tune JBoss Messaging destinations?
Tuning HornetQ (JBoss AS 6.x)
How to configure HornetQ journal for optimal performance?
How do you configure HornetQ transport for optimal performance?
Basic JMS tuning
An example use case with HornetQ
Summary
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
Combining join fetches and paging
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
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
Configuring the isolationLevel
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
8. Tomcat Web Server Tuning
JBoss Web server basics
Configuring Connectors for optimal performance
How do you calculate the threads for your application?
A concrete example
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
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
The wisdom behind these benchmarks
Summary
A. A Tuned Mind
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜