Correct Answer : Get Lastest Questions and Answer : Explanation: We should enable JVM re-use only in case , when there are large number of very small either map tasks or reduce tasks. For small number of tasks JVM re-use is not useful, because it will not give good performance improvement as well as heap memory issue can arise.
Correct Answer : Get Lastest Questions and Answer : Explanation: If you have very small tasks that are definitely running after each other, it is useful to set this property to -1 (meaning that a spawned JVM will be reused unlimited times).
So you just spawn (number of task in your cluster available to your job)-JVMs instead of (number of tasks)-JVMs.
This is a huge performance improvement. In long running jobs the percentage of the runtime in comparison to setup a new JVM is very low, so it doesn't give you a huge performance boost.
Also in long running tasks it is good to recreate the task process, because of issues like heap fragmentation degrading your performance.
In addition, if you have some mid-time-running jobs, you could reuse just 2-3 of the tasks, having a good trade-off.