SlideShare a Scribd company logo
Java Performance
Chapter 10
1
Saurav Basu
6/3/2020
Organization
1. Strategies, Approaches, and Methodologies
2. Operating System Performance Monitoring
3. JVM Overview
4. JVM Performance Monitoring
5. Java Application Profiling
6. Java Application Profiling - Tips & Tricks
7. Tuning the JVM - Step by Step
8. Benchmarking Java Applications
9. Benchmarking Multitiered Applications
10. Web Application Performance
11. Web Services Performance
12. Java Persistence & Enterprise Java Beans Performance
2
Web Application Performance
3
1. Web Container Architecture
2. Web Container Monitoring & Perf
3. Best Practices
Web Application Performance
4
1. Web Container Architecture
2. Web Container Monitoring & Perf
3. Best Practices
Web Application Performance
5
Web Container Architecture
Web Application Performance
6
1. Web Container Architecture
2. Web Container Monitoring & Perf
3. Best Practices
Web Application Performance
7
Web Container Monitoring
1. ThreadPool Parameters
2. Connection Queue Parameters
3. Keep Alive Tuning
4. Request Parameters
5. Custom MBean
Web Application Performance
8
Web Container Monitoring
1. ThreadPool Parameters
2. Connection Queue Parameters
3. Keep Alive Tuning
4. Request Parameters
5. Custom MBean
Web Application Performance
9
Web Container Monitoring
ThreadPool Parameters
Web Application Performance
10
Web Container Monitoring
1. ThreadPool Parameters
2. Connection Queue Parameters
3. Keep Alive Tuning
4. Request Parameters
5. Custom MBean
Web Application Performance
11
Web Container Monitoring
Connection Queue Parameters
Web Application Performance
12
Web Container Monitoring
1. ThreadPool Parameters
2. Connection Queue Parameters
3. Keep Alive Tuning
4. Request Parameters
5. Custom MBean
Web Application Performance
13
Web Container Monitoring
Keep Alive Parameters
Web Application Performance
14
Web Container Monitoring
Keep Alive Parameters
Web Application Performance
15
Web Container Monitoring
1. ThreadPool Parameters
2. Connection Queue Parameters
3. Keep Alive Tuning
4. Request Parameters
5. Custom MBean
Web Application Performance
16
Web Container Monitoring
Request Parameters
Web Application Performance
17
Web Container Monitoring
1. ThreadPool Parameters
2. Connection Queue Parameters
3. Keep Alive Tuning
4. Request Parameters
5. Custom MBean
Web Application Performance
18
Web Container Monitoring
Custom MBean
Web Application Performance
19
1. Web Container Architecture
2. Web Container Monitoring & Perf
3. Best Practices
Web Application Performance
20
Best Practices
1. Servlet and JSP
2. Content Caching
3. Session Persistence
4. Http Server File Cache
5. Access Logs
Web Application Performance
21
Best Practices
1. Servlet and JSP
2. Content Caching
3. Session Persistence
4. Http Server File Cache
5. Access Logs
Web Application Performance
22
Best Practices
Servlet and JSP
Init and ContextListener for Caching
Include directive vs Include Action
Trim Whitespaces Jsp:UseBean
ExpressionLanguage
Web Application Performance
23
Best Practices
Servlet and JSP
Web Application Performance
24
Best Practices
1. Servlet and JSP
2. Content Caching
3. Session Persistence
4. Http Server File Cache
5. Access Logs
Web Application Performance
25
Best Practices
Content Caching
Web Application Performance
26
Best Practices
Content Caching
Web Application Performance
27
Best Practices
1. Servlet and JSP
2. Content Caching
3. Session Persistence
4. Http Server File Cache
5. Access Logs
Web Application Performance
28
Best Practices
Session Persistence
Load Balancer
useruseruseruseruser
Session Store
Serialize/Deserialize
App Server App Server App Server
Web Application Performance
29
Best Practices
1. Servlet and JSP
2. Content Caching
3. Session Persistence
4. Http Server File Cache
5. Access Logs
Web Application Performance
30
Best Practices
Http Server File Cache
Web Application Performance
31
Best Practices
1. Servlet and JSP
2. Content Caching
3. Session Persistence
4. Http Server File Cache
5. Access Logs
Web Application Performance
32
Best Practices
Access Logs

