SlideShare a Scribd company logo
1 of 56
Session A13 Creative Application Tuning Techniques Gary Cherlet Heron Computing Services [email_address]
Abstract ,[object Object],[object Object],[object Object]
Session Outline ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Intro to System Monitoring + Tuning ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Turn “stats collection OFF” in sysgen and reduce CPU by 18-20% HOT TIP
Application Tuning Objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Session Outline ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Identifying the Problem Areas (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Identifying the Problem Areas (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Session Outline ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Using the RETURN Verb in Index Processing: Problem - IOs The index in question
Using the RETURN Verb in Index Processing: Problem - IOs ,[object Object],[object Object],[object Object],[object Object]
Using the RETURN Verb in Index Processing DML requests up because we now have to issue OBTAIN as well as RETURN for “candidate” records – BUT look at the SAVINGS !
Session Outline ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
User written ADS BIFs: Problem - CPU ,[object Object],[object Object],[object Object],[object Object],[object Object]
User written ADS BIFs: Problem - CPU Removing Redundant Spaces   (REMSPACE) This function returns the string that results when all occurrences of two or more SPACEs in the specified source string are reduced to a single SPACE character in the result string.   Initial value (where  b  = space): “O’HEARN bbb AND bbb MCHEARN’S bbbbbbbbbbbbbb ” Returned string:  “O’HEARN b AND b MCHEARN’S bbbbbbbbbbbbbbbbbb ”
User written ADS BIFs: Problem - CPU Capitalise the First Letter of Each Word (JWORDCAP)   This function returns the string that results when the first letter of each word in the specified source string is capitalised and all other characters in the string are converted to lower case. This is similar to the CA supplied WORDCAP, except that the following special cases are recognised:   d'Angelo ( D  remains lower case) McAndrews ( A  also upper case) Apostrophe's (the  S  remains lower case following apostrophe's at the end of words)   Initial value (where  b  = space): “O’HEARN bbb AND bbb MCHEARN’S bbbbbbbbbbbbbb ” Returned string:  “O’Hearn bbb And bbb McHearn’s bbbbbbbbbbbbbb ”
User written ADS BIFs: Problem - CPU Word Capitalisation and Space Reduction  (JWCAPREM)   This function returns the string that results when the first letter of each word in the specified source string is capitalised and all other characters in the string are converted to lower case (JWORDCAP), and also reduces multiple spaces to a single space (REMSPACE). As before, the  the following special cases are recognised:   d'Angelo ( D  remains lower case) McAndrews ( A  also upper case) Apostrophe's (the  S  remains lower case following apostrophe's at the end of words)   Initial value (where  b  = space): “O’HEARN bbb AND bbb MCHEARN’S bbbbbbbbbbbbbb ” Returned string:  “O’Hearn b And b McHearn’s bbbbbbbbbbbbbbbbbb ”
User written ADS BIFs: Problem – CPU DIALOG X MOVE XX0000-NAME-TEXT TO GUT0025‑STRING.  MOVE 'Y' TO GUT0025‑REMOVE‑SPACES‑FLAG. MOVE 'N' TO GUT0025‑UPPER‑LOWER‑FLAG.  LINK 'GUT0025D'.  MOVE GUT0025-STRING TO XX0000-NAME-TEXT GUT0025D Text processing Xer by Xer scans Nested BIFs Heavy Subscripting Old Technique  Time / 1000 Iterations: 13 secs
User written ADS BIFs: Problem – CPU - Solution DIALOG X MOVE XX0000-NAME-TEXT TO GUT0025‑STRING.  LINK 'GUT0025D'.  MOVE GUT0025-STRING TO XX0000-NAME-TEXT GUT0025D MOVE  REMSPACE(GUT0025-STRING) TO GUT0025-STRING. Interim measure to get benefits wherever GUT0025D used   DIALOG X MOVE REMSPACE(XX0000-NAME‑TEXT) TO XX0000-NAME‑TEXT. New Technique  Time / 1000 Iterations: 1 sec
User written ADS BIFs: Problem - CPU ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Session Outline ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ADS Arithmetic instead of ADS BIFs: Problem - CPU ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ADS Arithmetic instead of ADS BIFs: Problem - CPU Code Comparison Let’s not argue the relative merits of readability or maintainability – this code is in a “black box” routine – so once it works nobody has to look at it again. Here’s just one line of a much larger routine (see appendix A of the written paper) !   Using a BIF – original code COMPUTE GUT0016-WORK2-MM =  MOD(GUT0016-WORK2-MM + 9, 12).  Without a BIF – intermediate code COMPUTE GUT0016-TEMP-MM = GUT0016-WORK2-MM + 9.  DIVIDE 12 INTO GUT0016-TEMP-MM  GIVING GUT0016-TEMP-NUM  REMAINDER GUT0016-TEMP-MM.
ADS Arithmetic instead of ADS BIFs: Problem - CPU Anticipated Savings At this stage we have an “intermediate” version of our date handling routine – we thought if we can save 7 minutes on 100,000 uses by changing to basic arithmetic – can we do better yet by writing built-in-functions?
ADS Arithmetic instead of ADS BIFs: Problem - CPU Using a User Written BIF – final code MOVE GUT0016-WORK1-DATE TO  GUT0016-WORK2-DATE.  MOVE DBTOSERL(GUT0016-WORK1-DATE) TO GUT0016-WORK2.  MOVE GUT0016-NUM-AREA TO GUT0016-DATE-AS-NUM.  CALL NUMBTOD8. RETURN.   DEFINE NUMBTOD8.  MOVE SERLTODB(GUT0016-DATE-AS-NUM) TO GUT0016-WORK2.  MOVE GUT0016-DATE-AREA TO GUT0016-WORK2-DATE. GOBACK.  Please see Appendix A of written paper for the full code + intermediate code replaced by this!
ADS Arithmetic instead of ADS BIFs: Problem - CPU Anticipated Savings With a built-in-function we look like saving 14 minutes of CPU on 100,000 uses of this routine (our volumes are now much higher than this and 100,000 was a conservative estimate anyway) – so we’re pretty happy that we bit the bullet and did this way back when!
Session Outline ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Look Aside Message Buffers: Message Processor – Problem - High IO on DDLDCMSG IDD Messages DDLDCMSG DIALOG X ………… . Call DISPMSG. …………… . Define DISPMSG. Link pgm ‘CSYPMSG0’ ..etc Goback. CSYPMSG0 Retrieve message with RETURN Goback. ……… .
Look Aside Message Buffers: Revised Message Processor – Problem – IOs - fixed IDD Messages DDLDCMSG DIALOG X ………… . Call DISPMSG. …………… . Define DISPMSG. Link pgm ‘CSYPMSG0’ ..etc Goback. dcmt d mem id ‘MSG0’ CSYPMSG0 “ get storage” the  message-buffer Search for message IF FOUND – RETURN message GOBACK Retrieve message with RETURN Goback. ,[object Object],[object Object],[object Object],[object Object]
Session Outline ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Next Number Server tasks: Next Number Generator – Problem – DBKey Deadlocks DIALOG X ………… . Call NUMGEN. …………… . Define NUMGEN. Link pgm ‘CSYPGNUM’ ..etc Goback. OOAK 1 OOAK 2 NOOAK 1 NOOAK 2 Application Data CSYPGNUM Number generation logic MODIFY database Goback. ……… .
Next Number Server Tasks: Revised Next Number Generator Generator-storage-area Generate-request-ecb Done-ecb Subschema Parameters DIALOG X Call NUMGEN. ----------------------- Define NUMGEN. Link pgm ‘CSYPGNUM’ ..etc Goback. DBUTPX53 WAIT for Generate-request-ecb Number generation logic MODIFY database COMMIT TASK ALL POST Done-ecb Go to WAIT dcmt d mem id ‘PX53’ OOAK 1 OOAK 2 NOOAK 1 NOOAK 2 Application Data CSYPGNUM Get storage the  generator-storage-area ENQ POST  Generate-request-ecb WAIT Done-ecb Return data to caller DEQ Goback.
Session Outline ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Database Procedures: The Problems with Audit/Activity Records ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Database Procedures: The Problems with Audit/Activity Records Online: DIALOGX STORE xxx-AUDIT. Batch: Program A Extract + Purge Xxx-AUDIT records CAS Database Extracted Purge File Batch: Program B Print Reports Batch: Program C Archive Process Prior Archive New Archive
Database Procedures: The Solution for Audit/Activity Records Online: DIALOGX STORE xxx-AUDIT. Note: All 5 audit record types are stored in this file. Normal operational procedures for SMF archiving meets user archival reporting requirements! Batch: Program B Print Reports DB  BEFORE STORE  Procedure Issue SMF WRITE macro CANCEL DML verb Return DB-STATUS-OK SMF File With Xxx-AUDIT records
Database Procedures: Results ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Session Outline ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Subschema Tailoring: Problem – CPU ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Subschema Tailoring: Problem – CPU – A true Story ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Subschema Tailoring: Problem – CPU – “test harness” benchmark A 700% Reduction in CPU – and –  not a single line of application code was changed!
Session Outline ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Job Submission: Problem – DB Key Deadlocking - Symptoms ,[object Object],[object Object],[object Object]
Job Submission: Problem – DB Key Deadlocking - Why ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Job Submission: Problem – DB Key Deadlocking - Solution ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Easy to use - this is what the API for CA-Spool  looks like!
Clearly documented in the CA-Spool documentation set.
Session Outline ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Results:  anticipated benefits in CAS ,[object Object],[object Object],[object Object],[object Object],[object Object]
Results:  actual achievements in CAS ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Session Outline ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Conclusions (1)  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Conclusions (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Conclusions (3) Don’t be afraid to  try something  that’s a  little  bit  different!  Don’t expect  everything you  try to work first time!
Questions & Answers Don’t forget additional Question and Answer sessions  between 4:00 – 6:00, in the Grand Ballroom A, on Monday & Tuesday.
Session A13 Evaluation Form ,[object Object],[object Object]

More Related Content

Similar to IUA 2001 Creative Techniques for Application Tuning

Blue Phoenix Idms Migration
Blue Phoenix Idms MigrationBlue Phoenix Idms Migration
Blue Phoenix Idms MigrationGilShalit
 
CS 542 -- Query Execution
CS 542 -- Query ExecutionCS 542 -- Query Execution
CS 542 -- Query ExecutionJ Singh
 
Introduction to computer architecture .pptx
Introduction to computer architecture .pptxIntroduction to computer architecture .pptx
Introduction to computer architecture .pptxFatma Sayed Ibrahim
 
USING FACTORY DESIGN PATTERNS IN MAP REDUCE DESIGN FOR BIG DATA ANALYTICS
USING FACTORY DESIGN PATTERNS IN MAP REDUCE DESIGN FOR BIG DATA ANALYTICSUSING FACTORY DESIGN PATTERNS IN MAP REDUCE DESIGN FOR BIG DATA ANALYTICS
USING FACTORY DESIGN PATTERNS IN MAP REDUCE DESIGN FOR BIG DATA ANALYTICSHCL Technologies
 
Enterprise application performance - Understanding & Learnings
Enterprise application performance - Understanding & LearningsEnterprise application performance - Understanding & Learnings
Enterprise application performance - Understanding & LearningsDhaval Shah
 
Function Overloading,Inline Function and Recursion in C++ By Faisal Shahzad
Function Overloading,Inline Function and Recursion in C++ By Faisal ShahzadFunction Overloading,Inline Function and Recursion in C++ By Faisal Shahzad
Function Overloading,Inline Function and Recursion in C++ By Faisal ShahzadFaisal Shehzad
 
Health Check Your DB2 UDB For Z/OS System
Health Check Your DB2 UDB For Z/OS SystemHealth Check Your DB2 UDB For Z/OS System
Health Check Your DB2 UDB For Z/OS Systemsjreese
 
Challenges of Building a First Class SQL-on-Hadoop Engine
Challenges of Building a First Class SQL-on-Hadoop EngineChallenges of Building a First Class SQL-on-Hadoop Engine
Challenges of Building a First Class SQL-on-Hadoop EngineNicolas Morales
 
Introduction To Map Reduce
Introduction To Map ReduceIntroduction To Map Reduce
Introduction To Map Reducerantav
 
Evolutionary db development
Evolutionary db development Evolutionary db development
Evolutionary db development Open Party
 
Optimize DR and Cloning with Logical Hostnames in Oracle E-Business Suite (OA...
Optimize DR and Cloning with Logical Hostnames in Oracle E-Business Suite (OA...Optimize DR and Cloning with Logical Hostnames in Oracle E-Business Suite (OA...
Optimize DR and Cloning with Logical Hostnames in Oracle E-Business Suite (OA...Andrejs Prokopjevs
 
AVB202 Intermediate Microsoft Access VBA
AVB202 Intermediate Microsoft Access VBAAVB202 Intermediate Microsoft Access VBA
AVB202 Intermediate Microsoft Access VBADan D'Urso
 
Performance modeling and simulation for accumulo applications
Performance modeling and simulation for accumulo applicationsPerformance modeling and simulation for accumulo applications
Performance modeling and simulation for accumulo applicationsAccumulo Summit
 
Cs 568 Spring 10 Lecture 5 Estimation
Cs 568 Spring 10  Lecture 5 EstimationCs 568 Spring 10  Lecture 5 Estimation
Cs 568 Spring 10 Lecture 5 EstimationLawrence Bernstein
 

Similar to IUA 2001 Creative Techniques for Application Tuning (20)

Blue Phoenix Idms Migration
Blue Phoenix Idms MigrationBlue Phoenix Idms Migration
Blue Phoenix Idms Migration
 
CS 542 -- Query Execution
CS 542 -- Query ExecutionCS 542 -- Query Execution
CS 542 -- Query Execution
 
Peephole Optimization
Peephole OptimizationPeephole Optimization
Peephole Optimization
 
Cocomomodel
CocomomodelCocomomodel
Cocomomodel
 
COCOMO Model
COCOMO ModelCOCOMO Model
COCOMO Model
 
Cocomo model
Cocomo modelCocomo model
Cocomo model
 
Introduction to computer architecture .pptx
Introduction to computer architecture .pptxIntroduction to computer architecture .pptx
Introduction to computer architecture .pptx
 
USING FACTORY DESIGN PATTERNS IN MAP REDUCE DESIGN FOR BIG DATA ANALYTICS
USING FACTORY DESIGN PATTERNS IN MAP REDUCE DESIGN FOR BIG DATA ANALYTICSUSING FACTORY DESIGN PATTERNS IN MAP REDUCE DESIGN FOR BIG DATA ANALYTICS
USING FACTORY DESIGN PATTERNS IN MAP REDUCE DESIGN FOR BIG DATA ANALYTICS
 
Enterprise application performance - Understanding & Learnings
Enterprise application performance - Understanding & LearningsEnterprise application performance - Understanding & Learnings
Enterprise application performance - Understanding & Learnings
 
Function Overloading,Inline Function and Recursion in C++ By Faisal Shahzad
Function Overloading,Inline Function and Recursion in C++ By Faisal ShahzadFunction Overloading,Inline Function and Recursion in C++ By Faisal Shahzad
Function Overloading,Inline Function and Recursion in C++ By Faisal Shahzad
 
Health Check Your DB2 UDB For Z/OS System
Health Check Your DB2 UDB For Z/OS SystemHealth Check Your DB2 UDB For Z/OS System
Health Check Your DB2 UDB For Z/OS System
 
Challenges of Building a First Class SQL-on-Hadoop Engine
Challenges of Building a First Class SQL-on-Hadoop EngineChallenges of Building a First Class SQL-on-Hadoop Engine
Challenges of Building a First Class SQL-on-Hadoop Engine
 
Introduction To Map Reduce
Introduction To Map ReduceIntroduction To Map Reduce
Introduction To Map Reduce
 
Evolutionary db development
Evolutionary db development Evolutionary db development
Evolutionary db development
 
Optimize DR and Cloning with Logical Hostnames in Oracle E-Business Suite (OA...
Optimize DR and Cloning with Logical Hostnames in Oracle E-Business Suite (OA...Optimize DR and Cloning with Logical Hostnames in Oracle E-Business Suite (OA...
Optimize DR and Cloning with Logical Hostnames in Oracle E-Business Suite (OA...
 
AVB202 Intermediate Microsoft Access VBA
AVB202 Intermediate Microsoft Access VBAAVB202 Intermediate Microsoft Access VBA
AVB202 Intermediate Microsoft Access VBA
 
Performance modeling and simulation for accumulo applications
Performance modeling and simulation for accumulo applicationsPerformance modeling and simulation for accumulo applications
Performance modeling and simulation for accumulo applications
 
Cs 568 Spring 10 Lecture 5 Estimation
Cs 568 Spring 10  Lecture 5 EstimationCs 568 Spring 10  Lecture 5 Estimation
Cs 568 Spring 10 Lecture 5 Estimation
 
Ch1
Ch1Ch1
Ch1
 
Ch1
Ch1Ch1
Ch1
 

Recently uploaded

Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 

Recently uploaded (20)

Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 

IUA 2001 Creative Techniques for Application Tuning

  • 1. Session A13 Creative Application Tuning Techniques Gary Cherlet Heron Computing Services [email_address]
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. Using the RETURN Verb in Index Processing: Problem - IOs The index in question
  • 11.
  • 12. Using the RETURN Verb in Index Processing DML requests up because we now have to issue OBTAIN as well as RETURN for “candidate” records – BUT look at the SAVINGS !
  • 13.
  • 14.
  • 15. User written ADS BIFs: Problem - CPU Removing Redundant Spaces   (REMSPACE) This function returns the string that results when all occurrences of two or more SPACEs in the specified source string are reduced to a single SPACE character in the result string. Initial value (where b = space): “O’HEARN bbb AND bbb MCHEARN’S bbbbbbbbbbbbbb ” Returned string: “O’HEARN b AND b MCHEARN’S bbbbbbbbbbbbbbbbbb ”
  • 16. User written ADS BIFs: Problem - CPU Capitalise the First Letter of Each Word (JWORDCAP)   This function returns the string that results when the first letter of each word in the specified source string is capitalised and all other characters in the string are converted to lower case. This is similar to the CA supplied WORDCAP, except that the following special cases are recognised:   d'Angelo ( D remains lower case) McAndrews ( A also upper case) Apostrophe's (the S remains lower case following apostrophe's at the end of words) Initial value (where b = space): “O’HEARN bbb AND bbb MCHEARN’S bbbbbbbbbbbbbb ” Returned string: “O’Hearn bbb And bbb McHearn’s bbbbbbbbbbbbbb ”
  • 17. User written ADS BIFs: Problem - CPU Word Capitalisation and Space Reduction (JWCAPREM)   This function returns the string that results when the first letter of each word in the specified source string is capitalised and all other characters in the string are converted to lower case (JWORDCAP), and also reduces multiple spaces to a single space (REMSPACE). As before, the the following special cases are recognised:   d'Angelo ( D remains lower case) McAndrews ( A also upper case) Apostrophe's (the S remains lower case following apostrophe's at the end of words) Initial value (where b = space): “O’HEARN bbb AND bbb MCHEARN’S bbbbbbbbbbbbbb ” Returned string: “O’Hearn b And b McHearn’s bbbbbbbbbbbbbbbbbb ”
  • 18. User written ADS BIFs: Problem – CPU DIALOG X MOVE XX0000-NAME-TEXT TO GUT0025‑STRING. MOVE 'Y' TO GUT0025‑REMOVE‑SPACES‑FLAG. MOVE 'N' TO GUT0025‑UPPER‑LOWER‑FLAG. LINK 'GUT0025D'. MOVE GUT0025-STRING TO XX0000-NAME-TEXT GUT0025D Text processing Xer by Xer scans Nested BIFs Heavy Subscripting Old Technique Time / 1000 Iterations: 13 secs
  • 19. User written ADS BIFs: Problem – CPU - Solution DIALOG X MOVE XX0000-NAME-TEXT TO GUT0025‑STRING. LINK 'GUT0025D'. MOVE GUT0025-STRING TO XX0000-NAME-TEXT GUT0025D MOVE REMSPACE(GUT0025-STRING) TO GUT0025-STRING. Interim measure to get benefits wherever GUT0025D used DIALOG X MOVE REMSPACE(XX0000-NAME‑TEXT) TO XX0000-NAME‑TEXT. New Technique Time / 1000 Iterations: 1 sec
  • 20.
  • 21.
  • 22.
  • 23. ADS Arithmetic instead of ADS BIFs: Problem - CPU Code Comparison Let’s not argue the relative merits of readability or maintainability – this code is in a “black box” routine – so once it works nobody has to look at it again. Here’s just one line of a much larger routine (see appendix A of the written paper) ! Using a BIF – original code COMPUTE GUT0016-WORK2-MM = MOD(GUT0016-WORK2-MM + 9, 12). Without a BIF – intermediate code COMPUTE GUT0016-TEMP-MM = GUT0016-WORK2-MM + 9. DIVIDE 12 INTO GUT0016-TEMP-MM GIVING GUT0016-TEMP-NUM REMAINDER GUT0016-TEMP-MM.
  • 24. ADS Arithmetic instead of ADS BIFs: Problem - CPU Anticipated Savings At this stage we have an “intermediate” version of our date handling routine – we thought if we can save 7 minutes on 100,000 uses by changing to basic arithmetic – can we do better yet by writing built-in-functions?
  • 25. ADS Arithmetic instead of ADS BIFs: Problem - CPU Using a User Written BIF – final code MOVE GUT0016-WORK1-DATE TO GUT0016-WORK2-DATE. MOVE DBTOSERL(GUT0016-WORK1-DATE) TO GUT0016-WORK2. MOVE GUT0016-NUM-AREA TO GUT0016-DATE-AS-NUM. CALL NUMBTOD8. RETURN.   DEFINE NUMBTOD8. MOVE SERLTODB(GUT0016-DATE-AS-NUM) TO GUT0016-WORK2. MOVE GUT0016-DATE-AREA TO GUT0016-WORK2-DATE. GOBACK. Please see Appendix A of written paper for the full code + intermediate code replaced by this!
  • 26. ADS Arithmetic instead of ADS BIFs: Problem - CPU Anticipated Savings With a built-in-function we look like saving 14 minutes of CPU on 100,000 uses of this routine (our volumes are now much higher than this and 100,000 was a conservative estimate anyway) – so we’re pretty happy that we bit the bullet and did this way back when!
  • 27.
  • 28. Look Aside Message Buffers: Message Processor – Problem - High IO on DDLDCMSG IDD Messages DDLDCMSG DIALOG X ………… . Call DISPMSG. …………… . Define DISPMSG. Link pgm ‘CSYPMSG0’ ..etc Goback. CSYPMSG0 Retrieve message with RETURN Goback. ……… .
  • 29.
  • 30.
  • 31. Next Number Server tasks: Next Number Generator – Problem – DBKey Deadlocks DIALOG X ………… . Call NUMGEN. …………… . Define NUMGEN. Link pgm ‘CSYPGNUM’ ..etc Goback. OOAK 1 OOAK 2 NOOAK 1 NOOAK 2 Application Data CSYPGNUM Number generation logic MODIFY database Goback. ……… .
  • 32. Next Number Server Tasks: Revised Next Number Generator Generator-storage-area Generate-request-ecb Done-ecb Subschema Parameters DIALOG X Call NUMGEN. ----------------------- Define NUMGEN. Link pgm ‘CSYPGNUM’ ..etc Goback. DBUTPX53 WAIT for Generate-request-ecb Number generation logic MODIFY database COMMIT TASK ALL POST Done-ecb Go to WAIT dcmt d mem id ‘PX53’ OOAK 1 OOAK 2 NOOAK 1 NOOAK 2 Application Data CSYPGNUM Get storage the generator-storage-area ENQ POST Generate-request-ecb WAIT Done-ecb Return data to caller DEQ Goback.
  • 33.
  • 34.
  • 35. Database Procedures: The Problems with Audit/Activity Records Online: DIALOGX STORE xxx-AUDIT. Batch: Program A Extract + Purge Xxx-AUDIT records CAS Database Extracted Purge File Batch: Program B Print Reports Batch: Program C Archive Process Prior Archive New Archive
  • 36. Database Procedures: The Solution for Audit/Activity Records Online: DIALOGX STORE xxx-AUDIT. Note: All 5 audit record types are stored in this file. Normal operational procedures for SMF archiving meets user archival reporting requirements! Batch: Program B Print Reports DB BEFORE STORE Procedure Issue SMF WRITE macro CANCEL DML verb Return DB-STATUS-OK SMF File With Xxx-AUDIT records
  • 37.
  • 38.
  • 39.
  • 40.
  • 41. Subschema Tailoring: Problem – CPU – “test harness” benchmark A 700% Reduction in CPU – and – not a single line of application code was changed!
  • 42.
  • 43.
  • 44.
  • 45.
  • 46. Easy to use - this is what the API for CA-Spool looks like!
  • 47. Clearly documented in the CA-Spool documentation set.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54. Conclusions (3) Don’t be afraid to try something that’s a little bit different! Don’t expect everything you try to work first time!
  • 55. Questions & Answers Don’t forget additional Question and Answer sessions between 4:00 – 6:00, in the Grand Ballroom A, on Monday & Tuesday.
  • 56.