TM1 Memory Allocation

Post Reply
User avatar
mce
Community Contributor
Posts: 352
Joined: Tue Jul 20, 2010 5:01 pm
OLAP Product: Cognos TM1
Version: Planning Analytics Local 2.0.x
Excel Version: 2013 2016
Location: Istanbul, Turkey

TM1 Memory Allocation

Post by mce »

Hi,

I think I did not properly understood how TM1 loads cubes and calculations to memmory.
When the TM1 service is started my cubes are loaded to memory. Then when I browse some views it takes some time to calculate those views, during which memory consumption doubles for those cubes.
Then it becomes much quicker to browse the same views as they are already calculated and they are in memory.
But after some time, the memory consumption of those cubes returns back to the original, as it was when first loaded in service restart. At this time, it takes again a lot of time to calculate those views as they were not kept in memory.

Somehow TM1 releases the data that it calculated after some time even if there was no change in the underlying data cells. This makes it slower to browse. I want TM1 to keep all cells that it calculated in memory for fast delivery when querying in views.

I found config parameter CalculationThresholdForStorage and set it to 5 (default is 50) and even in that case this did not deliver the required behaviour.
As I am new in TM1, could you clarify this to me?

Regards,
kpk
MVP
Posts: 214
Joined: Tue Nov 11, 2008 11:57 pm
OLAP Product: TM1, CX
Version: TM1 7x 8x 9x 10x CX 9.5 10.1
Excel Version: XP 2003 2007 2010
Location: Hungary

Re: TM1 Memory Allocation

Post by kpk »

Hello,
You can play with the VMM and VMT parameters.
Kind Regrads,
Peter

About Stargate Views
A Stargate view is a calculated and stored subsection of a TM1® cube that TM1 creates when you
browse a cube with the Cube Viewer or In-Spreadsheet Browser. The purpose of a Stargate view is
to allow quicker access to the cube data.
A Stargate view is different from a TM1 view object. The Stargate view contains only the data for
a defined section of a cube, and does not contain the formatting information and browser settings
that are in a view object.
A Stargate view that TM1 creates when you browse a cube in the Cube Viewer or In-Spreadsheet
Browser contains only the data defined by the current title elements and row and column subsets.
TM1 stores a Stargate view when you access a view that takes longer to retrieve than the threshold
defined by the VMT property in the }CubeProperties control cube. (If a VMT value is not explicitly
defined, a Stargate view is generated when a view takes longer than five seconds. This is the default
threshold when VMT is not specified in the }CubeProperties control cube.)
A Stargate view persists in memory only as long as the browser view from which it originates
remains unchanged. When you recalculate the browser view, TM1 creates a new Stargate view
based on the recalculated view and replaces the existing Stargate view in memory. When you close
the browser view, TM1 removes the Stargate view from memory.

VMM
For each cube, this property determines the amount of RAM reserved
on the server for the storage of stargate views. The more memory made
available for stargate views, the better performance will be. You must,
however, make sure sufficient memory is available for the TM1 server
to load all cubes.
If noVMMvalue is specified the default value is 65,536 bytes. The valid
range is 16,384 - 4,2934,943,296 bytes.

VMT
For each cube, this property defines the time threshold, in seconds,
beyond which the algorithm that stores TM1 stargate views is triggered.
If the time required to calculate a cube view surpasses the specified
threshold, TM1 attempts to store a stargate view. If there is not enough
memory available to store the stargate view, TM1 purges the oldest
stargate view that is not currently in use, and continues to purge views
in this manner until sufficient memory is made available.
If no VMM value is specified the default value is five seconds. The valid
range is 1 - 259,200 seconds.
For details on stargate views, see About Startgate Views.
Last edited by kpk on Mon Aug 16, 2010 3:28 pm, edited 2 times in total.
Best Regards,
Peter
User avatar
mce
Community Contributor
Posts: 352
Joined: Tue Jul 20, 2010 5:01 pm
OLAP Product: Cognos TM1
Version: Planning Analytics Local 2.0.x
Excel Version: 2013 2016
Location: Istanbul, Turkey

Re: TM1 Memory Allocation

Post by mce »

