Page 1 of 1

Can I totalise memory used by Dimensions via TI?

Posted: Mon Jun 27, 2016 10:43 am
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.

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

Posted: Tue Jun 28, 2016 9:30 pm
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

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

Posted: Wed Jun 29, 2016 6:58 am
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.

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

Posted: Wed Jun 29, 2016 7:22 am
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.

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

Posted: Wed Jun 29, 2016 7:28 am
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.

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

Posted: Wed Jun 29, 2016 1:12 pm
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. ;)

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

Posted: Wed Jun 29, 2016 2:33 pm
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.

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

Posted: Mon Jul 04, 2016 2:40 pm
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).

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

Posted: Wed Jul 06, 2016 9:55 pm
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()