Você está na página 1de 45

Better Performance. Less Guesswork.

HFM Optimization
p

Jonathan Berry
President & CEO
jberry@accelatis.com
203.331.2267

Ed DeLise
VP Sales & Marketing
Marketing, Principal
edelise@accelatis.com
678.296.3611

Agenda
1 Background
1.
2. Configuration
g
3. Data
4. Rules

What is Accelatis?

Background
Founded by Jonathan Berry
Hyperion
H
i Fi
Financial
i lM
Managementt D
Development
l
tT
Team 1998
1998-2008
2008
Director Engineering for HFM & FDM at Oracle

Team
Hyperion Technologists with combined 50 years of experience.
Tony Mitri
o Former Oracle Consulting Member Technical Staff
o Co-author of HFM Consolidation Engine and Rules Engine

Robb Salzmann: 13 Year veteran of Essbase Implementations and Tuning

Ed DeLise, Former Senior Executive at Upstream/FDM

Where we fit in
Without Accelatis

With Accelatis

Guesswork

Quantifiable data and insight

Application
Administrator

Outsourced IT

Application
Administrator

IT

Product Support
pp

Management

IT

Collaborative
D i i
Decision
Making

Who owns
this?

Users

Outsourced IT

Users

Product Support
pp

Management

APM Proficiency Model


What Level do you want to operate?
5

Proficient
User simulations, load generation, benchmarking &
predictive alerting.

Accelatis Clients
within a few
weeks

Proactive
Repeatable Optimization. Insight into user activity.
Monitoring, automation and continuous testing performed.

Procedural
3

Monitoring with alerts. Some automation. Resolution


processes implemented. SLA compliance

Accelatis Clients on Day 1

Exploratory
Basic Monitoring. Reactionary review of data.

Reactionary

Most EPM Clients Are Here

No monitoring.
monitoring Ad-hoc resources gathered for each issue.
issue

Accelatis Ascension Suite


Accelatis facilitates all
EPM focus areas
Manage

Monitor

A ti i t
Anticipate

Oracle EPM Users


and Components

Resolve

Optimize

Simulate

HFM Rules Profiler is just


one feature within the
Optimize focus area
Other Optimization
capabilities include:
o Essbase Calc Profiler
o Planning Forms Optimizer
o HFM Subcube Analyzer

Benefits of HFM Optimization


1 Faster Consolidations
1.
2. More Predictable Close
3. Prevent Outages

Challenges
1.

Data organization and usage not widely understood

2.

HFM Rules are VBScript (Anything goes)

Configuration
Components to tune
1.
Operating System

TCP,, Memoryy settings


g
2.

Web Server

Compression, Caching

3
3.

App Server

Consolidation settings in registry HKEY_LOCAL_MACHINE\SOFTWARE\Hyperion


Solutions\Hyperion Financial Management\Server

4
4.

32/64 Bit Considerations

Database

Purging log tables

Oracle-specific tuning

Review of event logs


FreeLRUs

10

Data: Tables
DCE, DCN Tables
DCN vary by parent: upper half of value dim

Table Population (MSSQL specific)


If #
#records
eco ds > 15000
5000 co
consider
s de cchanging
a g gp
primary
a y key
ey to
o cclustered
us e ed p
primary
a y key
ey
SQL Example:
SELECT count(*)
FROM COMMA_DCE_1_2011
COMMA DCE 1 2011

11

Data: Subcubes
SubCube Population
If #records > 100,000 consider changing org structure
SQL Example:
SELECT lEntity, lValue, count(*) as numRecs
FROM COMMA_DCE_1_2011
COMMA DCE 1 2011
GROUP BY lEntity, lValue

12

Data: Zeros
No reason for soft zeros
Possible erroneous hard zeros
Determine how many zeros are in each period
select * from COMMA_DCN_1_2005 where dp1_Input=0 and dp2_Input=0
and
dd
dp3_Input=0
3 I
t 0 and
d XXX
Then
p
_InputTransType
p
yp != 2 then SoftZero,, not
foreach Period if dp<PERIOD>
HardZero

13

HFM Rules Profiling


Why?
1. Faster Consolidations
2. More Predictable Close
3. Performance is affected not only by Rules changes but also by data changes,
period changes, POV, etc
Challenges
1. Not easy to determine bottlenecks without expertise
2. Data organization and usage not widely understood
3. HFM Rules are VBScript (Anything goes)
What you will learn today
1. We will review the manual process of what our software does automatically
2. Huge value in profiling rules manually or using our tool

