Presentation is loading. Please wait.

Presentation is loading. Please wait.

Global Payroll Performance Optimisation - I David Kurtz Go-Faster Consultancy Ltd.

Similar presentations


Presentation on theme: "Global Payroll Performance Optimisation - I David Kurtz Go-Faster Consultancy Ltd."— Presentation transcript:

1 Global Payroll Performance Optimisation - I David Kurtz Go-Faster Consultancy Ltd.

2 Global Payroll Performance Optimisation © Oracle Database Specialist –Independent consultant Performance tuning –PeopleSoft ERP –Oracle RDBMS Book –www.psftdba.comwww.psftdba.com UKOUG Director Server Tech & PeopleSoft Oak Table Who Am I?

3 Global Payroll Performance Optimisation © Caveat I am going to simplify some of the technical concepts in this presentation.

4 Global Payroll Performance Optimisation © Agenda ‘Streaming’ –Parallel processing Data Volume Read Consistency Partitioning Reporting Archiving

5 Global Payroll Performance Optimisation © Parallel processing All modern machines have multiple processors, –most of the processors have multiple cores. –Even the CPU in my 4 year old laptop has a 2 core CPU.

6 Global Payroll Performance Optimisation © PeopleSoft Batch Programs Only run on one CPU at any one time. Client Server processes –Program (COBOL or Application Engine) –Database (eg. Oracle) Either busy executing COBOL or waiting for the database. –If your payroll calculation is a single process you are not getting value for money!

7 Global Payroll Performance Optimisation © Payroll ‘Streaming’ Several GP processes can be split up. –Each piece processes a distinct set of employees Range of EMPLID –The pieces can be run concurrently. –Only one global definition of streams. –Maximum number of streams determined by hardware.

8 Global Payroll Performance Optimisation © Streamable Processes Payroll Calculation Banking Preparation GL Preparation EDI Preparation Payslip Preparation

9 Global Payroll Performance Optimisation © Payroll ‘Streaming’ Challenges Payroll isn’t over until the last stream completes. –Streams need to be evenly balanced. –Employee churn? Inter-stream contention –Shared working storage tables

10 Global Payroll Performance Optimisation © How Many Streams? In a well tuned systems, the payroll calculation phase spends about –2/3 of its time in COBOL –1/3 on the database. Number of streams should not exceed –3 * CPU on database server –1.5 * CPU on Process Scheduler server Payroll identification process is database intensive.

11 Global Payroll Performance Optimisation © Employee Churn EMPLID is allocated as an accession number. Streams are a range of EMPLIDs –New employees are hired into the last stream –Employees are terminated across all streams Over time the streams will go out of balance –Last stream will take longest

12 Global Payroll Performance Optimisation © Balancing Streams Balance employees across streams on basis of –80% number of payroll segments per stream –20% number of JOB history rows Longer serving employees in earlier streams likely to have more payroll segment and job history. –Make allowance for employee churn. You will need to periodically rebalance the streams. –Balance for the largest payroll.

13 Global Payroll Performance Optimisation © Reversing the EMPLID Reverse the EMPLID –Instead of EMPLID –Use EMPLID Streams stay balanced because new employees hired across range BUT you must do this before you go live!

14 Global Payroll Performance Optimisation © Reversing the EMPLID

15 Global Payroll Performance Optimisation © Inter-stream Contention Streams are just ranges of EMPLIDs. Oracle inserts data into the first available block (roughly speaking) Multiple streams insert data simultaneously into the same data blocks in result tables. Payroll cancel/recalculation deletes from result tables. Multiple transactions concurrently update different rows in the same block. –On Oracle/SQL Server >=2005: No locking, streams continue to run, but read consistency processing is expensive –Other database can experience page level locking

16 Global Payroll Performance Optimisation © Read Consistency The data set that you query remains the same throughout the life of your query. –If somebody else updates data that you are reading (and commits), after your query starts, then you see the original value. Thus, readers do not block writers or vice versa. Oracle has always done this since SQL Server 2005 has ‘multi-versioning’ option Other databases either block or can permit ‘dirty read’.

17 Global Payroll Performance Optimisation © Read Consistency Oracle achieves this by storing ‘undo’ information for every change –Recovers ‘read-consistent’ in-memory copy of data block to point in time when query started. –A good reason for buying Oracle –Resource intensive process –Performance problem if abused. Global Payroll is the perfect storm!

18 Global Payroll Performance Optimisation © Avoiding Inter-stream Contention Prevent different streams accessing the same data blocks –Range Partition result tables to match stream ranges –Use Global Temporary Tables (Oracle) for working storage tables –Partition these also on other platforms. Now different streams access different partitions. No code change, a job for the DBA –licensed option on most platforms

19 Global Payroll Performance Optimisation © Partitioning Partitioned Table –Different physical components Value of data determines physical location –Logically still one table –Transparent to application –Rather like a multi-part encyclopaedia.

20 Global Payroll Performance Optimisation © Global Temporary Tables A temporary object –Save some of overheads associated with regular tables –Each session gets its own physical copy.

21 Global Payroll Performance Optimisation © Group Lists Specify a list of individual EMPLIDs for whom to run pay calc or another process. Some customers have experienced problems when run groups shortly before or during larger batch payroll calculations. Why?

22 Global Payroll Performance Optimisation © Cost Based Optimizer SQL Execution Plan Caching Bind Variable Peeking during Parse Different Plan for Group List –Because different bind variables But plan cached and gets used for main pay calculation which then runs longer than usual!

23 Global Payroll Performance Optimisation © Plan Stability Remember the good plan used by large payroll. Force it to be used for all payrolls including group list. –Data Volumes small so poor plan won’t really matter. Oracle Stored Outline –No code change, DBA can implement.

24 Global Payroll Performance Optimisation © Data Volume Payroll generates a lot of data. Every pay period it generates more data. Partitioning can offer ways of accessing the data you want quickly –Without having to trawl through data you don’t want. Need to consider how long you need data –Do you still need data from last tax year?

25 Global Payroll Performance Optimisation © Archiving Put the data you do need to keep into a reporting table –Remove data from the live result tables –Partitioning can help you move/delete this data efficiently –May need to rebuild tables where you have to use DELETE Reduced data volumes should improve performance of reports.

26 Global Payroll Performance Optimisation © Reporting Payroll result tables delivered with single index –Not suitably indexed for all reporting requirements Particularly single PIN queries –Adding more indexes would degrade calculation performance –Consider generating reporting table Subset of data, and indexed as necessary.

27 Global Payroll Performance Optimisation © Conclusion

28 Questions?


Download ppt "Global Payroll Performance Optimisation - I David Kurtz Go-Faster Consultancy Ltd."

Similar presentations


Ads by Google