Can I totalise memory used by Dimensions via TI?

Post Reply
User avatar
Hippogriff
Posts: 48
Joined: Thu Nov 19, 2015 4:02 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2012

Can I totalise memory used by Dimensions via TI?

Post by Hippogriff »

I am enjoying doing a bit of digging into the 'innards' using TI.

I know that I can get a list of all Dimensions in a Model by using GO_New_Stores:}Dimensions->All as a data source, I then get a Variable of Contents Other which will have the Dimension name that I can cycle through in the Data tab.

I can use DIMSIZ to get the number of Elements in a Dimension. I can also use a while loop and DIMNM to get the name of each Element - that's all good. I have that running and outputting stuff like:

Code: Select all

6980   [2]   INFO   2016-06-27 10:30:50.685   TM1.Process   Process "!Cycle_Dimensions" executed by user "Admin"
6980   [2]   INFO   2016-06-27 10:30:50.687   TM1.TILogOutput   Dimension Name = Asset Type
6980   [2]   INFO   2016-06-27 10:30:50.687   TM1.TILogOutput     DimSiz = 2
6980   [2]   INFO   2016-06-27 10:30:50.687   TM1.TILogOutput     Element 1 = Freehold
6980   [2]   INFO   2016-06-27 10:30:50.687   TM1.TILogOutput     Element 2 = Leasehold
6980   [2]   INFO   2016-06-27 10:30:50.687   TM1.TILogOutput   Dimension Name = Assumptions
6980   [2]   INFO   2016-06-27 10:30:50.687   TM1.TILogOutput     DimSiz = 5
6980   [2]   INFO   2016-06-27 10:30:50.687   TM1.TILogOutput     Element 1 = Average Monthly Revenue
6980   [2]   INFO   2016-06-27 10:30:50.687   TM1.TILogOutput     Element 2 = Opening Cost P&L
6980   [2]   INFO   2016-06-27 10:30:50.687   TM1.TILogOutput     Element 3 = Opening Cost Capital
6980   [2]   INFO   2016-06-27 10:30:50.687   TM1.TILogOutput     Element 4 = GROSS MARGIN %
6980   [2]   INFO   2016-06-27 10:30:50.687   TM1.TILogOutput     Element 5 = GMWA
What I'd really like to do is access the information you can see in Architect when you click on the Dimensions Node and you see the list of Dimensions and each one has a Memory Used column - so GO_New_Stores Asset Type is 17KB and Assumptions is 26KB... I'd like to total these up in my TI and LogOutput the fact that all Dimensions used XX of memory.

So... the crux of my question... can I get the memory size of a Dimension via TI?

Please bear in mind, I'm only tinkering here - I don't need this to do my job today... it's not urgent, but I'm always grateful if anyone can provide me with some insight.
--
Cheers, Hippo
User avatar
paulsimon
MVP
Posts: 808
Joined: Sat Sep 03, 2011 11:10 pm
OLAP Product: TM1
Version: PA 2.0.5
Excel Version: 2016
Contact:

Re: Can I totalise memory used by Dimensions via TI?

Post by paulsimon »

Hi

Sorry, I don't know the answer. There is possibly something in the API, but it is not something that I have ever been concerned about. I would question why you would want to do this? The total memory used by a TM1 Server is more likely to be driven by the largest cubes than the largest dimensions. You can still get the memory used by dimensions via Perspectives. Why do you need to get that programatically?

If you have memory issues then look at your largest cubes. See if you can get memory down by re-ordering dimensions. Look at whether you are keeping unnecessary historic data. I have routines that allow this to be written out to files and pulled back in only if necessary. Check rules for over-feeding. Is the design duplicating the same data in more than one cube, etc. These are probably the areas that you want to focus on rather than dimension size.

Regards

Paul Simon
User avatar
Hippogriff
Posts: 48
Joined: Thu Nov 19, 2015 4:02 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2012

Re: Can I totalise memory used by Dimensions via TI?

Post by Hippogriff »

Hi,

Hopefully I did outline the fact that this wasn't considered something urgent to do my job, or anything like that? It's true. I had just wanted to investigate how you might do this. Why I might want to do this is really to understand the product better - I chose Dimensions, but I certainly could've chosen Cubes - my question is whether there's a way to get at the figures shown in Architect via TI. It seems strange, to me, to show a list of 'things' with a Memory Used attribute, but no total for that list of 'things'.

But, then, so many things about this product suite seem strange to me.

I'm guessing the answer on this one is going to end up being a "no"... otherwise someone would've replied by now, giving some insight or mooting some ideas.

