TM1 Server Host & RAM Usage

Post Reply
wilsonmax
Posts: 34
Joined: Fri Feb 28, 2014 2:21 am
OLAP Product: TM1
Version: 10.1.0
Excel Version: 2010

TM1 Server Host & RAM Usage

Post by wilsonmax »

What is the best practice of monitoring the resources of a TM1 Server Host?

Daily Process, including importing data, calculation and housekeeping, runs everyday.

Observation:
The RAM usage will be increased after the Daily Process, e.g.: 19GB->20GB & 20GB->21GB, etc.
It will be decreased a bit after "Save Data", e.g.: 21GB->20.8GB
However, the increment is quite fast

The existing way to keep the RAM usage at a normal state is to restart the Server, returning to 19GB

May I know, besides restart Server, is there any method to release the RAM after some calculations?
User avatar
Alan Kirk
Site Admin
Posts: 6606
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: TM1 Server Host & RAM Usage

Post by Alan Kirk »

wilsonmax wrote:What is the best practice of monitoring the resources of a TM1 Server Host?

Daily Process, including importing data, calculation and housekeeping, runs everyday.

Observation:
The RAM usage will be increased after the Daily Process, e.g.: 19GB->20GB & 20GB->21GB, etc.
It will be decreased a bit after "Save Data", e.g.: 21GB->20.8GB
However, the increment is quite fast

The existing way to keep the RAM usage at a normal state is to restart the Server, returning to 19GB

May I know, besides restart Server, is there any method to release the RAM after some calculations?
The main thing to understand is that the 19 gig is not the "normal state"; it's the starting state with (presumably) no pre-cached calculations (unless you're running a TI to do such calculations to pre-cache values to improve performance). The more calculations that are done while the server is up, the higher your memory usage will be. And, concomitantly, the faster the server will be.

TM1 does not generally release RAM while the server instance is running. When calculations are invalidated the memory that no longer contains cached values will be held as "garbage" memory which will be re-consumed as needed by the server before it grabs any new memory from the operating system. To quote from the TM1 Official Guide:
Garbage Collection
In case of invalidation of a cache, the memory that is allocated by the cache is released and goes to garbage collection. Cognos TM1 controls its own garbage collection, so no memory is released to the underlying operating system (such as Windows). If the Cognos TM1 server needs additional memory, it will first check the garbage collection to reuse the released memory. If the garbage collection is empty, Cognos TM1 will allocate new memory from the operating system.

Oehler, Karsten (2012-02-22). IBM Cognos TM1 The Official Guide (Kindle Locations 5960-5964). McGraw-Hill. Kindle Edition.
The key point is that it should never need to return memory to the operating system. You should spec your server so that it has all the RAM that your model needs to operate, and then some.

Of course, if your memory consumption is increasing ridiculously rapidly it's always a good idea to check your rule feeders to see whether you're massively over-feeding.

But aside from that, increasing memory consumption is the normal state of affairs. It's not something that needs to be "cured" because the more calculations you have cached, the faster the data can be returned.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
wilsonmax
Posts: 34
Joined: Fri Feb 28, 2014 2:21 am
OLAP Product: TM1
Version: 10.1.0
Excel Version: 2010

Re: TM1 Server Host & RAM Usage

Post by wilsonmax »

Thank you for your reply!

It means that the RAM is used to being cache-memory and then performance will be improved.

Will it be dropped when other application on the same host is opened?

I'm worrying if TM1 has consumed too many memories.

So, is there any way to limit this "cache-memory"?
User avatar
Alan Kirk
Site Admin
Posts: 6606
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: TM1 Server Host & RAM Usage

Post by Alan Kirk »

wilsonmax wrote:Thank you for your reply!

It means that the RAM is used to being cache-memory and then performance will be improved.
No, RAM is memory. It's the consolidations and rule-based values that are being cached, so that TM1 doesn't have to recalculate them over and over again. This is one of the things that makes TM1 fast.
wilsonmax wrote:Will it be dropped when other application on the same host is opened?
Not unless the application uses an amount of memory that causes the server to exceed its physical memory. If that happens it pushes the server to virtual memory (disk swapping), which is a very bad thing.

--------------------------------
Edit: I originally assumed that you were using the word "it" to refer to the performance. Looking at it again, I suspect that you may have used "it" to refer to the memory. If that's the case, I think the original reply was clear enough on this point. TM1 Does. Not. Release. Memory.
--------------------------------

The other application may also consume processor time that TM1 needs, but that's a separate conversation. Generally I don't like running multiple applications (other than Excel and other admin utilities) on the server box. It's better to have dedicated servers for TM1, whether physical or virtual ones.
wilsonmax wrote:I'm worrying if TM1 has consumed too many memories.

So, is there any way to limit this "cache-memory"?
I can only repeat what I said earlier.
I wrote: You should spec your server so that it has all the RAM that your model needs to operate, and then some.
TM1 is an in-memory solution. Therefore there is no such thing as "too much" in terms of its memory consumption, assuming that it's running a well designed model. Again, look to your cube design, look to your rules, look to your feeders. If necessary get a skilled TM1 architect or consultant to look at them for you. They will be able to tell if the model is wasting memory by using it inefficiently. But if it's not, then you should NOT try to restrict TM1's memory usage, since that's its performance edge.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
TJMurphy
Posts: 74
Joined: Mon May 12, 2008 12:25 pm
OLAP Product: TM1
Version: PA 2.0.6 Local
Excel Version: Excel 2016

Re: TM1 Server Host & RAM Usage

Post by TJMurphy »

Not sure if this helps you but here's what I do.
Our IT folk don't allow us to monitor RAM on the servers (no login access) and as we're still on 32 bit it's obviously a problem. I've set up a .bat file that runs this line and then I can read the .txt file (as I do have access to the data folder).

TaskList /FI "imagename eq tm1*" /nh /fo "table" /v >> MemoryUsage.txt

It's then in a chore that runs regularly and I just have to check the last line every now and again until I get nervous and restart the services (using another .bat file!).

Tony
wilsonmax
Posts: 34
Joined: Fri Feb 28, 2014 2:21 am
OLAP Product: TM1
Version: 10.1.0
Excel Version: 2010

Re: TM1 Server Host & RAM Usage

Post by wilsonmax »

Dear Alan,

Thanks for your detailed reply!

I would ask the developer to review the rules (feeder) and the server admin to set schedule (monitoring).

Remarks:
Actually, only TM1 will run on the host. (the previous question is just a hypothesis)
wilsonmax
Posts: 34
Joined: Fri Feb 28, 2014 2:21 am
OLAP Product: TM1
Version: 10.1.0
Excel Version: 2010

Re: TM1 Server Host & RAM Usage

Post by wilsonmax »

TJMurphy wrote:Not sure if this helps you but here's what I do.
Our IT folk don't allow us to monitor RAM on the servers (no login access) and as we're still on 32 bit it's obviously a problem. I've set up a .bat file that runs this line and then I can read the .txt file (as I do have access to the data folder).

TaskList /FI "imagename eq tm1*" /nh /fo "table" /v >> MemoryUsage.txt

It's then in a chore that runs regularly and I just have to check the last line every now and again until I get nervous and restart the services (using another .bat file!).

Tony
Thanks for the codes.

Let me try them first~
Post Reply