Performance Oriented Design
Upcoming SlideShare
Loading in...5
×
 

Performance Oriented Design

on

  • 3,273 views

Performance Oriented Design, presented at QCon São Paulo 2011 by Rodrigo Campos

Performance Oriented Design, presented at QCon São Paulo 2011 by Rodrigo Campos

Statistics

Views

Total Views
3,273
Views on SlideShare
2,570
Embed Views
703

Actions

Likes
8
Downloads
48
Comments
0

9 Embeds 703

http://cmgbrasil.posterous.com 596
http://irr.posterous.com 82
http://cmgbrasil.com 12
http://posterous.com 6
http://translate.googleusercontent.com 2
http://www.linkedin.com 2
https://twitter.com 1
http://twitter.com 1
http://feeds.feedburner.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Performance Oriented Design Performance Oriented Design Presentation Transcript

  • PerformanceOriented Design QCon São Paulo 2011 Rodrigo Albani de Campos - @xinu camposr@gmail.com
  • Agenda• Performance & Design• Why should I care ?• What should I measure ?• References
  • What is performance ?the capabilities of a machine orproduct, esp. when observedunder particular conditions : thehardware is put through testswhich assess the performance ofthe processor.
  • What is design ?his design of reaching the top:intention, aim, purpose, plan,intent, objective, object, goal,end, target; hope, desire, wish,dream, aspiration, ambition.
  • McLaren MP4 12c GT3
  • Underlying Operating Systems Read IOPS IO Wait Page Faults Run Queue Disk Usage# users USER CPU SYSTEM CPU Resident Size Write IOPS Network Traffic Memory Usage Page out Interrupts Page inPacket Loss Network Collision # processes Buffers Kernel Tables
  • What about code ?
  • Apr 25, 2011 5:44:02 PM org.apache.fop.fo.FOTreeBuilder fatalErrorSEVERE: javax.xml.transform.TransformerException:java.lang.NullPointerException: Parameter alpha must not be nullApr 25, 2011 5:44:02 PM org.apache.fop.cli.Main startFOPSEVERE: Exceptionjavax.xml.transform.TransformerException:java.lang.NullPointerException: Parameter alpha must not be null atorg.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217) atorg.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197)Caused by: javax.xml.transform.TransformerException:java.lang.NullPointerException: Parameter alpha must not be null atorg.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2416) atorg.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374) atorg.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:393) atorg.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:176)
  • We’ve been riding space shuttles blindfolded handcuffed
  • Why should I care ?
  • Why should I care ?Capacity planning is not just about the futureanymore.Today, there is a serious need to squeeze moreout of your current capital equipment. The Guerrilla Manual Online http://www.perfdynamics.com/Manifesto/gcaprules.html
  • Why should I care ?“Our systems are very simple, there’s no need for such performance metrics”
  • It goes like this... The Internet Web Server Application Server Database
  • It goes like this... The Internet Web Server Application Server Database
  • It goes like this... The Internet Web ServerApplication Server Database
  • It goes like this... The Internet Web ServerApplication Server Slaves RO Master RW
  • It goes like this... The Internet Web ServerApplication Server Master RW Slaves RO
  • It goes like this... The Internet Web Server Application Server Caches Master RW Slaves RO Evil Machines Corporation
  • It goes like this... The Internet CPUs will be idle Disks will be sleeping Network will be Web Server Application Server underused... and your users will be Caches complaining... Master RW Slaves RO Evil Machines Corporation
  • Why should I care ? “But we are using the Cloud !”
  • Why should I care ?• So now you’re in an utility computing model• You’re charged per usage
  • Why should I care ?“Updating performancecounters will make my code run slower”
  • Why should I care ?• Datacenter Average CPU utilization is around 15%• If updating performance counters is a problem then you really need them• Those microseconds will save you hours of troubleshooting !
  • Why should I care ?“These are non-functional requirements”
  • Why should I care ? Distinct Query Revenue/ Any Clicks Satisfaction Time to Click Queries/User Refinement User (increase in ms) 50ms 0 0 0 0 0 0 200ms 0 0 0 -0,30% -0,40% 500 500ms 0 -0,60% -1,20% -1,00% -0,90% 1200 1000ms -0,70% -0,90% -2,80% -1,90% -1,60% 1900 2000ms -1,80% -2,10% -4,30% -4,40% -3,80% 3100The User and Business Impact of Server Delays, Additional Bytes, and HTTPChunking in Web Search - Eric Schurman (Amazon), Jake Brutlag (Google)http://velocityconf.com/velocity2009/public/schedule/detail/8523
  • Why should I care ?“Fast isn’t a feature, fast isa Requirement” Jesse Robins - OPSCode
  • What should I measure ?
  • QueuesThe not so typical performance metrics• Invented the fields of traffic engineering and queuing theory• 1909 - Published “The theory of Probabilities and Telephone Conversations” Agner Krarup Erlang• 1917 - Published “Solution of some Problems in the Theory of Probabilities of Significance in Automatic Telephone Exchanges"
  • QueuesThe not so typical performance metrics• 1961 - CTSS was first demonstrated at MIT• 1965 - Allan Scherr used machine repairman problem to model a time-shared system as part of Project MAC• Another offspring of Project MAC is Multics
  • Queues The not so typical performance metrics • IBM System/370 model 158-3 - 1.0 MIPS @ 1.0 MHz -1972 • Average purchase price: $ 771,000* • No disks or peripherals included • $ 4,082,039 by 2011 • Intel Core i7 Extreme Edition 990x released in 2011 peaks 159,000 MIPS @ 3,46GHz* Source: http://www-03.ibm.com/ibm/history/exhibits/mainframe/mainframe_PP3135.html
  • QueuesThe not so typical performance metrics Computer System Disks CPU
  • QueuesThe not so typical performance metrics (A) λ X (C) SOpen/Closed W Network R A Arrival Count λ Arrival Rate (A/T) W Time spent in Queue R Residence Time (W+S) S Service Time X System Throughput (C/T) C Completed tasks count
  • Arrival Rate (λ)• Pretty straightforward• Requests per second/hour/day• Not the same as throughput (X) • Although in a steady state: • A = C as T →∞ • λ=X
  • Service Time (S)• Time spent in processing • Web server response time • Total query time • IO operation time length
  • What to look for ?• Stretch factor• Method Count• Method Service Time• Geolocation• Inbound & Outbound Traffic• Round Trip Delays
  • What should I measure? Average Hits/s = 65.142 Average Svc time = 0.0159
  • What should I measure ?• A simple tag collection data store• For each data operation: • A 64 bit counter for the number of calls • An average counter for the service time
  • What should I measure ? Method Call Count Service Time (ms) dbConnect 1.876 11,2 fetchDatum 19.987.182 12,4 postDatum 1.285.765 98,4 deleteDatum 312.873 31,1 fetchKeys 27.334.983 278,3fetchCollection 34.873.194 211,9createCollection 118.853 219,4
  • What should I measure ? Call Count x Service Time fetchKeys createCollectionService Time (ms) fetchCollection deleteDatum postDatum dbConnect fetchDatum Call Count
  • ReferencesGuerrilla Capacity Planning:A Tactical Approach toPlanning for Highly ScalableApplications and ServicesNeil J. Guntherhttp://goo.gl/59wJg
  • ReferencesAnalyzing ComputerSystems Performance: WithPerl::PDQNeil J. Guntherhttp://goo.gl/MZ85L
  • ReferencesPerformance by Design:Computer CapacityPlanning By ExampleDaniel A. Menasce et al.http://goo.gl/NJhwT
  • ReferencesThe Art of CapacityPlanning: Scaling WebResourcesJohn Allspawhttp://goo.gl/l8szV
  • ReferencesCapacity Planning for WebPerformance: Metrics,Models, and MethodsDaniel Menasce & VirgilioAlmeidahttp://goo.gl/KsBM6
  • ReferencesMeasure IT: http://www.cmg.org/measureit/CMG Conference Proceedings: http://www.cmg.org/proceedings/CMG Brazilian Chapter: http://cmgbrasil.posterous.com/
  • Last but not least...Measure what ismeasurable, and makemeasurable what is not so. Galileo Galilei