SlideShare une entreprise Scribd logo
1  sur  18
Dhaval P. Shah
Enterprise Application Performance –
Understanding & Learnings
Agenda
 Performance Basics
 Scope
 Metrics
 Factors affecting Performance
 Learnings
 I###
 O## H#
 M######### ###
Disclaimer !
Performance Basics - Scope
 Short response time for a given piece of work
 High throughput
 Low utilization of computing resources
 High availability of application
 Implicit Requirements
 Efficiency
 Scalability
Performance Basics - Scope [Contd.]
 Importance of ‘Performance’ in the world of software engineering
 Response Time
 1 second of slower performance on pages could cost Amazon $1.6 billion in sales each year
 25% of users will leave a site if a page takes more than 4 seconds to load
 Throughput
 Facebook serves more than 2 million ‘Like’ buttons per second
 Facebook held a clear lead in total page views during March 2011, recording about 85 billion. This
was more than three times as many as number two Google, which had about 25.6 billion
http://performance-testing.org/performance-testing-statistics
Performance Basics - Metrics
 SLA / NFR
 Concurrent Users
 Transactions / Second
 Response Time
 Storage Size
Performance Basics – Affecting Factors
 Software
Memory
Leaks
Sync Errors
Redundant
Operations
80 % of all performance
problems in JAVA
• Deadlocks
• Race Conditions
• Dead Code
• Redundant assignment
Performance Basics – Affecting Factors
 Configurations
JVM
Config
Thread
Pool
JDBC
-Xmx:2G
-XX:NewSize:1.8G
-XX:NewSize:1.8G
max-threadpoolsize=”5”
max-connections=”5”;
jdbc-connection-timeout=”5”
Performance Basics – Affecting Factors
Recommended JVM Options
Type Option
Entire heap size Specify the same value for -Xms and -Xmx.
New area size
-XX:NewRatio: value of 2 to 4
-XX:NewSize=? –XX:MaxNewSize=?. Also good to
specify NewSize instead of NewRatio.
Perm size
-XX:PermSize=256 m -XX:MaxPermSize=256 m. Specify the value to
an extent not to cause any trouble in the operation because it does
not affect the performance.
GC log
-Xloggc:$CATALINA_BASE/logs/gc.log -XX:+PrintGCDetails -
XX:+PrintGCDateStamps. Leaving a GC log does not particularly affect
the performance of Java applications. You are recommended to leave
a GC log as much as possible.
GC algorithm
-XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -
XX:+UseConcMarkSweepGC-
XX:CMSInitiatingOccupancyFraction=75.This is only a generally
recommendable configuration. Other choices could be better
depending on the characteristics of the application.
Creating a heap dump when an OOM error occurs
-XX:+HeapDumpOnOutOfMemoryError -
XX:HeapDumpPath=$CATALINA_BASE/logs
Actions after an OOM occurs
-XX:OnOutOfMemoryError=$CATALINA_HOME/bin/stop.sh or -
XX:OnOutOfMemoryError=$CATALINA_HOME/bin/restart.sh. After
leaving a heap dump, take a proper operation according to a
management policy.
Performance Basics – Affecting Factors [Contd.]
 Hardware
Single Machine
Web
server
App
server
App
server
Shared Resources –
• CPU
• Memory
• Network
• Disk
Hardware /
Configuration
OS / Filesystem
Windows
Linux
Performance Basics – Affecting Factors [Contd.]
 Hardware
DB Server /
Hardware
Oracle Std.
Oracele
Enterprise
CPU
CPU
CPUCPU
CPU CPU
MySQL /
MSSQL
• CPU utilization - 4
• No Partition
• Limited online operations
• Limited indexing
• CPU utilization – No Limit
• Supports Oracle real application clusters
• Adaptive Execution Plan
• Different Locking strategy
• Different Index performance
Learnings – I###
 Issue
 Memory Leak
 Approach
 Analysis of heap dumps
 Replication of memory leak within DEV environment (with various types of load and
duration)
 Code review (i.e. Java and Spring configuration) of probable suspect(s)
 M@@@@@B@@ beans configured as PROTOTYPE
 M@@@@@@B@@ beans instantiated using DefaultAutoProxyCreator with
