modelling a complex batch schedule in peoplesoft david kurtz go-faster consultancy ltd....

33
Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go- faster.co.uk www.go- faster.co.uk

Upload: leticia-mellin

Post on 31-Mar-2015

217 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

David KurtzGo-Faster Consultancy Ltd.

[email protected]

www.go-faster.co.uk

Page 2: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 2

• Oracle Database Specialist– Independent consultant

• Performance tuning– PeopleSoft ERP– Oracle RDBMS

• Book– www.psftdba.com

• UKOUG Director• Server Tech & PeopleSoft• Oak Table•

Who Am I?

Page 3: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 3

Agenda

• Process Scheduler Priorities– Process Definition– Server Category

• Queuing in the Process Scheduler

• Modelling Process Scheduler behaviour

Page 4: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 4

Meet my PeopleSoft system

• Lots of batch process run ad-hoc by users during the ‘peak’ day.

• So many batch processes that there is a often a queue.

• Number of concurrent processes limited to prevent overload of CPU and Memory

Page 5: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 5

Two business Tasks

• Completion of task A is more important to the business than task B.– Each task comprises on-line activity and more than one

process on Process Scheduler• Users do task A in the morning.• They are supposed to task B in the afternoon.• But they start task B as soon as they complete task

A• Users who start task B in the morning impede

users who are still doing task A

Page 6: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 6

Process Scheduler Queue

0

300

600

900

1200

18.4.11 6:00

18.4.11 7:00

18.4.11 8:00

18.4.11 9:00

18.4.11 10:00

18.4.11 11:00

18.4.11 12:00

18.4.11 13:00

18.4.11 14:00

18.4.11 15:00Date/Time of Request

Tim

e S

pen

t Q

ueu

ed

Task B (yellow) displaces Task A (blue)

Page 7: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 7

Suggestion

• In the mind of the business there is a hierarchy of processing.

• The hierarchy should be reflected in the configuration and behaviour of the Process Scheduler.

• If there is a queue on the Process Scheduler– Execute Task A processes in preference to Task

B processes.

Page 8: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 8

Process Priority

Page 9: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 9

Server Category Priority

Page 10: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 10

Define More Priorities

Page 11: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 11

Testing Priorities

• Create a queue of processes on the Process Scheduler– Needs processes that run for a period of time– The don’t need to do anything, just stay in

status processing for a while

Page 12: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 12

Java Sleep in AE

Local JavaObject &Obj; Local ProcessRequest &RQST;

MessageBox(0, "", 0, 0, "Sleep Begin for " | GFC_SLEEP_AET.DURATION.Value | " seconds ");

&Obj = CreateJavaObject("java.lang.Thread");&Obj.start();&Obj.sleep(GFC_SLEEP_AET.DURATION.Value * 1000);

MessageBox(0, "", 0, 0, "Sleep END");

Page 13: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 13

Java Sleep in AE

• Sleep step in AE_SLEEP

• Various process AE_SLEEP1 … n

• Process definitions– Different priorities & categories

• Table GFC_SLEEP_RUN – specifies processes to run– AE_SLEEP_RUN submits processes

Page 14: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 14

Create Test Run

Run                            OffsetControl  PRCSNAME     RUNDTTM  Amount   DURATION-------- ------------ -------- ------ -----------1        AE_SLEEP1                  5        1752        AE_SLEEP2                 10        1753        AE_SLEEP3                 15        1754        AE_SLEEP4                 20        1755        AE_SLEEP5                 25        1756        AE_SLEEP6                 30        1757        AE_SLEEP7                 35        1758        AE_SLEEP8                 40        1759        AE_SLEEP9                 45        175

Page 15: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 15

Process Priority Quirk

Row PRCS # SYSDATE INSTANCE PRCSNAME RUNDTTM BEGINDTTM ENDDTTM--- --------- -------- ------------ -------- --------- -------- 1 13:14:17 4583 AE_SLEEP1 13:03:27 13:03:55 13:07:08 2 13:14:17 4584 AE_SLEEP2 13:03:32 13:03:55 13:07:08 3 13:14:17 4585 AE_SLEEP3 13:03:37 13:03:55 13:07:08 4 13:14:17 4591 AE_SLEEP9 13:04:07 13:07:12 13:10:27 5 13:14:17 4587 AE_SLEEP5 13:03:47 13:07:13 13:10:27 6 13:14:17 4588 AE_SLEEP6 13:03:52 13:07:13 13:10:27 7 13:14:17 4586 AE_SLEEP4 13:03:42 13:10:31 13:13:46 8 13:14:17 4589 AE_SLEEP7 13:03:57 13:10:47 13:14:01 9 13:14:17 4590 AE_SLEEP8 13:04:02 13:10:47 13:14:01

