KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums KX Solutions Mem-space been used by TP

  • Mem-space been used by TP

    Posted by leguan on December 9, 2021 at 12:00 am

    Hello Everyone,

     

    I would like to share a use case here:

    There is a TP whose memory consumption is abnormally big( we have another tp that has the same FH,  whose mem usage is roughly 5% of this one, and this tp is in v4.5 stand-alone installation. ), we r using kxplatform 4.5 cluster-installation.  After executing .utils.gc[], only few space was released.

    1. is there other possible way to reduce TP’s memory consumption?

    2. what it is that has taken so much space in TP?

    best,

    leguan

    leguan replied 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • leahs

    Member
    December 10, 2021 at 12:00 am

    Coincidentally, we encountered an issue this week where the RDB being too busy negatively impacted the TP and caused a data build up in the TP’s outbound buffer.

    For best practise, you can monitor the memory usage of subscribers by running .Q.w[] and memory stats in readable form will be returned – https://code.kx.com/q/ref/dotq/#qw-memory-stats

    .Q.gc[] is also very important and can help with in-memory capacity issues.  https://code.kx.com/q/ref/dotq/#qgc-garbage-collect 

    Thanks for sharing with the community. Hope this helps.

     

  • leahs

    Member
    December 14, 2021 at 12:00 am

    Thanks @matt_moore

    The particular situation we encountered related to the client connecting to the RDB by opening an Analyst session and mounted the HDB. Despite the data being on disk, the sym file was loaded into memory and this was quite large. Other assigned variables were also kept in memory. It was this manual one time action that resulted in the RDB being busy for a length amount of time rather than having a persistent slow subscriber issue. This lead to the build up of data in the TP’s outbound buffer. We availed of .Q.w[] and .Q.gc[] while in the RDB process.

    This prompted an internal investigation into memory limits of an Analyst session. The status of this is WIP.

    Thanks,

    Leah

Log in to reply.