More Related Content

PPT
IIS 6.0 and asp.net
PPTX
ASP.NET Request Processing Internals
PPTX
IIS for Developers
PPTX
Hosting a website on IIS Server
PDF
IIS 7.0 Architecture And Integration With Asp.Net
PDF
camunda.org Community Meeting
PDF
Weblogic introduction
IIS 6.0 and asp.net
ASP.NET Request Processing Internals
IIS for Developers
Hosting a website on IIS Server
IIS 7.0 Architecture And Integration With Asp.Net
camunda.org Community Meeting
Weblogic introduction

Similar to JavaPerformanceChapter_10 (20)

PPTX
JavaPerformanceChapter_11
PDF
Dot net-course-curriculumn
PDF
(Manning) --web development with javaserver pages, 2 nd ed---(2002)
PDF
Essential ASP NET with Examples in Visual Basic NET 1st Edition Fritz Onion
PPTX
Test first
PDF
Essential ASP NET with Examples in Visual Basic NET 1st Edition Fritz Onion
PPTX
JavaPerformanceChapter_12
PDF
Asp.net
PPTX
Sharepoint development 2013 course content | sharepoint 2013 course content
PPTX
JavaPerformanceChapter_6
PPT
.Net Training Tutorial
PDF
Oracle Soa Suite 11g Performance Tuning Cookbook Osama Oransa
PDF
Mastering asp.net mvc - Dot Net Tricks
PPTX
Node Summit 2016: Web App Architectures
DOCX
Best OAF Online Training
PDF
SpringMVC
PDF
Introduction to Apache Tomcat 7 Presentation
PDF
IT2255 Web Essentials - Unit V Servlets and Database Connectivity
PPT
New Features Of ASP.Net 4 0
PPT
Web Application Optimization Techniques
JavaPerformanceChapter_11
Dot net-course-curriculumn
(Manning) --web development with javaserver pages, 2 nd ed---(2002)
Essential ASP NET with Examples in Visual Basic NET 1st Edition Fritz Onion
Test first
Essential ASP NET with Examples in Visual Basic NET 1st Edition Fritz Onion
JavaPerformanceChapter_12
Asp.net
Sharepoint development 2013 course content | sharepoint 2013 course content
JavaPerformanceChapter_6
.Net Training Tutorial
Oracle Soa Suite 11g Performance Tuning Cookbook Osama Oransa
Mastering asp.net mvc - Dot Net Tricks
Node Summit 2016: Web App Architectures
Best OAF Online Training
SpringMVC
Introduction to Apache Tomcat 7 Presentation
IT2255 Web Essentials - Unit V Servlets and Database Connectivity
New Features Of ASP.Net 4 0
Web Application Optimization Techniques
Ad

More from Saurav Basu (9)

PPTX
JavaPerformanceChapter_9
PPTX
JavaPerformanceChapter_8
PPTX
Java PerformanceChapter_7
PPTX
JavaPerformanceChapter_5
PPTX
JavaPerformanceChapter_4
PPTX
JavaPerformanceChapter_3
PPTX
JavaPerformanceChapter_2
PPTX
JavaPerformanceChapter_1
PPTX
Application Deployment Architecture
JavaPerformanceChapter_9
JavaPerformanceChapter_8
Java PerformanceChapter_7
JavaPerformanceChapter_5
JavaPerformanceChapter_4
JavaPerformanceChapter_3
JavaPerformanceChapter_2
JavaPerformanceChapter_1
Application Deployment Architecture
Ad

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
cuic standard and advanced reporting.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
Big Data Technologies - Introduction.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
A Presentation on Artificial Intelligence
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Cloud computing and distributed systems.
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Programs and apps: productivity, graphics, security and other tools
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Encapsulation theory and applications.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
cuic standard and advanced reporting.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Empathic Computing: Creating Shared Understanding
NewMind AI Weekly Chronicles - August'25-Week II
Big Data Technologies - Introduction.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Encapsulation_ Review paper, used for researhc scholars
Reach Out and Touch Someone: Haptics and Empathic Computing
A Presentation on Artificial Intelligence
20250228 LYD VKU AI Blended-Learning.pptx
Cloud computing and distributed systems.
Diabetes mellitus diagnosis method based random forest with bat algorithm
Programs and apps: productivity, graphics, security and other tools