Page 16: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 16

Process Priority Quirk

• Delivered Priorities sometimes processed before custom added Priorities

• Not explicable from SQL submitted by Process Scheduler– Something in logic in program

• Process Categories process correctly

Page 17: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 17

Process Categories

Row PRCS PRCS SERVER RUN # INSTANCE PRCSNAME PRTY RUNDTTM BEGINDTT ENDDTTM ASSIGN STATUS PRCSCATEGORY--- -------- --------- ---- -------- -------- -------- ------ ------ ------------ 1 4740 AE_SLEEP5 5 19:25:10 19:25:23 19:28:23 PSNT 9 Default 2 4741 AE_SLEEP5 5 19:25:13 19:25:39 19:28:38 PSNT 9 Default 3 4742 AE_SLEEP5 5 19:25:16 19:25:39 19:28:38 PSNT 9 Default 4 4748 AE_SLEEP7 7 19:26:52 19:28:41 19:31:41 PSNT 9 Priority 7 5 4749 AE_SLEEP7 7 19:26:57 19:28:58 19:31:56 PSNT 9 Priority 7 6 4747 AE_SLEEP6 6 19:26:37 19:28:58 19:31:56 PSNT 9 Priority 6 7 4746 AE_SLEEP6 6 19:26:42 19:32:00 19:34:59 PSNT 9 Priority 6 8 4743 AE_SLEEP5 5 19:25:19 19:32:16 19:35:15 PSNT 9 Default 9 4744 AE_SLEEP5 5 19:25:22 19:32:16 19:35:16 PSNT 9 Default 10 4745 AE_SLEEP5 5 19:25:25 19:35:02 19:37:59 PSNT 9 Default

Page 18: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 18

Priorities

• You can use all 9 priorities on Server Categories

• You can only use priories 1, 5, 9 on Process Definition

• Server Category Priority takes precedence over Category Priority– So now have 27 priorities instead of 9.

Page 19: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 19

What happens if I change…

• Maximum number of concurrent processes.

• Process priorities and process category priorities.

• Process execution durations, possibly caused by changes to hardware.

• Increase in number of batch processes.

Page 20: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 20

Create a Model

• Take what actually happened in production– Process Scheduler Request Table– Batch Timings Table

• Run Times

• Map processes to AE_SLEEP_n processes• Create contents of GFC_SLEEP_RUN

– Now can run processes that run at and for the same time as in production.

Page 21: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 21

“Linked Processing”

• Model schedules each process at a given time.– operator runs a process, – Waits for it to begin and complete,– does some work, – Runs another process.

• What happens if first process completes more quickly?

Page 22: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 22

“Linked Processing”

• Next process for same operator scheduled a fixed time after previous process completes.– One AE_SLEEP_n process schedules next

process for same operator just before it completes.

– Determine links between processes and put into AE_SLEEP_RC

Page 23: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 23

Testing the Model

• Simulate production without any changes– Needed to subtract 2 seconds from run time to

be AE_SLEEP_n run for the requested duration• Fixed overhead of AE

– Needed fudge factor – added 5 seconds to every process to make model look like production.

• Overhead of posting etc.

Page 24: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 24

Page 25: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 25

Predict Effect of Changes

• Make changes– Process and Category Priorities– Rerun the test

Page 26: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 26

Page 27: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 27

Actual Effect in Production

0

600

1200

1800

2400

3000

9.5.11 6:00

9.5.11 7:00

9.5.11 8:00

9.5.11 9:00

9.5.11 10:00

9.5.11 11:00

9.5.11 12:00

9.5.11 13:00

9.5.11 14:00

9.5.11 15:00Date/Time of Request

Tim

e S

pen

t Q

ueu

ed

Page 28: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 28

Conclusion

• Server Category Priority takes precedence over Process Priority.

• Extra priorities work in Server Categories• Model accurately predicted behaviour in

production.• We encountered counter-intuitive behaviour

that we did not predict.– Set expectations for users.

Page 29: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 29

Acknowledgements

• Andy Mason– Business-Integrations

– Java Sleep Utility– Test harness concept

Page 30: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 30

Further Reading

• Process Scheduler Priority– http://blog.psftdba.com/2011/03/more-process-

priority-levels-for.html

• Batch Modeller– http://www.go-faster.co.uk/

docs.htm#BatchModel.pdf

Page 31: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 31

Conclusion

Page 32: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Questions?

Page 33: Modelling a Complex Batch Schedule in PeopleSoft David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Modelling a Complex Batch Schedule in PeopleSoft

©2011 www.go-faster.co.uk 33

Conclusion