220 likes | 239 Views
Pro-Active Performance Engineering. Vijay Amrit Raj Sharma Sr. Manager, Software Development Oracle, Identity Cloud Services (IDCS/OICS) May 10, 2017. Agenda. 1. Introduction Scope Re-Active Performance Engineering Why Pro-Active Performance Engineering
E N D
Pro-Active Performance Engineering Vijay Amrit Raj Sharma Sr. Manager, Software Development Oracle, Identity Cloud Services (IDCS/OICS) May 10, 2017 Confidential – Oracle Internal/Restricted
Agenda 1 Introduction Scope Re-Active Performance Engineering Why Pro-Active Performance Engineering Pro-Active Performance Engineering – Measures Continuous Performance 2 3 4 5 6 Confidential – Oracle Internal/Restricted
Introduction • Performance Engineering “Yeaah.. It’s important but will take it up soon” • One solution fit all – Does not work with performance problems. • Varied KPIs, Software Ecosystem etc • Performance in Cloud • Performance practices from ongoing product development at OICS/IDCS (Oracle Identity Cloud Services) Confidential – Oracle Internal/Restricted
Scope • In Scope • Pro-Active Performance Engineering • Not in scope • Performance Monitoring • Performance Testing aka Load/Stress testing • Performance issue troubleshooting methodologies and tools • Performance based scalability • Capacity Planning Confidential – Oracle Internal/Restricted
Re-Active Performance Engineering • To ensure that software is meeting the performance objectives (KPIs) • Response Time, Throughput, Resource Utilization, Workload etc • Traditional approach to Performance Engineering • Dependent on load/stress testing and KPIs (Key Performance Indicator) • Helps in sizing and capacity planning to meet objectives • Covers network, hardware, third-party frameworks etc Confidential – Oracle Internal/Restricted
Why Pro-Active Performance Engineering • To keep focus on code optimizations (with tools, automation, reviews etc) • Performance issues in production result of • Initial design, patterns, framework, coding constructs • Reduced “Cost Of Ownership” • To align with agile development Confidential – Oracle Internal/Restricted
Who does Pro-Active Performance Engineering New Term: DevPerf Development + Performance Confidential – Oracle Internal/Restricted
Pro-Active Performance Measures - Manual • Performance improvement at design time • Performance: Design Guidelines • Right choices of non functional artefacts makes big difference • Caching : Distributed Cache – Near Cache versus Far/Remote Cache • Algorithms • Coupling and Cohesion • Shared resources : Threads, connections, storage, I/O etc • Third party frameworks and libraries • Performance improvement during coding and code reviews • Performance: Coding Guidelines Confidential – Oracle Internal/Restricted
Pro-Active Performance Measures : Automation • Optimization via static code ruleset • Use of static code analyzer framework • PMD, FindBug, CheckStyle etc. • 100s of rules available out of the box • Can add your own rules (based on the review comments) • Very Powerful and Fast Approach • Integrated with IDE and build scripts. Confidential – Oracle Internal/Restricted
Pro-Active Performance Measures : Automation (Cont.) • Examples* of Performance static code ruleset (PMD) • AvoidInstantiatingObjectsInLoops • New objects created within loops should be checked to see if they can be created outside them and reused. public class Something { public static void main( String as[] ) { for (inti = 0; i < 10; i++) { Foo f = new Foo(); // Avoid this whenever you can it's really expensive } } } • UseStringBufferForStringAppends • UseArrayListInsteadOfVector • UseArraysAsList *Sourcehttp://pmd.sourceforge.net/pmd-5.0.3/rules/java/optimizations.html Confidential – Oracle Internal/Restricted
Pro-Active Performance Measures - Code Profiling • Optimize code performance by observing code’s runtime behavior • Can be done on developers machines. No need of heavy standard infra. • Runtime ‘profiles’ : • Breakdown of the entire call flow execution • Hotpaths • Tools: jProfiler, JRAT, VisualVM (JDK7), JMC etc Confidential – Oracle Internal/Restricted
Pro-Active Performance Measures - Code Profiling (Continued) The profile below is from OCIS/IDCS showing duplicate/extra DB Calls to fetch user information for user modify operation Confidential – Oracle Internal/Restricted
Pro-Active Performance Measures - Code Profiling (Continued) Below is the screen shot showing code flow of 54% in CachedDataProvider Confidential – Oracle Internal/Restricted
Pro-Active Performance Measures Continuous Performance (CP) Confidential – Oracle Internal/Restricted
OIDC/IDCS Continuous Performance • What is Continuous Performance ? • Continuous check for performance degradation • Check code’s runtime behavior for its optimization Confidential – Oracle Internal/Restricted
Continuous Performance (CP)… (Continued) • How “Continuous Performance” is achieved ? • Microservice REST Endpoints based test invocations • Single thread execution (iterated over 600 times). • Server latency only (Response Time) based comparison with baseline • Automation using Gradle and Teamcity • Relative performance measurement : No sophisticated H/W or Infra Confidential – Oracle Internal/Restricted
Continuous Performance : Framework Architecture Data Seeder Confidential – Oracle Internal/Restricted
Continuous Performance (CP).. Lifecycle/Process Teamcity Performance Test Suite Run Developer runs the test locally Developer adds performance test Analyze issues reported in generated report Performance Deviation Test Report (Emailed to all dev) Developer fixes the issues Developer fixes Performance Bugs JIRA Bugs For high deviation Confidential – Oracle Internal/Restricted
Continuous Performance : Test Report Confidential – Oracle Internal/Restricted
Continuous Performance : Conclusion • Not a replacement for load testing • Measures before code goes to QA/Performance Testing Team • Remarkable framework/tool developed almost first time in software development industry and no parallel tool or framework exists that provide or supports Continuous Performance in software product/application development • *Patent Under Progress Confidential – Oracle Internal/Restricted