WildFly Performance Tuning
eBook - ePub

WildFly Performance Tuning

  1. 330 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

WildFly Performance Tuning

About this book

In Detail

The hugely successful JBoss Application Server has been updated and is now called WildFly. This cutting edge technology provides a free JEE-certified platform for the software of today and tomorrow. Learning to tune such a platform for optimal performance is vital for a healthy business organization, efficient development, and the smooth running of operations.

This practical book explores how to tune one of the leading open source application servers in its latest reincarnation. In this book, you will learn what performance tuning is and how it can be performed on WildFly and the JVM using solely free and open source tools and utilities.

Learn about various free tools for performance monitoring and tuning, all focused on making them work with WildFly. The tuning journey ventures through the landscape of the major JEE technologies, EJB, Servlets, JPA, JSF, and JMS. Discover best practices for the internal high-performing web container Undertow, WebServices, and REST services so that you end your journey feeling confident in tuning WildFly for optimal performance.

Approach

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.

Who this book is for

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.

Trusted by 375,005 students

Access to over 1 million titles for a fair monthly price.

Study more efficiently using our study tools.

Information

Year
2014
Edition
1
eBook ISBN
9781783980567

WildFly Performance Tuning


Table of Contents

WildFly Performance Tuning
Credits
About the Authors
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. The Science of Performance Tuning
Performance
Response time
Throughput
Utilization efficiency
Scalability
Performance tuning anti-patterns
The one-off
The wrong team
The lack of mandate
The clever developer
Software development and quality assurance
Software development with performance focus
Analysis
Design
Implementation
Performance testing and tuning
The iterative performance-tuning process
Test cases and iteration
Setting the baseline
Running tests and collecting data
Analyzing the data
Tuning and retesting
Test data
Documentation
The environment of performance tests
The software life cycle
Upgrades
Metrics
Tuning an enterprise stack
Network
Hardware
Operating System
Java Virtual Machine
Middleware
Application
Summary
2. Tools of the Tuning Trade
The key features of performance tuning
Profiling
Profiling in production
Profiling a JVM
Profiling and sampling
VisualVM
Standard features
The features of plugins
Connecting to a JVM
Local JVM
Remote JVM
On the remote host
On the monitoring host
Monitoring a JVM
Features
Test scenarios
A JMX connection to WildFly
Local or remote WildFly server
Setting up VisualVM
Connection in VisualVM
Monitoring
OS tools
Unix and Linux
Low CPU utilization
High CPU utilization
High resource contention
High disk utilization
OS X
Windows
WildFly tools
The Command-line Interface
The WildFly Management Console
JBoss DMR
JConsole
Generating load
Apache JMeter
Building a basic test plan
Improving the test plan
Recording a web session using the JMeter HTTP proxy
Standalone and distributed load generation
Summary
3. Tuning the Java Virtual Machine
JVM
JVM memory areas
The JVM stack and native stack
The heap
Other JVM memory concepts
GC
JVM memory management with the GC
Configuring the JVM
Default settings
Client versus Server VM
The stack
The heap
Setting the maximum heap size
Setting the initial heap size
Determining what maximum size the heap should be
Determining what initial size the heap should be
Setting the size of the young and old generations
Setting the size ratio of Eden and the survivor spaces
PermGen
Large objects
Large memory pages
The java.lang.OutOfMemoryError error
From the heap
From the PermGen
Too large an array
Not enough native threads
Memory leaks
A leak-finding process
A step-by-step example using VisualVM
Types of GC strategies
The serial collector
The parallel collector
The concurrent collector
The G1 collector
Which collector to use
Setting VM parameters in WildFly
Having the relevant information available
VM parameters in production
verbose:gc
PrintGCDetails
PrintTenuringDistribution
loggc
Using tools
VM and GC stability
Summary
4. Tuning WildFly
WildFly's history
WildFly's architecture
Various subsystem configurations
The thread pool executor subsystem
unbounded-queue-thread-pool
bounded-queue-thread-pool
blocking-bounded-queue-thread-pool
queueless-thread-pool
blocking-queueless-thread-pool
scheduled-thread-pool
Monitoring
The future of the thread subsystem
Java EE Connector Architecture and resource adapters
The Batch API subsystem
The Remoting subsystem
The Transactions subsystem
XA – Two Phase Commit (2PC)
Logging
Optimized logging code
Performance tuning logging in WildFly
Logging to the console
Logging to files
Using asynchronous logging to improve log throughput
Logging hierarchy and performance
Per-deployment logging
Summary
5. EJB Tuning in WildFly
The history of EJBs
The different types of EJBs
Stateless Session Beans (SLSB)
Stateful Session Beans
Singleton Session Beans
Message Driven Beans (MDB)
Performance tuning EJBs in WildFly
Enabling detailed statistics
Optimizations of Local and Remote method calls
Session beans and transactions
Remote EJB calls
Optimizing Stateless Session Beans
Tuning the SLSB pool
Optimizing Stateful Session Beans
Disabling passivation for individual SFSB
Optimizing Singleton Session Beans
Adjust lock mechanisms and time-outs
Container Managed Concurrency versus Bean Managed Concurrency
Monitoring
Optimizing Message Driven Beans
Summary
6. Tuning the Persistence Layer
Designing a good database
Database normalization and denormalization
Database partitioning
Horizontal partitioning
Vertical partitioning
Using indexes
Tuning the Java Database Connectivity API
Connection pooling
Performance tuning a connection pool in WildFly
Setting the proper fetch size
Using batch updates for bulk insert/updates
Prepared statements
Isolation levels
Tuning JDBC networking
Tuning JPA and Hibernate
Optimizing object retrieval
Transactional integrity and performance
Limiting retrieved data by pagination
Fetching parent and child objects
Combining pagination and JOIN fetches
Improving the speed of collection queries using batches
Minimizing query compilation with JPA-named queries
Improving the performance of bulk SQL statements
Entity caching
The first-level cache
The second-level cache
The query cache
Query hints
Entity versus query cache
Optimizing data synchronization
Summary
7. Tuning the Web Container in WildFly
Enter Undertow
Undertow internals
HTTP Upgrades
The default caching of static resources
Server and container topologies
Using XNIO...

Table of contents

  1. WildFly Performance Tuning

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access WildFly Performance Tuning by Arnold Johansson, Anders Welen in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in JavaScript. We have over one million books available in our catalogue for you to explore.