TIMWOODS of Application Performance
Introduction
Application Performance optimisation processes and techniques has many similarities with industrial and process optimisation theories.
Goal of response time centric application design is to ensure that there is zero wasted operations and redundant code/process are not executed. Developers would have to essentially code what is absolutely necessary for that particular operation. Remember this saying “Best performing operation is the one that is not executed at all. “. In application performance world Don’t execute code you don’t need.
Application Performance Optimisation Process
Start with the a good APM tool (Apache skywalk/Glowroot) or any commercial APM and start looking at application insights/usage metrics and one can tabulate, prioritise critical operations that are taking time. Focus on critical Operations that consume maximum time these are the ones that potentially provide maximum benefit. Pareto principle of applying 80% of the problems are caused by 20% of the items is largely true in application performance optimization as well. Focus on the operation taking maximum time and optimize the operation. Prioritise the top 4-5 items and progressively iterate till we achieve desired target response times or throughput.
Applying 8 Lean wastes to Application Performance Optimisation
Lean identifies 8 types of wastes (acronym of TIMWOODS)
One could map this to application performance world in terms of avoiding transport of data that is not required for the operation. E.g. query is performing an unindexed lookup of data and is transporting a lot of data from the disk to buffer or from application server to JS. Avoiding waste of this category is by implementing fundamental design right (optimal indexes), various types of caching, compression techniques wherever applicable to avoid unnecessary data transport
2. Inventory -- Having too much inventory, can lead to longer lead times, damaged or defected products, and an inefficient use of capital.
One could map this to In the application performance world in terms of a sub-optimal data search is implemented which significant amount of the data is not relevant to the search. (Historical data that is not relevant). Avoiding waste of this category involves reviewing the data structure and its life cycle so that inventory is kept to minimum.
3. Movement/Motion: Unnecessary and complicated movements are wasteful.
Recommended by LinkedIn
One could map this to the application performance world in terms of application making redundant API’ calls or SQL calls that are not required at the first place. Avoiding waste of this category is best implemented at early stages of the development cycle by the developers/leads looking through the browser developer tools (what calls are being made), APM tools on the JVM to ascertain that only needed calls are present.
4. Waiting and Delays: Waiting is often an easy waste to overlook. Time that is lost due to a lull in productivity is considered a waste. .
One could map this to the application performance world in terms of application making long or chains of synchronous calls waiting for response to proceed further. Avoiding waste of this category is best implemented by avoiding long synchronous calls or multiple sequential calls when the user is waiting for the UI to respond.
5. Overproduction: When production exceeds customer demand, facilities are left with excessive inventory to store and manage. .
One could map this to the application performance world in terms of application generating a loads of unnecessary information in the application servers and database servers using precious storage space.
6. Over Processing: A product or service that has more features or capabilities than required or expected by the company would be considered over processing.
One could map this to the application performance world to items where the application invokes operations (expensive API calls/ SQL calls) not required to be processed within the scope of operations performed.
7. Defects: Characterized as products that do not meet quality standards, these products must either be scrapped or reworked, thus adding costs to the operation but not adding value for the customer.
One could map this to the application performance world in terms of application defects or scrapped codes, costly rewrites due to application not meeting performance requirements
8. Skills. Characterised as a waste of unused human talent and ingenuity. non-utilised talent could include insufficient training, poor incentives. waste can be seen when employees are poorly trained, employees not knowing how to effectively operate equipment,
One could map this to the application performance world in terms of developers or leads not fully leveraging the underlying technology or developing something for which already an open source library available.
Application performance requirements are best ingrained from design stage of the application and never as a post-production activity that usually happens. Application performance should also be shift-lefted to benefit from good design and would help avoiding generating above types of wastes
Informative..