Monitor the usage of keyed state

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Monitor the usage of keyed state

Mu Kong
Hi community,

I have a Flink job running with RichMapFunction that uses keyed state.
Although the TTL is enabled, I wonder if there is a way that I can monitor the memory usage of the keyed state. I'm using RocksDB as the state backend.

Best regards,
Mu
Reply | Threaded
Open this post in threaded view
|

Re: Monitor the usage of keyed state

Andrey Zagrebin-5
Hi Mu,

I would suggest to look into RocksDB metrics which you can enable as Flink metrics [1]

Best,

On Fri, Aug 21, 2020 at 4:27 AM Mu Kong <[hidden email]> wrote:
Hi community,

I have a Flink job running with RichMapFunction that uses keyed state.
Although the TTL is enabled, I wonder if there is a way that I can monitor the memory usage of the keyed state. I'm using RocksDB as the state backend.

Best regards,
Mu
Reply | Threaded
Open this post in threaded view
|

Re: Monitor the usage of keyed state

Yun Tang
Hi Mu

I want to share something more about the memory usage of RocksDB.

If you enable managed memory for rocksDB (which is enabled by default) [1], you should refer to the block cache usage as we cast index & filter into cache and counting write buffer usage in cache.
We could refer to the usage of block cache [2] to know the overall memory usage of RocksDB.
BTW, since we use the same cache for rocksDB instances within one slot, you might notice that all rocksDBs in the same slot would report the same block cache usage, please not sum them up.


Best,
Yun Tang

From: Andrey Zagrebin <[hidden email]>
Sent: Tuesday, August 25, 2020 22:12
To: Mu Kong <[hidden email]>
Cc: [hidden email] <[hidden email]>
Subject: Re: Monitor the usage of keyed state
 
Hi Mu,

I would suggest to look into RocksDB metrics which you can enable as Flink metrics [1]

Best,

On Fri, Aug 21, 2020 at 4:27 AM Mu Kong <[hidden email]> wrote:
Hi community,

I have a Flink job running with RichMapFunction that uses keyed state.
Although the TTL is enabled, I wonder if there is a way that I can monitor the memory usage of the keyed state. I'm using RocksDB as the state backend.

Best regards,
Mu