I already set a high number for VMM, and left the VMT as default (5 sec). This did not help.
The documentation says that "When you close the browser view, TM1 removes the Stargate view from memory.". This explains why such stargate views are not persistent, and why it releases the calculated cells from memmory after some time. However my understanding of TM1 memory allation was that it calculates when first requested and then keeps it in memory for faster delivery for the rest of the TM1 server session unless underlying data changes. Is my understanding wrong then?
lotsaram
MVP
Posts: 3703
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: TM1 Memory Allocation

Post by lotsaram »

kpk wrote: For each cube, this property defines the time threshold, in seconds,
beyond which the algorithm that stores TM1 stargate views is triggered.
Just to clarify Peter's post this section above refers to VMT and not VMM.

Also in case other people are wondering VMT and VMM are not configuration file settings they are values in the }CubeProperties cube.

The Stargate view cache for each cube is persistent. It gets cleared when there is any data change to the cube or any data change in any cube that the cube is in turn dependent on (cube dependencies are set by rules and feeders). (Therefore for example changing an attribute or control cube value could clear the cache, not just writing to the cube in question.) Otherwise cached views are thrown out oldest first when the VMM threshold is reached.

Make sure VMM is high enough and check to make sure other data changes are not clearing the cache.
kpk
MVP
Posts: 214
Joined: Tue Nov 11, 2008 11:57 pm
OLAP Product: TM1, CX
Version: TM1 7x 8x 9x 10x CX 9.5 10.1
Excel Version: XP 2003 2007 2010
Location: Hungary

Re: TM1 Memory Allocation

Post by kpk »

lotsaram wrote:
kpk wrote: For each cube, this property defines the time threshold, in seconds,
beyond which the algorithm that stores TM1 stargate views is triggered.
Just to clarify Peter's post this section above refers to VMT and not VMM.
You're right.
I have only copied that descriptions from the 9.5.1 op.guide PDF but it seems that
the conversion of the table into simple text was not completely successful. :(
Best Regards,
Peter
User avatar
mce
Community Contributor
Posts: 352
Joined: Tue Jul 20, 2010 5:01 pm
OLAP Product: Cognos TM1
Version: Planning Analytics Local 2.0.x
Excel Version: 2013 2016
Location: Istanbul, Turkey

Re: TM1 Memory Allocation

Post by mce »

lotsaram wrote:Make sure VMM is high enough and check to make sure other data changes are not clearing the cache.
VMM is high enough and there was no change neither in data nor in attributes, but TM1 still releases calculated cells from memory for the cubes.
abcuser
Posts: 133
Joined: Thu Mar 25, 2010 8:34 am
OLAP Product: Cognos TM1
Version: 9.5.2
Excel Version: 0

Re: TM1 Memory Allocation

Post by abcuser »

mce wrote:VMM is high enough...
Just having performance problems and I would like to know how someone measures what should be the size of VMM parameter?
User avatar
mce
Community Contributor
Posts: 352
Joined: Tue Jul 20, 2010 5:01 pm
OLAP Product: Cognos TM1
Version: Planning Analytics Local 2.0.x
Excel Version: 2013 2016
Location: Istanbul, Turkey

Re: TM1 Memory Allocation

Post by mce »

abcuser wrote:Just having performance problems and I would like to know how someone measures what should be the size of VMM parameter?
If you enable performance monitor, and if you check CubeStats cube, you will see how much memory is used for views. This shows how much memory TM1 cached for views. If it gets close to VMM, then it might be good to increase VMM. Maximum for VMM is something around 4GB per cube. The decision on how big VMM should be depending also on the level of caching that you want TM1 to do for calculated cells, but it is also restricted with the total memory in your server. So you would need to find the best trade off depending on your specific requirements and server capacity. It is also good to remember that TM1 view cache is wiped out when there is any data change in the cube. If your cube is very frequently updated, then you may not be able to utilize VMM to a great degree.
normanbobo
Posts: 50
Joined: Tue Jun 15, 2010 3:14 pm
OLAP Product: TM1, PowerPlay, MSAS
Version: TM1 9.4.x 9.5.x 10.1
Excel Version: 2003 2007 2010

Re: TM1 Memory Allocation

Post by normanbobo »

This is an old conversation, but you may want to check the "LockPagesInMemory=T" setting in the config file.
Post Reply