JavaPerformanceChapter_10

Editor's Notes

  • #3: Next we look at the topic of Web application performance
  • #4: Under Web application performance we will discuss Web Container architecture, Monitoring and Performance and Best practices related to Application Servers
  • #5: First we will talk about web container architecture
  • #6: This slide depicts the architecture of webcontaine The server consists of one or more connectors that share a single engine component. The engine in turn contains one or more virtual hosts each with one or more applications (Context). Within each application are Java Servlets and JSPs
  • #7: Next we will talk about Web Container Monitoring
  • #8: This slide list the key areas of monitoring of web applications namely ThreadPool, ConnectionQueue, KeepAlive and Request parameters and lastly custom mbean
  • #9: Let first talk about threadpool parameters
  • #10: This slide depicts the 2 important thead pool metric to monitor namely the max threads count and the currentthreadsbusy-count, if the value of currentthreadbusy count is consistently equal to maxthreads count and there is spare cpu resources consider increasing the threads count however excessively high value can be detrimental due incurred context switch and cache miss
  • #11: Next we will talk about Connection Queue parameters
  • #12: This slide shows the most important conncection queue parameter to monitor is the countoverflows-count. Increasing queue size reduces overflows at the expense of higher response times for the client or to scale vertically or horizontally,
  • #13: Next we will talk about parameters related to keep alive setting on the application server
  • #14: This slide shows the most important keep alive parameters to monitor. The high valuue of count-hits count indicates current settings are working well.
  • #15: This slide depicts the use of the asadmin command to fetch the value of the keep alive parameters
  • #16: Next we will talk about request parameter monitoring
  • #17: This slide highlights the important request parameters for the purpose of monitoring of the application server
  • #18: Next we will talk about Custom mbean for performance monitoring
  • #19: This slide shows a sample mbean for monitoring application specific statistics (ex standard deviation ) as shown in this example.
  • #20: Next we will talk about Best practices for improving the performance of web applications
  • #21: We will discuss the best practices for the following areas Servlet and JSP Content Caching Session Persistence Http Server File Cache Access Logs
  • #22: First we will talk about best practices for Servlet and JSP performance
  • #23: In this slide we talk about best practices for optimal performance of servlet and jsp pages. Use of init and contextlistener for caching Use of jsp include diective for static pages while include action for pages with dynamic content Use of trimwhitespace option in the config file to reduce network packet sizes Use of beanname instead of classname makes bean instantiation costlier
  • #24: This slide shows an example of bean instantiation cost incurred when using bean name attribute
  • #25: Next we will talk about best practices for Content Caching
  • #26: Content Caching on the serverside can improve performance of static file that donot change frequently. These can further be compressed to reduce network latency in transmission This slide shows an example of compression and uncompression that takes place prior to serving resource from from cache.
  • #27: This slide shows the impact of different compression schemes on transaction throughput
  • #28: Next we will talk about Session Persistence
  • #29: This slide depicts the use of external session store to ensure resumption of session after server failure
  • #30: Next we will talk about http server file cache
  • #31: File caching can improve performance by eliminating the disk I/O associated with the reading of a file for every request in the absence of the cache. This slide shows the list of parameters to monitor for filecaching in glassfish.
  • #32: Next we will talk about http access logs
  • #33: Access Logs can help identify identify poorly performing request paths, understand application usage patterns, as well as provide baseline data for developing benchmarks This slide shows an example of setting the application log format using the asadmin command in glassfish. Note that the trace attribute is useful in tracing a single request through multiple distributed systems to identify performance problems