Page 1 of 1
Memory leaks
Posted: Mon Oct 13, 2014 8:38 am
by mithun.mistry11
Hello Again
Would like soem advise again if possible, memory leaks, it was mentioned that data from tm1 instances sometimes take up space on the RAM and over a period of time, we see that we dont have so much memory available, until a reboot, where it releases the space that has been invisible for so long! Apart from scheduling a reboot, Anything else we could do and what causes such an issue, and that is only on a development environment?
Thank you
Re: Memory leaks
Posted: Mon Oct 13, 2014 9:45 am
by David Usherwood
This is expected behaviour, not a memory leak. Read up on how TM1 caches calculations and turn on Performance Monitor.
Re: Memory leaks
Posted: Mon Oct 13, 2014 9:53 am
by Alan Kirk
mithun.mistry11 wrote:
Would like soem advise again if possible, memory leaks, it was mentioned that data from tm1 instances sometimes take up space on the RAM and over a period of time, we see that we dont have so much memory available, until a reboot, where it releases the space that has been invisible for so long! Apart from scheduling a reboot, Anything else we could do
The first thing you should do is install more RAM.
The second thing you should do is install more RAM.
The third thing that you should do is Install. More. RAM.
It is entirely possible that you see a pattern emerging here.
mithun.mistry11 wrote: and what causes such an issue,
The fact that TM1 is, by design, an
IN MEMORY solution. When you start the server all that is loaded into memory is the stored, N level values that have been saved to disk. Calculated values are not saved and therefore aren't loaded into memory; they are calculated on demand. The longer you leave a server running the more calculated values (both consolidations and rules) are likely to need to be calculated and therefore the greater the memory usage.
Also, once TM1 uses the memory it does not return it to the operating system. It holds onto it like grim death even if the calculated values have been invalidated by changing N level values and need to be recalculated. This may not be the most efficient way of doing it from Windows' point of view but it is from TM1's point of view, since TM1 doesn't have to waste its time continually requesting memory from and releasing it back to the operating system. And all TM1 cares about is its own efficiency.
As should you.
That is why the usage increases over time and is not "returned" until the TM1 server restarts.
Therefore you define your memory requirements for what a
fully calculated model will need in regular use,
not what the model needs when it starts up.
And that is why you need to do what? Repeat after me...
Install. More. RAM.
Edit: David got his reply in while I was still typing, but what the hey.
Re: Memory leaks
Posted: Mon Oct 13, 2014 10:13 am
by mithun.mistry11
Hello
So initially, even if we install more RAM, we are likely to lose some unused memory..brill. But the one thing that really gets to me is the issue arises on one environment but not on any of the other environments. When I did a RAM check on the other environments, there werent much of a difference after a reboot, why would that be the case?
Regards
Mithun
Re: Memory leaks
Posted: Mon Oct 13, 2014 10:20 am
by declanr
Most likely the other environments haven't been queried as much so TM1 never had to use the RAM in the first place. Or the models are different.
I also wouldn't say it is "unused memory".
The other option to look at alongside more RAM is making the model more efficient, there are a number of things explained extensively on the forum that can cause memory usage to reduce, some simple (dim reordering) others take someone who really knows what they are doing (feeder optimization.)
Re: Memory leaks
Posted: Mon Oct 13, 2014 10:27 am
by Alan Kirk
declanr wrote:Most likely the other environments haven't been queried as much so TM1 never had to use the RAM in the first place. Or the models are different.
I also wouldn't say it is "unused memory".
You have of course nailed the core issues.
I of course did not say that it was "unused memory". I did indeed take some time to type out exactly what the memory was being used
for and why it was not "lost".
But if one's mind is set on claiming that the memory has "leaked" and is "lost", then that's certainly "brill". I think next time I'll just stick to a reply like David's.