Elizaveta Batanina
02/06/2024, 5:05 PMrocksdb. So I have a feature that requires storing large state. Specifically, I need to have Sliding window(4h size, 1min hop).
When I run feature with rocksdb I notice following problems:
1. After some time checkpoints stop working. It says checkpoint “in_progress” for 10min until checkpoint is expired. During this time watermark is not propagated and feature is just stuck.
2. Rocksdb files occupy much less space compared to in-memory state size. Probably it is just due to clever compaction, but maybe it indicates some problems. For each of 6 taskmanagers heap memory is 3.63Gb and gets filled up after 30 min and checkpoint size can reach 3-4Gb. With rocksdb each taskmanager stores only ~50-70mb. And checkpoints are only 300-400Mb. Watermarks obviously progress much slower.
What have I tried:
• If I turn off rocksdb backend, checkpoints work perfectly, uploading takes 2-10s. But, after 30 min taskmanagers are out of heap memory. (Tried 6Gb, 8Gb and increased heap memory fraction at the cost of reducing managed memory)
• I tried this approach with Flink 1.17.1 and 1.18.1 and got same outcome
• I also tried state.backend.incremental with rocksdb but it didn’t help.
• And in case it is idle source problem, I’ve set ‘scan.watermark.idle-timeout’=‘1min’, in my source.
Setup:
• Flink 1.17.1 & tried 1.18.1
• Source connector is Kafka stream
• parallelism is 6, same as number of kafka partitions to avoid idle source
• checkpoints are saved on s3
Has anyone faced same issue? Or any advice on how to approach it?
Thanks!Rui Grafino
03/25/2024, 7:04 PMElizaveta Batanina
03/26/2024, 10:04 AMRui Grafino
04/08/2024, 8:46 PM