Clearing Out Rules during Run Time

Post Reply
BariAbdul
Regular Participant
Posts: 424
Joined: Sat Mar 10, 2012 1:03 pm
OLAP Product: IBM TM1, Planning Analytics, P
Version: PAW 2.0.8
Excel Version: 2019

Clearing Out Rules during Run Time

Post by BariAbdul »

Hi David,Could you please expand on it on the below part:
http://www.tm1forum.com/viewtopic.php?f=3&t=6764
Re: Clearing Out Rules during Run Time

Postby David Usherwood » Thu Jan 12, 2012 11:42 am
I use a somewhat different approach to get the same result. I load my data into a measure which does not fire feeders, then copy it across to the fed area in batches. The load runs quickly and I can control the amount I copy, the time it takes and the size the server grows to. (If I loaded all the data across and fully calculated the model the TM1 server would blow my 400gig physical server :) )

David Usherwood
Site Admin

Posts: 1102
Joined: Wed May 28, 2008 9:09 am
Thanks in advance.
"You Never Fail Until You Stop Trying......"
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: Clearing Out Rules during Run Time

Post by David Usherwood »

I'll try.
The application forecasts the 'development' of insurance policies in force over time ie cancellations, claims, earnings, URR, blah blah. A single group of policies generates values till the policy expires which could be 120 months' time. We had many hundreds of thousands of policy groups.
Originally, when we loaded in the data, feeders would fire right through the model (of course), and thus load time and server size would rise to unworkable levels.
To address this we added an element into the (spare) 'Measure' dimension and called it 'Loaded' and adjusted the feeders to specify the (existing) 'Value' element. We would then load the data into 'Loaded' and the feeders would not fire.
To process the content, we built a set of routines which copied controlled subsets of the data from 'Loaded' to 'Value'. This would fire the feeders and thus activate the calculations but only for that data subset. We then froze the results of the calculations into a static cube. When this finished, we cleared the 'Value' content and restarted the server.
This enabled us to process the content in manageable subsets. Processing everything at once blew the 1/2 terabyte of RAM we had on the server.
HTH
BrianL
MVP
Posts: 264
Joined: Mon Nov 03, 2014 8:23 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2 PA2
Excel Version: 2016

Re: Clearing Out Rules during Run Time

Post by BrianL »

What's the benefit of doing this instead of just doing the calculations in TI? Seems that would be both simpler and more efficient.
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: Clearing Out Rules during Run Time

Post by jim wood »

BrianL wrote:What's the benefit of doing this instead of just doing the calculations in TI? Seems that would be both simpler and more efficient.
If you want to follow the Essbase calc once model then may be. What I can't tell form the post is that some of the calculation might be needed for on the fly planning, rather just for a one off.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: Clearing Out Rules during Run Time

Post by David Usherwood »

Apologies, I didn't mention in this thread (but have in earlier threads) that the rules file for this model is forty-three pages long. Not, I would suggest, suitable for TI.
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: Clearing Out Rules during Run Time

Post by jim wood »

43 pages long!!! Blimey. Did you hot any rule length limits? If memory serves it was extended a few years back.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
pandinus
Posts: 78
Joined: Tue Mar 18, 2014 8:02 am
OLAP Product: TM1, Cognos Express
Version: 10.2.2
Excel Version: 2013

Re: Clearing Out Rules during Run Time

Post by pandinus »

It lookt like your model has grown into this current situation.
If you were to rebuild this model however, would you consider using TI to perform and store the calculations instead of your current setup? After all, your rules were also non-existant at one point...
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: Clearing Out Rules during Run Time

Post by David Usherwood »

Not the case.
The rules were created for a single project to meet the (admittedly complex) business requirements. Using TI for such complex calculations would be a very (very) bad idea.
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: Clearing Out Rules during Run Time

Post by jim wood »

David,

I've noticed a big move away from rules over the last few years. People seem to think they are bad idea and do everything in TI. I don't know why. After all it's the real time rules calculation engine that is it's chief selling point. I can only it's one of 2 things: 1) People don't how to feed properly or 2) people don't know how to feed properly,

Jim.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
BariAbdul
Regular Participant
Posts: 424
Joined: Sat Mar 10, 2012 1:03 pm
OLAP Product: IBM TM1, Planning Analytics, P
Version: PAW 2.0.8
Excel Version: 2019

Re: Clearing Out Rules during Run Time

Post by BariAbdul »

Thanks a lot David for detail explanation and Jim and all making it quite informative. :D
"You Never Fail Until You Stop Trying......"
lotsaram
MVP
Posts: 3705
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Clearing Out Rules during Run Time

Post by lotsaram »

jim wood wrote:David,

I've noticed a big move away from rules over the last few years. People seem to think they are bad idea and do everything in TI. I don't know why. After all it's the real time rules calculation engine that is it's chief selling point. I can only it's one of 2 things: 1) People don't how to feed properly or 2) people don't know how to feed properly,

Jim.
I don't think this is a "new" thing at all. There have always been people doing TM1 implementations (TM1 consultants included) who can't quite get their heads around multi-dimensionality, especially multi-dimensional rules and therefore prefer direct TI input over rules. As TM1 has expanded rapidly over the last few years and drawn in people working in TM1 projects from more traditional IT fields who are more used to procedural programming and unfamiliar with multi-dimensional expressions the balance has shifted and the "do everything in TI" approach has certainly become more common.

Still you do also see "over-rulled" applications which suffer poor performance due to long dependant chains of calculations and things being calculated in rules that don't need to be (or in the case of historical values that are never going to change, outright shouldn't be) rule calculated.