proxyTargetClass=’true'
Learnings – I###[Contd.]
 Understanding basics of Heap Dump Analysis
 Heap Dump
 Shallow Heap – Heap occupied by the object
 Retained Heap - Sum of the shallow heap size of all objects that would be removed when this
object is garbage collected
 Example
Learnings – I###[Contd.]
 Production Heap Dump
Learnings – O## ##
 Issue
 Optimization of frequently used services (to increase TPS)
 Approach
 Baselining of Load Testing parameters (Heap settings, no. of concurrent users)
 Hotspot identification
 Fetching all the columns (including non required columns)
 Incorrect ordering of where condition
 Outcome
Total Request: 200
Concurrent: 20
Before Optimization After Optimization
Min Response Time (ms) 306 135
Max Response Time (ms) 3692 1195
Avg. Response Time (ms) 1947 487
Transaction Per Second 6.94 15.46
Learnings – M#########
 Issue
 Unable to meet NFR
 Approach
 Application optimization
 Replacing aspect based Audit Logging with normal asynchronous mode
 Turning on ‘read-only’ flag to true for retrieval operations
 Hotspot identification
 Fetching all the columns (including non required columns)
 Database connection pool configuration
 Outcome
 Still unable to meet the NFR :(
Learnings – M######### [Contd.]
 Database Monitoring (Oracle)
 Hotspot Identification
 Free Buffer Waits
 Log File Sync
Parting Notes . . . . .
 Parting Notes

Contenu connexe

Tendances

Simple cache architecture
Simple cache architectureSimple cache architecture
Simple cache architecture
DaeMyung Kang
 
Till Rohrmann – Fault Tolerance and Job Recovery in Apache Flink
Till Rohrmann – Fault Tolerance and Job Recovery in Apache FlinkTill Rohrmann – Fault Tolerance and Job Recovery in Apache Flink
Till Rohrmann – Fault Tolerance and Job Recovery in Apache Flink
Flink Forward
 
Virtual Flink Forward 2020: Flink acceptance testing and state compatibility ...
Virtual Flink Forward 2020: Flink acceptance testing and state compatibility ...Virtual Flink Forward 2020: Flink acceptance testing and state compatibility ...
Virtual Flink Forward 2020: Flink acceptance testing and state compatibility ...
Flink Forward
 

Tendances (20)

Redis Day TLV 2018 - Redis as a Time-Series DB
Redis Day TLV 2018 - Redis as a Time-Series DBRedis Day TLV 2018 - Redis as a Time-Series DB
Redis Day TLV 2018 - Redis as a Time-Series DB
 
Flink Forward SF 2017: Malo Deniélou - No shard left behind: Dynamic work re...
Flink Forward SF 2017: Malo Deniélou -  No shard left behind: Dynamic work re...Flink Forward SF 2017: Malo Deniélou -  No shard left behind: Dynamic work re...
Flink Forward SF 2017: Malo Deniélou - No shard left behind: Dynamic work re...
 
Building Modern Data Pipelines for Time Series Data on GCP with InfluxData by...
Building Modern Data Pipelines for Time Series Data on GCP with InfluxData by...Building Modern Data Pipelines for Time Series Data on GCP with InfluxData by...
Building Modern Data Pipelines for Time Series Data on GCP with InfluxData by...
 
HTTP Analytics for 6M requests per second using ClickHouse
HTTP Analytics for 6M requests per second using ClickHouseHTTP Analytics for 6M requests per second using ClickHouse
HTTP Analytics for 6M requests per second using ClickHouse
 
Virtual Flink Forward 2020: A deep dive into Flink SQL - Jark Wu
Virtual Flink Forward 2020: A deep dive into Flink SQL - Jark WuVirtual Flink Forward 2020: A deep dive into Flink SQL - Jark Wu
Virtual Flink Forward 2020: A deep dive into Flink SQL - Jark Wu
 
Gelly-Stream: Single-Pass Graph Streaming Analytics with Apache Flink
Gelly-Stream: Single-Pass Graph Streaming Analytics with Apache FlinkGelly-Stream: Single-Pass Graph Streaming Analytics with Apache Flink
Gelly-Stream: Single-Pass Graph Streaming Analytics with Apache Flink
 
Circonus: Design failures - A Case Study
Circonus: Design failures - A Case StudyCirconus: Design failures - A Case Study
Circonus: Design failures - A Case Study
 
Flink Forward Berlin 2018: Raj Subramani - "A streaming Quantitative Analytic...
Flink Forward Berlin 2018: Raj Subramani - "A streaming Quantitative Analytic...Flink Forward Berlin 2018: Raj Subramani - "A streaming Quantitative Analytic...
Flink Forward Berlin 2018: Raj Subramani - "A streaming Quantitative Analytic...
 
Gearman & PHP
Gearman & PHPGearman & PHP
Gearman & PHP
 
HBaseCon2017 Quanta: Quora's hierarchical counting system on HBase
HBaseCon2017 Quanta: Quora's hierarchical counting system on HBaseHBaseCon2017 Quanta: Quora's hierarchical counting system on HBase
HBaseCon2017 Quanta: Quora's hierarchical counting system on HBase
 
Virtual Flink Forward 2020: Production-Ready Flink and Hive Integration - wha...
Virtual Flink Forward 2020: Production-Ready Flink and Hive Integration - wha...Virtual Flink Forward 2020: Production-Ready Flink and Hive Integration - wha...
Virtual Flink Forward 2020: Production-Ready Flink and Hive Integration - wha...
 
Simple cache architecture
Simple cache architectureSimple cache architecture
Simple cache architecture
 
Performance Modeling of Serverless Computing Platforms - CASCON2020 Workshop ...
Performance Modeling of Serverless Computing Platforms - CASCON2020 Workshop ...Performance Modeling of Serverless Computing Platforms - CASCON2020 Workshop ...
Performance Modeling of Serverless Computing Platforms - CASCON2020 Workshop ...
 
Map reduce
Map reduceMap reduce
Map reduce
 
Flink Forward Berlin 2018: Brian Wolfe - "Upshot: distributed tracing using F...
Flink Forward Berlin 2018: Brian Wolfe - "Upshot: distributed tracing using F...Flink Forward Berlin 2018: Brian Wolfe - "Upshot: distributed tracing using F...
Flink Forward Berlin 2018: Brian Wolfe - "Upshot: distributed tracing using F...
 
Till Rohrmann – Fault Tolerance and Job Recovery in Apache Flink
Till Rohrmann – Fault Tolerance and Job Recovery in Apache FlinkTill Rohrmann – Fault Tolerance and Job Recovery in Apache Flink
Till Rohrmann – Fault Tolerance and Job Recovery in Apache Flink
 
Virtual Flink Forward 2020: Flink acceptance testing and state compatibility ...
Virtual Flink Forward 2020: Flink acceptance testing and state compatibility ...Virtual Flink Forward 2020: Flink acceptance testing and state compatibility ...
Virtual Flink Forward 2020: Flink acceptance testing and state compatibility ...
 
Optimizing joins in Map reduce jobs via Lookup Service
Optimizing joins in Map reduce jobs via Lookup ServiceOptimizing joins in Map reduce jobs via Lookup Service
Optimizing joins in Map reduce jobs via Lookup Service
 
OPTIMIZING THE TICK STACK
OPTIMIZING THE TICK STACKOPTIMIZING THE TICK STACK
OPTIMIZING THE TICK STACK
 
Apache Gearpump - Lightweight Real-time Streaming Engine
Apache Gearpump - Lightweight Real-time Streaming EngineApache Gearpump - Lightweight Real-time Streaming Engine
Apache Gearpump - Lightweight Real-time Streaming Engine
 

En vedette (6)

Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Spring Basics
Spring BasicsSpring Basics
Spring Basics
 
Aspect Oriented Programing - Introduction
Aspect Oriented Programing - IntroductionAspect Oriented Programing - Introduction
Aspect Oriented Programing - Introduction
 
OO design principles & heuristics
OO design principles & heuristicsOO design principles & heuristics
OO design principles & heuristics
 
Anatomy of Test Driven Development
Anatomy of Test Driven DevelopmentAnatomy of Test Driven Development
Anatomy of Test Driven Development
 
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of ControlJava Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
 

Similaire à Enterprise application performance - Understanding & Learnings

The Next Generation Application Server – How Event Based Processing yields s...
The Next Generation  Application Server – How Event Based Processing yields s...The Next Generation  Application Server – How Event Based Processing yields s...
The Next Generation Application Server – How Event Based Processing yields s...
Guy Korland
 
Alexander Dymo - RailsConf 2014 - Improve performance: Optimize Memory and Up...
Alexander Dymo - RailsConf 2014 - Improve performance: Optimize Memory and Up...Alexander Dymo - RailsConf 2014 - Improve performance: Optimize Memory and Up...
Alexander Dymo - RailsConf 2014 - Improve performance: Optimize Memory and Up...
Alexander Dymo
 

Similaire à Enterprise application performance - Understanding & Learnings (20)

Performance eng prakash.sahu
Performance eng prakash.sahuPerformance eng prakash.sahu
Performance eng prakash.sahu
 
Adtech scala-performance-tuning-150323223738-conversion-gate01
Adtech scala-performance-tuning-150323223738-conversion-gate01Adtech scala-performance-tuning-150323223738-conversion-gate01
Adtech scala-performance-tuning-150323223738-conversion-gate01
 
Adtech x Scala x Performance tuning
Adtech x Scala x Performance tuningAdtech x Scala x Performance tuning
Adtech x Scala x Performance tuning
 
QSpiders - Installation and Brief Dose of Load Runner
QSpiders - Installation and Brief Dose of Load RunnerQSpiders - Installation and Brief Dose of Load Runner
QSpiders - Installation and Brief Dose of Load Runner
 
EVOLVE'15 | Enhance | Norberto Leite | Effectively Scale and Operate AEM with...
EVOLVE'15 | Enhance | Norberto Leite | Effectively Scale and Operate AEM with...EVOLVE'15 | Enhance | Norberto Leite | Effectively Scale and Operate AEM with...
EVOLVE'15 | Enhance | Norberto Leite | Effectively Scale and Operate AEM with...
 
Become a Performance Diagnostics Hero
Become a Performance Diagnostics HeroBecome a Performance Diagnostics Hero
Become a Performance Diagnostics Hero
 
Александр Махомет "Beyond the code или как мониторить ваш PHP сайт"
Александр Махомет "Beyond the code или как мониторить ваш PHP сайт"Александр Махомет "Beyond the code или как мониторить ваш PHP сайт"
Александр Махомет "Beyond the code или как мониторить ваш PHP сайт"
 
Effectively Deploying MongoDB on AEM
Effectively Deploying MongoDB on AEMEffectively Deploying MongoDB on AEM
Effectively Deploying MongoDB on AEM
 
Benchmarking PyCon AU 2011 v0
Benchmarking PyCon AU 2011 v0Benchmarking PyCon AU 2011 v0
Benchmarking PyCon AU 2011 v0
 
6 tips for improving ruby performance
6 tips for improving ruby performance6 tips for improving ruby performance
6 tips for improving ruby performance
 
millions-gc-jax-2022.pptx
millions-gc-jax-2022.pptxmillions-gc-jax-2022.pptx
millions-gc-jax-2022.pptx
 
this-is-garbage-talk-2022.pptx
this-is-garbage-talk-2022.pptxthis-is-garbage-talk-2022.pptx
this-is-garbage-talk-2022.pptx
 
The Next Generation Application Server – How Event Based Processing yields s...
The Next Generation  Application Server – How Event Based Processing yields s...The Next Generation  Application Server – How Event Based Processing yields s...
The Next Generation Application Server – How Event Based Processing yields s...
 
Alexander Dymo - RailsConf 2014 - Improve performance: Optimize Memory and Up...
Alexander Dymo - RailsConf 2014 - Improve performance: Optimize Memory and Up...Alexander Dymo - RailsConf 2014 - Improve performance: Optimize Memory and Up...
Alexander Dymo - RailsConf 2014 - Improve performance: Optimize Memory and Up...
 
Top-5-java-perf-problems-jax_mainz_2024.pptx
Top-5-java-perf-problems-jax_mainz_2024.pptxTop-5-java-perf-problems-jax_mainz_2024.pptx
Top-5-java-perf-problems-jax_mainz_2024.pptx
 
AutoML for user segmentation: how to match millions of users with hundreds of...
AutoML for user segmentation: how to match millions of users with hundreds of...AutoML for user segmentation: how to match millions of users with hundreds of...
AutoML for user segmentation: how to match millions of users with hundreds of...
 
Scaling machine learning to millions of users with Apache Beam
Scaling machine learning to millions of users with Apache BeamScaling machine learning to millions of users with Apache Beam
Scaling machine learning to millions of users with Apache Beam
 
Serverless ML Workshop with Hopsworks at PyData Seattle
Serverless ML Workshop with Hopsworks at PyData SeattleServerless ML Workshop with Hopsworks at PyData Seattle
Serverless ML Workshop with Hopsworks at PyData Seattle
 
DevoxxUK: Optimizating Application Performance on Kubernetes
DevoxxUK: Optimizating Application Performance on KubernetesDevoxxUK: Optimizating Application Performance on Kubernetes
DevoxxUK: Optimizating Application Performance on Kubernetes
 
"Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
 

Dernier

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
anilsa9823
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Dernier (20)

Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 

Enterprise application performance - Understanding & Learnings

  • 1. Dhaval P. Shah Enterprise Application Performance – Understanding & Learnings
  • 2. Agenda  Performance Basics  Scope  Metrics  Factors affecting Performance  Learnings  I###  O## H#  M######### ###
  • 4. Performance Basics - Scope  Short response time for a given piece of work  High throughput  Low utilization of computing resources  High availability of application  Implicit Requirements  Efficiency  Scalability
  • 5. Performance Basics - Scope [Contd.]  Importance of ‘Performance’ in the world of software engineering  Response Time  1 second of slower performance on pages could cost Amazon $1.6 billion in sales each year  25% of users will leave a site if a page takes more than 4 seconds to load  Throughput  Facebook serves more than 2 million ‘Like’ buttons per second  Facebook held a clear lead in total page views during March 2011, recording about 85 billion. This was more than three times as many as number two Google, which had about 25.6 billion http://performance-testing.org/performance-testing-statistics
  • 6. Performance Basics - Metrics  SLA / NFR  Concurrent Users  Transactions / Second  Response Time  Storage Size
  • 7. Performance Basics – Affecting Factors  Software Memory Leaks Sync Errors Redundant Operations 80 % of all performance problems in JAVA • Deadlocks • Race Conditions • Dead Code • Redundant assignment
  • 8. Performance Basics – Affecting Factors  Configurations JVM Config Thread Pool JDBC -Xmx:2G -XX:NewSize:1.8G -XX:NewSize:1.8G max-threadpoolsize=”5” max-connections=”5”; jdbc-connection-timeout=”5”
  • 9. Performance Basics – Affecting Factors Recommended JVM Options Type Option Entire heap size Specify the same value for -Xms and -Xmx. New area size -XX:NewRatio: value of 2 to 4 -XX:NewSize=? –XX:MaxNewSize=?. Also good to specify NewSize instead of NewRatio. Perm size -XX:PermSize=256 m -XX:MaxPermSize=256 m. Specify the value to an extent not to cause any trouble in the operation because it does not affect the performance. GC log -Xloggc:$CATALINA_BASE/logs/gc.log -XX:+PrintGCDetails - XX:+PrintGCDateStamps. Leaving a GC log does not particularly affect the performance of Java applications. You are recommended to leave a GC log as much as possible. GC algorithm -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled - XX:+UseConcMarkSweepGC- XX:CMSInitiatingOccupancyFraction=75.This is only a generally recommendable configuration. Other choices could be better depending on the characteristics of the application. Creating a heap dump when an OOM error occurs -XX:+HeapDumpOnOutOfMemoryError - XX:HeapDumpPath=$CATALINA_BASE/logs Actions after an OOM occurs -XX:OnOutOfMemoryError=$CATALINA_HOME/bin/stop.sh or - XX:OnOutOfMemoryError=$CATALINA_HOME/bin/restart.sh. After leaving a heap dump, take a proper operation according to a management policy.
  • 10. Performance Basics – Affecting Factors [Contd.]  Hardware Single Machine Web server App server App server Shared Resources – • CPU • Memory • Network • Disk Hardware / Configuration OS / Filesystem Windows Linux
  • 11. Performance Basics – Affecting Factors [Contd.]  Hardware DB Server / Hardware Oracle Std. Oracele Enterprise CPU CPU CPUCPU CPU CPU MySQL / MSSQL • CPU utilization - 4 • No Partition • Limited online operations • Limited indexing • CPU utilization – No Limit • Supports Oracle real application clusters • Adaptive Execution Plan • Different Locking strategy • Different Index performance
  • 12. Learnings – I###  Issue  Memory Leak  Approach  Analysis of heap dumps  Replication of memory leak within DEV environment (with various types of load and duration)  Code review (i.e. Java and Spring configuration) of probable suspect(s)  M@@@@@B@@ beans configured as PROTOTYPE  M@@@@@@B@@ beans instantiated using DefaultAutoProxyCreator with proxyTargetClass=’true'
  • 13. Learnings – I###[Contd.]  Understanding basics of Heap Dump Analysis  Heap Dump  Shallow Heap – Heap occupied by the object  Retained Heap - Sum of the shallow heap size of all objects that would be removed when this object is garbage collected  Example
  • 14. Learnings – I###[Contd.]  Production Heap Dump
  • 15. Learnings – O## ##  Issue  Optimization of frequently used services (to increase TPS)  Approach  Baselining of Load Testing parameters (Heap settings, no. of concurrent users)  Hotspot identification  Fetching all the columns (including non required columns)  Incorrect ordering of where condition  Outcome Total Request: 200 Concurrent: 20 Before Optimization After Optimization Min Response Time (ms) 306 135 Max Response Time (ms) 3692 1195 Avg. Response Time (ms) 1947 487 Transaction Per Second 6.94 15.46
  • 16. Learnings – M#########  Issue  Unable to meet NFR  Approach  Application optimization  Replacing aspect based Audit Logging with normal asynchronous mode  Turning on ‘read-only’ flag to true for retrieval operations  Hotspot identification  Fetching all the columns (including non required columns)  Database connection pool configuration  Outcome  Still unable to meet the NFR :(
  • 17. Learnings – M######### [Contd.]  Database Monitoring (Oracle)  Hotspot Identification  Free Buffer Waits  Log File Sync
  • 18. Parting Notes . . . . .  Parting Notes