SlideShare a Scribd company logo
Performance ForensicsAlois ReitbauerdynaTrace Software
Forensicsforensisadj - "of or before the forum." In Roman times, a criminal charge meant presenting the case before a group of public individuals in the forum. … The individual with the best argument and delivery would determine the outcome of the case.
Collecting Evidence
What does this chart tell usResponse TimeTime
A- Response time problem?B - CPU problem?C - Sync problem?D - Database problem?
We don‘t know
We have to collect our evidence first
Multi-Layered MeasurementUser-LevelApplication-Level Container/App Server-Level System/OS/Virtualization-Level
UnderstandyourmeasurementsResponse Time and GCResponse Time only
How can this happen?A: Our response time is 2.3 secondsB: Our response time is 1.5 secondsC: Our response time is 6 seconds
The beauty of measures ... Page Load Time HTTP Request Time95 % Servlet TimeNetworkSnifferBrowserWeb ServerFirewallApplicationServerRequest Time (max)... is that there are so many to choose from
Types of MeasurementsCyclic MeasurementsAre collected ar regular time intervalsAre time basedJMX, CPU, MemoryEvent-based measurementsAre collected as a request occursAre transactionalResponse Times, CPU consumption
Types of StatisticsMin/MaxAverageMedianPercentilesUse percentiles for event-based measures and averages (or max) for cyclical measures
How you measure is important
Typical Measurements we work withMemoryConsumption, GCCPUUsage, Load AverageResponse TimeTransactionsDatabaseStatements, Pool Sizes CommunicationCalls, Latency, Size, Threads
A Clearer Picture
What is the problem?We have response times of 6 seconds.We have response times of 6 seconds for 95 percent of our users at a load of 500 users with a CPU utilization of 10 percent.
Indentify the suspect
Don‘t trust your assumptions
Top 10 Optimizations are bad
Seperate transaction types
Baseline and Delta
Understand the difference
Make the problem reproducable. Otherwise you cannot check whether you fixed it.
When are we done?
... when there are no more why questions
Solving the case
Ensure you solved the real problem
Fight problems not symptoms
When a measure supports a problem. Check for all measures affected by the problem.
Have you tuned at the right place
Watch out for side effects
The usual suspects
Memory and GCState HandlingData VolumeWeb TierDatabaseNumber of RequestsJavaScriptLatencyData VolumeRenderingComm. BehaviorBusiness TierO/R AccessMemory and GCBrowser
Remoting StackApplication Developers ViewClient ApplicationServer ApplicationStubFacadeSerializationDeserialisationClient InfrastructureServer InfrastructureNetworkingNetworking
Performance Forensics - Understanding Application Performance
Create Data LocalityReduce InteractionsAvoid Protocol OverheadAdjust Interfaces
The DB layerApplicationApplication CodeO/RMapping LayerCaching LayerSQLTCP/IPResult SetStatementConnectionConnectionDatabaseConnectionPoolPreparedStatement...PreparedStatement
Caching in the DB layerCross SessionCacheSession CachesQueryCache(s)Execution PlanCachePrepared StatementCacheDatabasePersistenceFrameworkJDBCLayer
Tune LoadingBehaviorOptimizeforcachingselect … from a,b,cselect … from b,c,a… join fetch ….Reduce DB CallsDefine Proper Entities
The Web Layer
HighDatavolumeThread-/ConnectionpoolsHTML RenderingHighLatencyDatabaseAccessNetworkWebService/Backend CallsMany AJAX/HTTPcallsServerBrowserBrowserBrowserJavaScriptPerformance
Caching on the WebServerside Data CacheServer providingCaching InformationCache per ClientServerProxy Cachefor Many ClientsClients
Alois Reitbaueralois.reitbauer@dynatrace.com@AloisReitbauerblog.dynatrace.com

More Related Content

Performance Forensics - Understanding Application Performance

Editor's Notes

  1. When there is a murder, suspicious fire or hit-and-run accident, police and rescue workers aren't the only ones in on the investigation. Forensic scientists also play an important part. They will take samples collected at the scene and analyze them in a forensics laboratory. With a little ingenuity and some very high-tech equipment, forensic scientists can help law enforcement catch even the wiliest perpetrator.Forensic science is a discipline that applies scientific analysis to the justice system, often to help prove the events of a crime. Forensic scientists analyze and interpret evidence found at the crime scene. That evidence can include blood, saliva, fibers, tire tracks, drugs,alcohol, paint chips and firearm residue.
  2. http://www.istockphoto.com/stock-photo-13437760-over-a-dead-body.php?st=bc63d6b
  3. http://www.istockphoto.com/stock-photo-4608404-microscope.php?st=a02af80