Product:
Planning Analytics 2.1.14
Microsoft Windows 2022 server
Issue:
CUB file size does not shrink when we remove a dimension element, like a year from a cube. Why?
Solution:
You need to update a data value in the cube, for TM1 to recognize the data change, and then after you do a SaveDataAll the cub file is smaller.
More Information:
https://www.ibm.com/docs/en/planning-analytics/2.1.0?topic=functions-savedataall
You have to do a data (not metadata) change that “flags” to TM1 whether it needs to re-save a particular cube. If there has been no change flagged since the last data save, then the cube will not be saved even if you do a Save All. This is a time saving feature, since it would be pointless for TM1 to re-save each and every cube regardless of whether it had changed. After all, the save process is often the primary performance bottleneck. You don’t actually lose much by retaining the data in the .cub file; all that will happen upon startup is that the data that no longer has a valid element will fail to load.
The deletion of data via the deletion of elements is not (flagged as) an actual data change. (Were it otherwise, after each metadata change the server would need to somehow go through and see whether any populated cells had been lost, which would be a ridiculously time consuming task.) Consequently the cube would not be flagged for a save after you made your change, and thus it retained the same size. If you checked the time and date of the .cub file it would have been from the save prior to you deleting the elements.
Remember that the RAM TM1 reports to the OS as being “in use” is just the RAM it has reserved for use. TM1 doesn’t tend to give back RAM that it has allocated (again, a bias toward speed and not efficiency), so you’re unlikely to see a drop in reserved RAM, even if it is no longer used.
https://exploringtm1.com/tm1-file-extensions-understand-the-files-in-your-tm1-model/
https://blog.octanesolutions.com.au/tm1-object-extensions
https://exploringtm1.com/tm1-health-how-to-keep-your-tm1-server-optimized/


