Planning Analytics

Planning Analytics

Get AI-infused integrated business planning

 View Only
  • 1.  Performance Issue on TM1 Database 12 Without CubeSetLogChanges or unable to turn off logging

    Posted Mon December 23, 2024 04:31 AM
    Hi everyone,
     
    I'm currently working on PA 12.3.11 (TM1 Database 12), and I'm facing a performance issue with a TurboIntegrator (TI) process that relies heavily (only 350000 ish) on CellIncrementN. The process is taking a massive amount of time to execute (more than 15 min).
     
    Previously, I would have used CubeSetLogChanges to turn off logging and improve performance during such processes. However, as logging can no longer be turned off in TM1 Database 12, I'm wondering how best to address this issue.
     
    Here are my questions:
     
    1. What are the best practices for optimizing performance in processes with heavy use of CellIncrementN with TM1 Database 12?
    2. Are there alternative approaches to managing logging overhead in scenarios like this, given that CubeSetLogChanges is deprecated?
    3. Are there any other tools or techniques in TM1 Database 12 that can mitigate the impact of logging on process performance?
     
    I'd really appreciate any advice or insights from the community, especially if you've encountered similar challenges while working in TM1 Database 12.
     
    Thank you in advance for your help!
     
    Best regards,


    ------------------------------
    Tin Nguyen
    IBM Planning Analytics and Excel VBA enthusiast
    Co-founder at Treekala
    ------------------------------


  • 2.  RE: Performance Issue on TM1 Database 12 Without CubeSetLogChanges or unable to turn off logging

    Posted Mon December 30, 2024 08:48 AM
    Edited by Hubert Heijkers Mon December 30, 2024 08:48 AM

    Hi Tin,

    Let me start with some good news, albeit not helpful right now, and that is that in an upcoming release of TM1, likely TM1 v12.6 but definitely 1st half of 2025, we'll be replacing how/where we store updates, these transactions, to cubes. I'll spare you the details but net result is, without loosing any capability that TM1 v12 has today, that it'll be even [much] faster then TM1 v11 with logging on, and comes with the benefit of always having stored everything on disk after every transaction in a way that also improves load times, dramatically, if logs exist (completely obsoleting the need for SaveDataAll, if there even where a need in v12).

    The 'bad' news therefore is that there is, currently, not much you can do as, as you've already referred to above, part of the high available architecture of v12 we have to store all transactions and, the way that's done today, is, whilst fault tolerant, not even as performant as v11 with transaction logging on. Only thing you might be able to do, if within your control and if you happened to be updating the same cell multiple times to begin with, is making sure you calculate the increment for a cell and update it only once. Also, if you happen to be incrementing with the value 0, a case that was brought to our attention earlier, that still has the full overhead of an update and should be avoided as well.

    Happy holidays!



    ------------------------------
    Hubert Heijkers
    STSM, Program Director TM1 Functional Database Technology and OData Evangelist
    ------------------------------



  • 3.  RE: Performance Issue on TM1 Database 12 Without CubeSetLogChanges or unable to turn off logging

    Posted Thu January 02, 2025 01:57 PM

    Hi Hubert,

    Thank you for your detailed response and for sharing these insights. It's much appreciated! Apologies for the delay in getting back to you; between the holiday season and some testing I've been doing on my end, it took me a bit of time to circle back to this discussion.

    The upcoming improvements in TM1 v12.6 sound like a game-changer, and I'm looking forward to seeing how they will address performance challenges. In the meantime, I appreciate your suggestion to calculate increments more efficiently and avoid redundant updates.

    That said, with over 10 years of experience working with IBM Planning Analytics, I've already implemented such optimizations in my processes. Unfortunately, in scenarios like copying data from one version to another, this approach doesn't work effectively. The performance overhead due to logging remains significant in such cases, as the process inherently involves massive data movements.

    Additionally, in many of the projects I've worked on, we rely heavily on the cube log and transaction logs to monitor and analyze changes. With the current limitations in TM1 v12, the transition to this version seems nearly unattainable for these types of use cases.

    Do you have any specific recommendations or alternative approaches for managing large data movements and maintaining log integrity in TM1 v12? Perhaps something beyond standard optimization techniques?

    Thank you again for your time and support, and happy holidays!

    Best regards,



    ------------------------------
    Tin Nguyen
    IBM Planning Analytics and Excel VBA enthusiast
    Co-founder at Treekala
    ------------------------------



  • 4.  RE: Performance Issue on TM1 Database 12 Without CubeSetLogChanges or unable to turn off logging

    Posted Fri January 03, 2025 10:48 AM

    Hi Tin,

    I'm glad you like the idea! I completely understand that, in the current setup, there are scenarios where the approach takes its sweet time - but that will be addressed.

    Data copying is an interesting case. I actually have something else in the works specifically for that, but it's a bit early to go into detail. That said, once it's ready, copying leaf-level data will be a breeze. Even without these enhancement, these improvements will already make a significant difference for your copy use case.

    You aptly described the issue as "performance overhead due to logging," and that has always been a key factor. Historically, we maintained both the final end-state (via the overlay tree for parallel interactions) and the detailed transactions. During commits, we merged the overlay tree with the base cube and then serialized the transactions to a text file - a process that added significant overhead.

    In the new approach, we've eliminated the need for dual administration of transactions. Instead, we serialize the overlay tree directly, which is far more efficient. As a result, even if you enable transaction logging (either through pub/sub or the reintroduced pull mechanism via REST API), the serialization process is no longer part of the transaction/commit itself. This effectively removes the performance hit from logging.

    Even if you need logging for monitoring or analysis purposes, you should still notice an improvement. The only difference compared to v11 is that transaction logging now captures every transaction when enabled. The ability to perform fine-grained logging by toggling it on and off is no longer available. While this could impact queries against the transaction log when filtering out unneeded entries, but then and again the retrieval of those transaction has been made significantly faster in v12 as well.

    Happy New Year!



    ------------------------------
    Hubert Heijkers
    STSM, Program Director TM1 Functional Database Technology and OData Evangelist
    ------------------------------



  • 5.  RE: Performance Issue on TM1 Database 12 Without CubeSetLogChanges or unable to turn off logging

    Posted Mon January 06, 2025 02:50 AM

    Hi Hubert,

    Thank you for the detailed explanation and the clarity you provided. It's greatly appreciated!

    The upcoming enhancements, especially the dedicated solution for copying leaf-level data, sound very promising. Given the challenges with data copies in my current processes, I'm eager to see how these improvements will address the performance overhead in such scenarios.

    Your explanation of the new approach to logging in TM1 v12 makes a lot of sense. Eliminating the dual administration of transactions and optimizing serialization sounds like a significant step forward. While I still have some reservations about the inability to toggle logging on and off for fine-grained control, I can see how the overall performance gains would outweigh this limitation in most cases.

    For now, I'm looking forward to testing these updates as they roll out. Thank you again for your insight, and I'll keep an eye on the progress of the solution you mentioned.

    Happy New Year!



    ------------------------------
    Tin Nguyen
    IBM Planning Analytics and Excel VBA enthusiast
    Co-founder at Treekala
    ------------------------------



  • 6.  RE: Performance Issue on TM1 Database 12 Without CubeSetLogChanges or unable to turn off logging

    Posted Mon January 06, 2025 02:49 PM

    Hi Hubert,

    I've been testing different approaches to address the performance challenges in my current setup. My source data comes from a cube view, and in the Data tab of my process, there are nested loops that process the data. To optimize this, I tried the old-school export-import method: instead of writing values directly to the cube, I use AsciiOutput to export the data into a file and then reimport it in a second process.

    This approach significantly improved performance. What originally took a lot of time now only takes about 20 seconds. While it's not the most elegant solution, it effectively circumvents the performance overhead caused by transaction logging.

    Given the nested loops in my case, I'd be curious to hear your thoughts on whether this export-import method is a viable long-term solution, or if there are potential downsides to using it in production environments.

    Once again, I'm looking forward to seeing the upcoming enhancements for copying leaf-level data, as they sound like a game-changer for scenarios like this.

    Thank you for your time and support.

    Best regards,



    ------------------------------
    Tin Nguyen
    IBM Planning Analytics and Excel VBA enthusiast
    Co-founder at Treekala
    ------------------------------



  • 7.  RE: Performance Issue on TM1 Database 12 Without CubeSetLogChanges or unable to turn off logging

    Posted Thu January 09, 2025 03:27 AM

    Hi Tin,

    'old school' in TM1 often means it works;-!

    Kidding aside, export-import at the end of the day has the same effect on logging, that is if you make the same changes to cell values.

    I'm guessing the cube view you are using comes from the same, or dependent, cube then the one you are writing to correct? The real issue therefore is related to the fact that your write invalidates all caches and the effect that has on subsequent reads. It's case specific how much that effect is but it's known to have this downside and exporting and importing has been the answer to this for the last couple of decades+ (read: it has been a viable long-term solution for a long time;-). 

    But yes, the enhancement I'm looking at, which depends on some other work getting in first however (so don't expect it tomorrow), will get around that (as well as having proper snapshot semantics - but that's a whole other discussion), and still do all the logging one would ever need in [way] less time;-!.

    Cheers,



    ------------------------------
    Hubert Heijkers
    STSM, Program Director TM1 Functional Database Technology and OData Evangelist
    ------------------------------



  • 8.  RE: Performance Issue on TM1 Database 12 Without CubeSetLogChanges or unable to turn off logging

    Posted Sat January 11, 2025 01:22 AM

    Hi Hubert,

    Thank you for your detailed response! It's always insightful to explore these technical nuances with someone as experienced as you.

    I completely agree that cache invalidation is the real challenge here. Having worked on numerous TM1 implementations, I've encountered this issue many times, especially in scenarios where cube views are dependent on the same or related cubes. The performance impact caused by invalidating caches during writes is something I've often had to address, and export-import has indeed been a reliable fallback solution for years, even if it's not without its trade-offs.

    That's why I find the enhancements you're working on so exciting. The ability to address cache invalidation directly, while maintaining efficient logging and proper snapshot semantics, could fundamentally improve how we approach large-scale data operations. It's reassuring to see these core challenges being tackled at the engine level. It's the kind of progress that can really make a difference in day-to-day operations.

    Thank you again for sharing these insights and for your work on advancing the platform. I'm looking forward to seeing these improvements in action and adapting them to solve the kinds of challenges we encounter regularly in Planning Analytics.

    Cheers



    ------------------------------
    Tin Nguyen
    IBM Planning Analytics and Excel VBA enthusiast
    Co-founder at Treekala
    ------------------------------