Sumit Nekar
09/08/2023, 5:55 AMstate.backend.rocksdb.memory.managed: "true"
If i set above config to false, managed memory used is zero. Please help me to understand this behaviour better.
I am using flink operator, deployed our job in application mode.
ThanksDanny Cranmer
09/08/2023, 6:48 AMSumit Nekar
09/08/2023, 8:02 AMstate.backend.rocksdb.memory.managed: "false"
Does that mean managed memory portion of TM is not used at all and may be other task off-heap memory is used to store rocks db related stuffs? In that case doesnt make sense to reduce managed memory fraction to less than 0.4 ?Danny Cranmer
09/08/2023, 8:36 AMI am trying to debug some memory issues in flink jobs. I am seeing in metrics that managed memory total is always equal to managed memory used. Does that mean managed memory portion is really completely being used? This is with settingAs far as I understand. When
memory.managed: "true", Flink will pre-allocate the managed memory buffers and the metric will reflect this as 100%. However, Flink does not have visibility into the exact utilisation and therefore it is 100%/does not change with actual usage. I am not too familiar with the behaviour of the metric when you set it to memory.managed: "false", but I would assume that 0% does not reflect the actual usage (since Flink might not have visibility).
In that case doesnt make sense to reduce managed memory fraction to less than 0.4This depends on your app. Generally speaking, do not set
memory.managed: "false" unless you are an advanced RocksDB user and need fine grain control. If you are not using RocksDB, then it is advised to set the managed memory fraction to 0 (unless you are using Python). Reducing the fraction will result in additional memory allocated to the Java heap, but you will be taking away from RocksDB.Sumit Nekar
09/08/2023, 8:43 AMDanny Cranmer
09/08/2023, 8:46 AMSumit Nekar
09/08/2023, 9:10 AMSumit Nekar
09/08/2023, 9:20 AMDanny Cranmer
09/08/2023, 9:28 AMDoest flink image use jemalloc by default?The community Flink image does yes (AFAIK), but if you build your own then you may need to configure it
Danny Cranmer
09/08/2023, 9:29 AMSumit Nekar
09/08/2023, 9:32 AMSumit Nekar
09/08/2023, 9:35 AMDanny Cranmer
09/08/2023, 10:03 AMSumit Nekar
09/08/2023, 12:06 PM