LEVERAGING STARGATE VIEWS
Improving User Experience through Stargate Views
I.Introduction
IBM Planning Analytics is a wonderful tool to work with if it is managed correctly. Although default settings might be enough to use Planning Analytics applications, there are various approaches by which Planning Analytics’s capabilities could be improved. One such approach is to leverage Stargate Views.
II.What are Stargate Views?
If a PLANNING ANALYTICS cube is densely populated and has lot of rules then chances are cube views associated with it will take longer time to open. To address this issue PLANNING ANALYTICS Stargate views could be leveraged.
Stargate view is calculated and cached view of a PLANNING ANALYTICS cube that is created when you browse a view using cubeviewer. As users browse cubes via cube viewer, these views are cached according to the selected title elements, rows and column. Next time a user requests same view, stargate view is fetched and negates the need for on the fly calculation resulting in markedly better performance. Stargate view contains only the data for defined sections of the cube and does not contain formatting information associated. Size of the stargate cube is directly proportionate to the number of elements on rows and column. So more the number of elements in rows and columns, more the size of the stargate view.
III. Mechanism behind stargate view creation:
To create/store stargate view, PLANNING ANALYTICS provides couple of settings called VMM(View Maximum Memory) and VMT (View Minimum Time).
1. View Maximum Memory(VMM):
This feature determines for each cube the amount of memory available for Views to be cached..The value of VMM is expressed in kilobytes. If no VMM value is specified, the default value is 128 kilobytes.
This parameter could be modified using }CubeProperties cube. The valid range for VMM is 0 – 2,147,483,647 KB. Higher the memory available for VMM, more the number of cached cubes for faster retrieval. The actual upper limit of VMM is determined by the amount of RAM available on your system.
The VMM parameter estimation could be done using Memory Used for View parameter value(in KB) available in }StatsbyCube for each cube. In order view this value make sure you start performance monitor by right clicking on server OR configure PerformanceMonitorOn=T parameter in TM1s.cfg file. Since this parameter is static, services needs restart.
2. VMT (View Minimum Time):
For each cube, this property defines the time threshold, in seconds, beyond which the algorithm that stores PLANNING ANALYTICS stargate views is triggered. PLANNING ANALYTICS will attempt to store the stargate view if the time required to calculate a cube view surpasses the specified VMT value.
If no VMT is specified the default value is 5 seconds. This parameter could be modified for each cube using }CubeProprties cube available in control objects. The valid range is 1 – 259,200 seconds.
IV. When will the Stargate Views be created?
When both criteria, VMT and VMM are met PLANNING ANALYTICS will store the stargate view. So when VMM specified is greater that memory required to calculate view and time taken to calculate view is more than VMT specified then the view will be cached. If the there is not enough memory available to store stargate view, PLANNING ANALYTICS removes oldest stargate view and stores the latest view.
Although this approach is not recommended, if you set VMT as 0 and enough VMM is available then each view will be cached. On the other hand, specifying a high VMT might not cache even a single view.
V. How long do stargate view persists?
- Consider a scenario where VMM is set as 1000 KBs. So when first request for stargate view comes for a view with 500 KB memory, this view will be stored in cache.
Next time a request comes for another view with 400 KB memory again that view will be stored. When another request comes for the third view with 500 KB memory in this case the first view will be removed from cache and third view will be stored.
- Stargate views will be removed when data is updated in the cube or cube it is dependent on.
- Stargate views will be removed when server is restarted or shutdown.
- Stargate views will be removed when cube or cube it is dependent on is unloaded.
- Stargate views will be removed when rule is updated in the cube or dependant cube.
- Stargate views will be removed when dimensions are updated in the cube or dependant cube.
VI. Leveraging the ViewConstruct function:
As we understood that the view once created will remain in the cache until it is invalidated. So overhead will be for first user who accesses the view. Only if we had a mechanism to create and keep that view in cache.
Yes, this could indeed be achieved using TI function called ‘ViewConstruct’. You can take advantage of the ViewConstruct function to prepopulate cached views. For example if you load data in a cube on scheduled basis we can use this function to create and load view using this function assuming that both VMM and VMT conditions are met.
For multiple cubes which are updated on scheduled basis, we can have a chore to execute these processes and pre populate these views in memory.
So in a nutshell Stargate views is a great functionality if used correctly with ViewContruct feature.