There's no requirement, at this time :D , to be looking at the systems I work with in regards to memory... it was an academic question only.
--
Cheers, Hippo
Wim Gielis
MVP
Posts: 3229
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Can I totalise memory used by Dimensions via TI?

Post by Wim Gielis »

Hippogriff wrote:I chose Dimensions, but I certainly could've chosen Cubes - my question is whether there's a way to get at the figures shown in Architect via TI
For cubes, check out the internal }Stats cubes in TM1 with Performance Monitor turned on.
For dimensions, it does not exist, and would not interest me, frankly.
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
User avatar
Hippogriff
Posts: 48
Joined: Thu Nov 19, 2015 4:02 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2012

Re: Can I totalise memory used by Dimensions via TI?

Post by Hippogriff »

Sure, I already know about those... but it was a TI way that I was looking for / wondering if it existed. I did validate that the numbers reported by the }Stats Cube for Cubes and those reported in Architect at least match... ;) ...it would not have surprised me if they didn't.
--
Cheers, Hippo
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: Can I totalise memory used by Dimensions via TI?

Post by tomok »

Hippogriff wrote:but it was a TI way that I was looking for
CellGetS against the }Stats cube and then ASCIIOutPut the values. Sounds pretty TI to me. ;)
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
lotsaram
MVP
Posts: 3701
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Can I totalise memory used by Dimensions via TI?

Post by lotsaram »

Hippogriff wrote:Hi,

Hopefully I did outline the fact that this wasn't considered something urgent to do my job, or anything like that? It's true. I had just wanted to investigate how you might do this. Why I might want to do this is really to understand the product better - I chose Dimensions, but I certainly could've chosen Cubes - my question is whether there's a way to get at the figures shown in Architect via TI. It seems strange, to me, to show a list of 'things' with a Memory Used attribute, but no total for that list of 'things'.

But, then, so many things about this product suite seem strange to me.

I'm guessing the answer on this one is going to end up being a "no"... otherwise someone would've replied by now, giving some insight or mooting some ideas.

There's no requirement, at this time :D , to be looking at the systems I work with in regards to memory... it was an academic question only.
There is certainly a way to get dimension memory via API call as this is what the Architect client is doing. But no there is no way to get this information with a TI function. Cubes is easy but for whatever reason there is no stats cube for dimensions.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
User avatar
Hippogriff
Posts: 48
Joined: Thu Nov 19, 2015 4:02 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2012

Re: Can I totalise memory used by Dimensions via TI?

Post by Hippogriff »

Got it. I set it up using Java...

Code: Select all

for (int iDimIndex = 1; iDimIndex < lTM1Server.getDimensionCount().getInt(); iDimIndex++)
{
  lTM1Dim = lTM1Server.getDimension (iDimIndex);
   
  System.out.println ("Dimension Name: " + lTM1Dim.getProperty (TM1Properties.ObjectName).getString());
  System.out.println ("Size (KB): " + String.format ("%,d",lTM1Dim.getProperty (TM1Properties.ObjectMemoryUsed).getInt()));
  iKBTot = iKBTot + lTM1Dim.getProperty (TM1Properties.ObjectMemoryUsed).getInt();
}
Right tool for the job (whatever the job may be).
--
Cheers, Hippo
jwilkins
Posts: 18
Joined: Wed Sep 30, 2015 12:40 pm
OLAP Product: TM1
Version: 9.5.2+
Excel Version: 2007

Re: Can I totalise memory used by Dimensions via TI?

Post by jwilkins »

Hippogriff wrote:Got it. I set it up using Java...

Code: Select all

for (int iDimIndex = 1; iDimIndex < lTM1Server.getDimensionCount().getInt(); iDimIndex++)
{
  lTM1Dim = lTM1Server.getDimension (iDimIndex);
   
  System.out.println ("Dimension Name: " + lTM1Dim.getProperty (TM1Properties.ObjectName).getString());
  System.out.println ("Size (KB): " + String.format ("%,d",lTM1Dim.getProperty (TM1Properties.ObjectMemoryUsed).getInt()));
  iKBTot = iKBTot + lTM1Dim.getProperty (TM1Properties.ObjectMemoryUsed).getInt();
}
Right tool for the job (whatever the job may be).
I think you're missing the last dimension on the server. The for loop conditional should be

Code: Select all

 iDimIndex <= lTM1Server.getDimensionCount().getInt()
Emily Wilkins - Software Engineer
Motio, Inc.
Post Reply