I think that using TI in place of rules can sometimes be quite legitimate, especially with 64 bit servers with 100s of GB of RAM. Pure input data gives much better performance vs. rule values. We're not back in the naughties anymore trying to do everything possible to keep the server under a 2GB or 3GB limit.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: Clearing Out Rules during Run Time

Post by jim wood »

lotsaram wrote:I don't think this is a "new" thing at all. There have always been people doing TM1 implementations (TM1 consultants included) who can't quite get their heads around multi-dimensionality, especially multi-dimensional rules and therefore prefer direct TI input over rules. As TM1 has expanded rapidly over the last few years and drawn in people working in TM1 projects from more traditional IT fields who are more used to procedural programming and unfamiliar with multi-dimensional expressions the balance has shifted and the "do everything in TI" approach has certainly become more common.
Agreed. I've always worked pretty much on my own over years I guess for me it's more about exposure, hence the "last few years bit".
lotsaram wrote: Still you do also see "over-rulled" applications which suffer poor performance due to long dependant chains of calculations and things being calculated in rules that don't need to be (or in the case of historical values that are never going to change, outright shouldn't be) rule calculated.
The balance can differ greatly depending on your point of view. I've always leaned more towards rules due to experience.
lotsaram wrote: I think that using TI in place of rules can sometimes be quite legitimate, especially with 64 bit servers with 100s of GB of RAM. Pure input data gives much better performance vs. rule values. We're not back in the naughties anymore trying to do everything possible to keep the server under a 2GB or 3GB limit.
Again agreed. The key to any TM1 implementation is getting the balance right. As I said above I've always leaned towards rules but they do have their limits. I would say however that just writing rules of is dangerous. TM1 is after all sold as a real time planning application, which of course stems from rules.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: Clearing Out Rules during Run Time

Post by David Usherwood »

Pretty much what we did - rules do the complex calculations, then TI freezes the results (at a somewhat consolidated level) to static cubes where the only rules are (or should be) 'KPI' rules which apply at all levels - which you can't do with TI.
The special sauce here was doing it in stages to manage memory usage.
Personally I don't mind if our competitors overuse TI for calculations as it gives us an opportunity to come in later and sort out the mess.
But if IBM was able to provide decent debugging functionality things might be different. They do tout that with the server-side Java capability in 10.2.2 but really that's not a solution unless you want to migrate all your logic to Java.
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Clearing Out Rules during Run Time

Post by tomok »

i think one of the reasons you see the push towards TI is because that's the official stance of IBM, at least their consulting group. I have been involved in several projects where IBM came in to "review" my work and the first thing they advised was to move all the calculations to TI to increase performance. I think it's on their checklist. They don't want any rules so that the customers won't call to complain about poorly performing cubes, regardless of whether it makes business sense.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: Clearing Out Rules during Run Time

Post by David Usherwood »

i think one of the reasons you see the push towards TI is because that's the official stance of IBM, at least their consulting group. I have been involved in several projects where IBM came in to "review" my work and the first thing they advised was to move all the calculations to TI to increase performance. I think it's on their checklist. They don't want any rules so that the customers won't call to complain about poorly performing cubes, regardless of whether it makes business sense.
Would that be Global Services? I've certainly heard tell of some very poor systems they have built. Sounds like lots more opportunities to sort out cr@p implementations.
I'd love to hear what your response was to their suggestion....
What's your view about the 'hybrid' approach - rules + freeze?
User avatar
Steve Rowe
Site Admin
Posts: 2464
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: Clearing Out Rules during Run Time

Post by Steve Rowe »

Doesn't the rules versus TI debate also involve scale as well?

If we you take something simple like a currency translation, pretty hard to get wrong and on a small scale works at an acceptable speed. What about when each period has in excess of a million data points per month?

Done in the traditional N level rule approach this is pretty soggy.

Also pre-MTQ rules are single threaded where as TI is not.

Cheers,
Technical Director
www.infocat.co.uk
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: Clearing Out Rules during Run Time

Post by jim wood »

I've heard stories about the IBM implementation team and they're not good. They're probably pushing a TI approach as it's easier for them. After all internally they don't encourage specialist roles. I went for interview there. When I got to the technical interview the guy starts asking me about EDWs. I tried to answer some questions then I pointed out that EDWs are not mentioned on my CV anywhere and wondered why I was being asked about them. I was told that all of their consultants have to have a broad product base. I read this as 2 things:

1) They don't know their own product

2) He didn't know TM1 either and asked me EDW questions as that's all he knew

Now if he was right it means that IBM consultants are "Jack of all trades masters of non" which kind of explains the TI approach,

Jim.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: Clearing Out Rules during Run Time

Post by David Usherwood »

If we you take something simple like a currency translation, pretty hard to get wrong and on a small scale works at an acceptable speed. What about when each period has in excess of a million data points per month?
Done in the traditional N level rule approach this is pretty soggy.
Also pre-MTQ rules are single threaded where as TI is not.
If the calculation is that far up the low end of the simple...complex spectrum, yes, TI is probably the right approach for your million data points.
I'm interested, though, in your approach to multithreading TI. I'm thinking you would have to build a fair amount of code to multithread - a single TI will (surely?) singlethread.
Duncan P
MVP
Posts: 600
Joined: Wed Aug 17, 2011 1:19 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2
Excel Version: 2003 2007
Location: York, UK

Re: Clearing Out Rules during Run Time

Post by Duncan P »

A single TI will definitely single-thread, and furthermore if you kick off a number concurrently then any calculations that they do will be held in caches local to the TI threads, and only shared globally when each TI commits.

This was also a characteristic of early MTQ which is why in some cases it did not achieve all of the expected performance gains. I don't know if they have got round this or not.
Post Reply