Modelling a Complex Batch Schedule in PeopleSoft - Go

advertisement
Modelling a Complex Batch
Schedule in PeopleSoft
David Kurtz
Go-Faster Consultancy Ltd.
david.kurtz@go-faster.co.uk
www.go-faster.co.uk
Who Am I?
• Oracle Database Specialist
– Independent consultant
• Performance tuning
– PeopleSoft ERP
– Oracle RDBMS
• Book
– www.psftdba.com
• UKOUG Director
• Server Tech & PeopleSoft
•
Oak Table
•
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
2
Agenda
• Process Scheduler Priorities
– Process Definition
– Server Category
• Queuing in the Process Scheduler
• Modelling Process Scheduler behaviour
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
3
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
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
4
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
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
5
Process Scheduler Queue
Task B (yellow)
displaces Task A (blue)
1200
Time Spent Queued
900
600
300
0
18
.4
.1
1
6:
00
18
.4
.1
1
7:
00
18
.4
.1
1
8:
00
18
.4
.1
1
9:
00
Modelling a Complex Batch Schedule in
PeopleSoft
18
.4
.1
1
10
18
.4
.1
1
11
:0
of Request:00
Date/Time
0
18
.4
.1
1
12
:0
0
©2011 www.go-faster.co.uk
18
.4
.1
1
13
:0
0
18
.4
.1
1
14
:0
0
6
18
.4
.1
1
15
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.
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
7
Process Priority
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
8
Server Category Priority
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
9
Define More Priorities
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
10
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
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
11
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");
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
12
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
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
13
Create Test Run
Run
Control
-------1
2
3
4
5
6
7
8
9
Offset
PRCSNAME
RUNDTTM Amount
DURATION
------------ -------- ------ ----------AE_SLEEP1
5
175
AE_SLEEP2
10
175
AE_SLEEP3
15
175
AE_SLEEP4
20
175
AE_SLEEP5
25
175
AE_SLEEP6
30
175
AE_SLEEP7
35
175
AE_SLEEP8
40
175
AE_SLEEP9
45
175
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
14
Process Priority Quirk
Row
#
--1
2
3
4
5
6
7
8
9
PRCS
SYSDATE
INSTANCE
--------- -------13:14:17
4583
13:14:17
4584
13:14:17
4585
13:14:17
4591
13:14:17
4587
13:14:17
4588
13:14:17
4586
13:14:17
4589
13:14:17
4590
PRCSNAME
-----------AE_SLEEP1
AE_SLEEP2
AE_SLEEP3
AE_SLEEP9
AE_SLEEP5
AE_SLEEP6
AE_SLEEP4
AE_SLEEP7
AE_SLEEP8
Modelling a Complex Batch Schedule in
PeopleSoft
RUNDTTM
-------13:03:27
13:03:32
13:03:37
13:04:07
13:03:47
13:03:52
13:03:42
13:03:57
13:04:02
BEGINDTTM
--------13:03:55
13:03:55
13:03:55
13:07:12
13:07:13
13:07:13
13:10:31
13:10:47
13:10:47
©2011 www.go-faster.co.uk
ENDDTTM
-------13:07:08
13:07:08
13:07:08
13:10:27
13:10:27
13:10:27
13:13:46
13:14:01
13:14:01
15
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
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
16
Process Categories
Row
PRCS
PRCS
# INSTANCE PRCSNAME PRTY RUNDTTM
--- -------- --------- ---- -------1
4740 AE_SLEEP5
5 19:25:10
2
4741 AE_SLEEP5
5 19:25:13
3
4742 AE_SLEEP5
5 19:25:16
4
4748 AE_SLEEP7
7 19:26:52
5
4749 AE_SLEEP7
7 19:26:57
6
4747 AE_SLEEP6
6 19:26:37
7
4746 AE_SLEEP6
6 19:26:42
8
4743 AE_SLEEP5
5 19:25:19
9
4744 AE_SLEEP5
5 19:25:22
10
4745 AE_SLEEP5
5 19:25:25
Modelling a Complex Batch Schedule in
PeopleSoft
BEGINDTT
-------19:25:23
19:25:39
19:25:39
19:28:41
19:28:58
19:28:58
19:32:00
19:32:16
19:32:16
19:35:02
ENDDTTM
-------19:28:23
19:28:38
19:28:38
19:31:41
19:31:56
19:31:56
19:34:59
19:35:15
19:35:16
19:37:59
SERVER
ASSIGN
-----PSNT
PSNT
PSNT
PSNT
PSNT
PSNT
PSNT
PSNT
PSNT
PSNT
RUN
STATUS
-----9
9
9
9
9
9
9
9
9
9
©2011 www.go-faster.co.uk
PRCSCATEGORY
-----------Default
Default
Default
Priority 7
Priority 7
Priority 6
Priority 6
Default
Default
Default
17
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.
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
18
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.
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
19
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.
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
20
“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?
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
21
“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
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
22
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.
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
23
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
24
Predict Effect of Changes
• Make changes
– Process and Category Priorities
– Rerun the test
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
25
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
26
Actual Effect in Production
Process Scheduler Queue
3000
Time Spent Queued
2400
1800
1200
600
0
0
:0
15
0
:0
14
27
11
5.
9.
11
5.
9.
0
:0
13
0
:0
12
0
:0
11
0
:0
10
00
9:
00
8:
00
7:
00
6:
©2011 www.go-faster.co.uk
Date/Time of Request
11
5.
9.
11
5.
9.
11
5.
9.
11
5.
9.
11
5.
9.
11
5.
9.
11
5.
9.
11
5.
9.
Modelling a Complex Batch Schedule in
PeopleSoft
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.
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
28
Acknowledgements
• Andy Mason
– Business-Integrations
– Java Sleep Utility
– Test harness concept
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
29
Further Reading
• Process Scheduler Priority
– http://blog.psftdba.com/2011/03/more-processpriority-levels-for.html
• Batch Modeller
– http://www.gofaster.co.uk/docs.htm#BatchModel.pdf
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
30
Conclusion
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
31
Questions?
Conclusion
Modelling a Complex Batch Schedule in
PeopleSoft
©2011 www.go-faster.co.uk
33
Download