Databricks Certified Associate Developer For Apache Spark 30 · Free Practice Question Medium
Question 10
What are the possible strategies in order to decrease garbage collection time ?
- A Persist objects in serialized form
- B Create fewer objects
- C Increase java heap space size
Reveal correct answers
Correct answers: A, B, C
Explanation
JVM garbage collection can be a problem when you have large “churn” in terms of the RDDs stored by your program. When Java needs to evict old objects to make room for new ones, it will need to trace through all your Java objects and find the unused ones. The main point to remember here is that the cost of garbage collection is proportional to the number of Java objects, so using data structures with fewer objects (e.g. an array of Ints instead of a LinkedList) greatly lowers this cost. https://spark.apache.org/docs/latest/tuning.html#garbage-collection-tuningDiscussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
You must be logged in to post a comment.
