SaurabhChawla100 commented on pull request #29413:
URL: https://github.com/apache/spark/pull/29413#issuecomment-672981082


   > > Using this VariableLinkedBlockingQueue, we are increasing certain 
percentage threshold for size of the queue at run time, Which is less 
aggressive compare to keeping the Integer.MAX_VALUE, Also I am planning to add 
the validation of spark driver memory to increase the size of the 
VariableLinkedBlockingQueue
   > 
   > IIUC, `LinkedBlockingQueue` doesn't really allocate all the memory in once 
by setting the capacity to `Integer.MAX_VALUE`.
   > It also increase memory usage gradually at runtime.
   
   That's right, memory is allocated once the event is present in the Queue. In 
case when huge number of events flowing ,on keeping Integer.MAX_VALUE and there 
is no control on the number of events on the event queue, it keeps the large 
number of events queue(might be 100k or more), So there is chance of OOM is 
here if the size is not controlled and driver memory is not sufficient.
   
   VariableLinkedBlockingQueue is similar to LinkedBlockingQueue with the 
functionality of setting the size of the queue at run time. So we can make use 
of this VariableLinkedBlockingQueue and adjust the size based on various 
conditions


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to