Memory bloat issue

Post Reply
iansdigby
Community Contributor
Posts: 109
Joined: Thu Feb 26, 2009 8:44 am
OLAP Product: TM1
Version: 9 + 10 + Plan An
Excel Version: All
Location: Isle of Wight, UK

Memory bloat issue

Post by iansdigby »

I have a weird issue with some memory doubling itself each time a TI process is run. The process builds a dimension with 15,000 elements and 4 attributes. The Dimension attributes are created each time:
ATTRDELETE('BI_LabBk_JobNo','BkType');
ATTRINSERT('BI_LabBk_JobNo','','BkType','S');
ATTRDELETE('BI_LabBk_JobNo','Item');
ATTRINSERT('BI_LabBk_JobNo','','Item','S');
ATTRDELETE('BI_LabBk_JobNo','Costed');
ATTRINSERT('BI_LabBk_JobNo','','Costed','S');
ATTRDELETE('BI_LabBk_JobNo','CompDate');
ATTRINSERT('BI_LabBk_JobNo','','CompDate','S');
The }ElementAttributes cube for this dimension is the problem. Each time the TI process runs (every 1/2 hour), the }ElementAttributes cube doubles in size. As the TM1 service is only re-started every 24 hours, we end up with this cube taking up 1.6 Gb of memory each day.
I assumed it was something to do with re-creating the attributes each time. Can anyone kindly shed any light on this phenomenon please? Has it happened to others?
Many thanks for any help gratefully received.
Ian Digby, Meggitt Avionics.
"the earth is but one country, and mankind its citizens" - Baha'u'llah
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: Memory bloat issue

Post by jim wood »

Do you have any rules / feeders either on this cube or any of the cubes asscociated with this dimension?
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
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: Memory bloat issue

Post by jim wood »

Also do you have many consolidations within this against a large data set?
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
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: Memory bloat issue

Post by tomok »

Why delete and re-create the attributes each time? Why not just delete the elements in the dimension, or better yet, just clear the cube before loading the attributes.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
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: Memory bloat issue

Post by jim wood »

Good point, if you re-create the dimension the attributes are cleared but any data associated with the dimensions isn't lost. I guess that depends on whether you know you have every element in your dimension source to avoid data loass though.

As for clearing the attributes cube I'm not sure whether that will solve the issue the issue if it is rule related? It may result in the need for some comilling??
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
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: Memory bloat issue

Post by rmackenzie »

iansdigby wrote:ATTRDELETE('BI_LabBk_JobNo','BkType');
ATTRINSERT('BI_LabBk_JobNo','','BkType','S');
tomok wrote:Why delete and re-create the attributes each time?
I strongly suspect that the code is generated by the 'Maps' wizard in TI. I guess Ian has set one of his variables to 'Attribute' and populated the dialog rather than code directly into the Prolog. Tomok, I guess you don't use the wizard - if you don't use it for a while, it is easy to forget that it generates a lot of sub-optimal code.

Ian, it is time to refactor your code - my guess is that you are rebuilding the dimension from scratch each time rather than just updating it with new element (products?) and their attributes. At least, I think you can set the attribute action to 'update' rather than 'create'.

Robin
Robin Mackenzie
iansdigby
Community Contributor
Posts: 109
Joined: Thu Feb 26, 2009 8:44 am
OLAP Product: TM1
Version: 9 + 10 + Plan An
Excel Version: All
Location: Isle of Wight, UK

Re: Memory bloat issue

Post by iansdigby »

Thanks to all who took the trouble to post a reply.

Whilst never solving the original problem, I worked around it as follows:

1. In the Proglog code, unload the }ElementAttributes cube using CubeUnload()
2. In the Data code, populate the attributes: TM1 then automatically loads the }ElementAttributes cube back into memory in a clean state.

Many thanks again

Ian
"the earth is but one country, and mankind its citizens" - Baha'u'llah
Post Reply