Mem-space been used by TP

https://learninghub.kx.com/forums/topic/mem-space-been-used-by-tp

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

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.

 

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