2012 Accelatis, LLC

14

Goals of Profiling Rules


1. Determine where the time is going?

Predefined
P
d fi d ffunctions
ti
Custom functions
Blocks of code
Time byy Entityy

2. Counters

Invocations by function
Invocations by specific line

3. Determine Rules effect on data?

P
Populating
l ti zeros

Subcube density

2012 Accelatis, LLC

15

Steps (aka our Agenda)


1.

Instrument Rules file


o
o
o
o
o

2.
3.
4
4.
5.

Add timings to all functions


Track subroutines with complete stack trace
Track time by Entity
Add custom timing blocks and function line iterators
Persist timings data

Capture Subcube Populations Prior to Calculation


Execute Consolidation
Capture Subcube Populations After Calculation
Analyze Results
o
o
o
o
o

Functions
Timing Blocks
Iterators
Timings by Entity
Changes to SubCube population due to Rules

6
6. Remediation

2012 Accelatis, LLC

16

Storing Data Techniques


Options for persisting results
1. Write to file
2. Write to database
3. Write to object
4 Hybrid Approach
4.

2012 Accelatis, LLC

17

WriteToFile
Example Calls
1.
2.

Call WriteToFile("Finished CalcRoutine (Entity=" & UCase(HS.Entity.Member) & ").")


(
Line of Code: XXXYYY))
Call WriteToFile(Hit

Sample WriteToFile function


Sub WriteToFile(data)
On Error Resume Next
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso, file
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.OpenTextFile("c:\Temp\RuleRunLog.txt", ForAppending, True)
If (1) Then
Set file = fso.OpenTextFile("\\machine\data\timings.txt", ForAppending, True)
f.WriteLine data & & Now() & " - " & Timer()
f.Close
On Error GoTo 0'
End If
End Sub

*Performance issues result from multiple script engines writing to the


same file
file.

2012 Accelatis, LLC

18

WriteToDatabase
Example Calls
1.
2.

Call WriteToDatabase("Finished CalcRoutine (Entity=" & UCase(HS.Entity.Member) & ").")


(
Line of Code: XXXYYY))
Call WriteToDatabase(Hit

Sample WriteToDatabase function


WriteToDatabase(data)
Dim conn, strSQLQuery, rs
Const adOpenDynamic = 2, adLockPessimistic = 2, adCmdText = 1
Set conn = Server.CreateObject("ADODB.Connection")
conn.open connectionString
strSQLQuery = "INSERT INTO tablename (FieldName1, FieldName2) VALUES (data, Value2)"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQLQuery, conn, adOpenDynamic, adLockPessimistic, adCmdText
conn.close
set conn = Nothing
End Sub

*Be aware that the time to write the data to the database will affect overall
lid ti titime and
d ultimately
lti t l accuracy off titiming
i proportions.
ti
consolidation
2012 Accelatis, LLC

19

WriteToObject
Example Calls
1.
2.

Call WriteToObject("Finished CalcRoutine (Entity=" & UCase(HS.Entity.Member) & ").")


j (
Line of Code: XXXYYY))
Call WriteToObject(Hit

Sample WriteToObject function


WriteToObject(data)
Dim objHelper
Set objHelper = CreateObject(PROGID)
Call objHelper.AddSample(data)
Set objHelper = Nothing
End Sub

*Recommend performing the actual write activities in a thread so as


to limit the interruption to the consolidation process.

2012 Accelatis, LLC

20

Tracking Time
1. Adding timers to beginning and end of functions
2. Adding timers to blocks of code
3. Adding Iterators capturing lines of code called

2012 Accelatis, LLC

21

Timers
1. How to capture time spent

Add timers
ti
to
t beginning
b i i
and
d end
d off functions
f
ti

Sub Calculate()
'Accelatis Instrumentation
Dim AccRules, accStartTime, accEndTime, accFunctionTrace
accFunctionTrace = "Calculate"
Calculate
Set AccRules=CreateObject("AccHFMRulesProfiling.RulesProfiling_Class")
accStartTime = AccRules.GetCurrentTime()
Call StandardCalculations (accFunctionTrace)
Call CalculateNetIncomeVarianceToPlan (accFunctionTrace)
Call ValidateVarianceCommentary (accFunctionTrace)
Call ValidateMiscExpenseDetail (accFunctionTrace)
Call ValidateFixedAssetDetail (accFunctionTrace)
Call ValidateBalancedBalanceSheet (accFunctionTrace)
Call ValidateFlashInput (accFunctionTrace)
Call CalculateCashFlow (accFunctionTrace)
'Accelatis Instrumentation
accEndTime = AccRules.GetCurrentTime()
Call AccRules.AddSample("Calculate",accFunctionTrace,, HS.Scenario.ID, HS.Scenario.Member, HS.Year.ID, HS.Year.Member, HS.Period.ID,
HS Period Member HS.Entity.ID,
HS.Period.Member,
HS Entity ID HS.Entity.Member,
HS Entity Member HS.Parent.ID,
HS Parent ID HS.Parent.Member,
HS Parent Member HS.Value.ID,
HS Value ID HS.Value.Member,
HS Value Member accStartTime,
accStartTime accEndTime)
End Sub

2012 Accelatis, LLC

22

Capturing Function Stack


Custom functions called by multiple higher level
functions
BEFORE
Sub Calculate()
(
)
Call CustomFunction(Parameters)
End Sub

AFTER
Sub Calculate()
(
, Calculate))
Call CustomFunction(Parameters,
End Sub

Sub Translate()
Call CustomFunction(Parameters)
End Sub

Sub Translate()
Call CustomFunction(Parameters, Translate)
End Sub

Sub CustomFunction(parameters)
Do Stuff
Call WriteToFile(CustomFunction, parameters)
End Sub

Sub CustomFunction(parameters, functionStack)


Do Stuff
Call WriteToFile(CustomFunction, parameters, functionStack)
End Sub

2012 Accelatis, LLC

23

Capturing POV
HS.<DIMENSION>.ID
and
HS.<DIMENSION>.Member
Example Usage
Call WriteToObject("Finished
j (
CalcRoutine ((Entity="
y & UCase(HS.Entity.Member)
(
y
) & ").)
) )

2012 Accelatis, LLC

24

Putting it Together
Sub HelperFunction(accFunctionTrace)
'Accelatis Instrumentation
Dim AccRules, accStartTime, accEndTime, accFunctionTrace
accFunctionTrace = accFunctionTrace & HelperFunction
Set AccRules=CreateObject("AccHFMRulesProfiling.RulesProfiling_Class")
accStartTime = AccRules.GetCurrentTime()
Call OtherFunction1(accFunctionTrace)
Call OtherFunction2(accFunctionTrace)
If (test = TRUE)
'Accelatis Instrumentation
Call AccRules.AddLineCounter(lineCountIDDefinedSomeplace, HelperFunction, lineNumber)
Call DoOneThing(accFunctionTrace)
Else
Call DoAnotherThing(accFunctionTrace)
End If
Call OtherFunction3(accFunctionTrace)
'Accelatis Instrumentation
accEndTime = AccRules.GetCurrentTime()
Call AccRules.AddSample(HelperFunction, accFunctionTrace, HS.Scenario.ID, HS.Scenario.Member, HS.Year.ID,
HS.Year.Member, HS.Period.ID, HS.Period.Member, HS.Entity.ID, HS.Entity.Member, HS.Parent.ID,
HS.Parent.Member,, HS.Value.ID,, HS.Value.Member,, accStartTime,, accEndTime))
End Sub
2012 Accelatis, LLC

25

Capturing Subcube Populations


select lEntity, lValue, COUNT (*) FROM <CURRENCY_TABLE>
group by lEntity, lValue
Entity
5
5

Value
10
11

NumRecords
72
34

select lEntity, lParent, lValue, COUNT (*) FROM <NODE_TABLE>


group
g
p by
y lEntity,
y lParent, lValue
Entity
5
5

Parent
8
8

Value
10
11

NumRecords
72
34

Need to convert IDs to Metadata Labels


Need to compare Before and After Consolidation

2012 Accelatis, LLC

26

Gotchas
1. Multiple VBScript engines
Do not use global variables as counters
Total time calculated may be more than actual elapsed time
due to multiple threads
2. Performance Impact of Instrumentation
If tracking function time, write data outside of timings
If using
g Objects,
j
make calls asynchronous
y
so writing
g of data
happens in queue on background thread. Do not create thread
for every call!
3. Eliminate unnecessary calls to routines from global scope. This
can greatly increase load time and application startup time

2012 Accelatis, LLC

27

Gotchas (cont)
4. Writing to file from multiple VBScript engines is dangerous.
Each instance may block access to the file and cause
deadlocks as well as major performance issues.
Doing so effectively forces HFM Consolidation into single
threaded operation.
5. Resolution of timing using the Timer function in VBScript is >=
15ms. Using this built-in
built in timing function can amplify timing
calculation errors over many iterations.

2012 Accelatis, LLC

28

Analyzing Results
Manual Options
1.
2.

Import files into Excel and plot


Read data from database and plot in Excel or other SQL based
report writer

High Level Formulas (dependant on how data is written


and reporting tool)
1.
2.
3.
4.

For Function Count, Filter by FunctionName and COUNT total rows

Optionally include StackTrace in filter to narrow down code path


For Function Timing, Filter by FunctionName and SUM Duration by
Function/Entity/StackTrace
y
For Line Counts, Filter by LineCounterID and COUNT total rows
For Timing Blocks, Filter by TimingBlockID and SUM Duration on all rows

2012 Accelatis, LLC

29

Accelatis Rules Profiler


Analysis: Graphical review of results
Function
breakdown

Overall Inclusive
Function Time
Most Time
Consuming Inclusive
Functions
Overall Exclusive
Function Time
Most Time
Consuming Exclusive
Functions
Function Call
Frequency
Most Frequently
Called Functions

30

Accelatis Rules Profiler


Analysis: Graphical review of results

Timing Block times (Inclusive, Longest, Shortest, Frequency)

31

Accelatis Rules Profiler


Analysis: Graphical review of results

Iterator frequency

32

Accelatis Rules Profiler


Analysis: Graphical review of results

View time by Entity, Value and Rules Function (to pinpoint bottlenecks)

33

Upcoming Webinars
Top Notch Oracle EPM Performance: Load Testing and User Simulation
On Tuesday April 10, we will cover the primary aspects of meaningful load testing and
user simulation, including:
Essbase, Planning, HFM, and all associated products
4 phases Design, Validation, Execution and Analysis
Single and Multi-User Performance, Concurrency and Longevity
Test
Test Execution monitoring,
monitoring test-refinement
test refinement
Analysis identifying bottlenecks and remediation

Making
g Oracle EPM Run More Smoothly:
y The APM Proficiency
y Model
On Tuesday May 8th, we will discuss mastering the black art of Oracle EPM
Application Performance Management. We will cover:
Better system performance
Less guesswork when troubleshooting issues
Providing
P idi fi
firstt class
l
user experiences
i
Reducing risk during critical, high use periods
Collaborate between departments effectively

To register
register, or to view past sessions
sessions, go to:
http://www.accelatis.com/webinars-hyperion
2012 Accelatis, LLC

34

Questions?

Jonathan Berry
President & CEO
jberry@accelatis.com
203
331 2267
203.331.2267

Ed DeLise
VP Sales & Marketing, Principal
edelise@accelatis.com
678
296 3611
678.296.3611

2012 Accelatis, LLC

35

How Accelatis Works


Transition Slide

36

HFM Rules Profiling


Profile Rules with little effort
Create profile packages that include instrumentation rules and consolidation profiles
Profiler will automatically capture all function timings and distinguish top-level
top level and
custom calls (inclusive and exclusive function timings)

37

HFM Rules Profiling


Timing Blocks and Iterators
Timing blocks can be set to any block of code to collect timings
Function Line Iterators will count how many times a line of code is hit

38

HFM Rules Profiling


Compare to Original Rules Code (Extract instrumented Rules to RLE file an option)

39

HFM Rules Profiling


Automated Execution Steps:
1.
2.
3.
4.
5.
6.

Take snapshot of subcube populations


Extract original rules
Load instrumented rules
Run consolidation
Take post-snapshot of subcube population
Reload original rules

40

HFM Rules Profiling


Analysis: Graphical review of results
Function
breakdown

Overall Inclusive
Function Time
Most Time
Consuming Inclusive
Functions
Overall Exclusive
Function Time
Most Time
Consuming Exclusive
Functions
Function Call
Frequency
Most Frequently
Called Functions

41

HFM Rules Profiling


Analysis: Graphical review of results

Timing Block times (Inclusive, Longest, Shortest, Frequency)

42

HFM Rules Profiling


Analysis: Graphical review of results

Iterator frequency

43

HFM Rules Profiling


Analysis: Graphical review of results

View time by Entity, Value and Rules Function (to pinpoint bottlenecks)

44

HFM Rules Profiling


Analysis: Graphical review of results

View SubCubes with largest data Increases due to Rules


*In this example there is no data change

45

Você também pode gostar