Re: Capacity Planning For Large State in YARN Cluster
Posted by
Ashish Pokharel on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Capacity-Planning-For-Large-State-in-YARN-Cluster-tp16444p16470.html
Hi Till,
I got the same feedback from Robert Metzger over in Stackflow. I have switched my app to use RocksDB and as yes, it did stabilize the app :)
However, I am still struggling with how to map out my TMs and JMs memory, number of slots per TMs etc. Currently I am using 60 slots with 10 TMs and 60 GB of total cluster memory. Idea was to make the states distributed and approx. 1 GB of memory per slot. I have also changed containerized.heap-cutoff-ratio config to 0.3 to allow for a little room for RocksDB (RocksDB is using basic spinning disk optimized pre-defined configs but we do have SSDs on our Prod machines that we can leverage in future too) and set taskmanager.memory.off-heap to true.It feels more experimental at this point than an exact science :) If there are any further guidelines on how we can plan for this as we open up the flood gates to stream heavy continuous streams, that will be great.
Thanks again,
Ashish
Hi Ashish,
what you are describing should be a good use case for Flink and it should be able to run your program.
When you are seeing a GC overhead limit exceeded error, then it means that Flink or your program are creating too many/too large objects filling up the memory in a short time. I would recommend checking your user program to see whether you can avoid unnecessary object instantiations and whether it is possible to reuse created objects.
Concerning Flink's state backends, the memory state backend is currently not able to spill to disk. Also the managed memory is only relevant for DataSet/batch programs and not streaming programs. Therefore, I would recommend you to try out the RocksDB state backend which is able to gracefully spill to disk if the state size should grow too large. Consequently, you don't have to adjust the managed memory settings because they currently don't have an effect on streaming programs.
My gut feeling is that switching to the RocksDBStateBackend could already solve your problems. If this should not be the case, then please let me know again.
Cheers,
Till