wankunde opened a new pull request, #52754:
URL: https://github.com/apache/spark/pull/52754

   ### What changes were proposed in this pull request?
   
   If ZGC or ShenandoahGC and ON_HEAP are used, we should consider the header 
object size of the long array object.
   
   Test ZGC and ShenandoahGC with and without this optimization:
   
   Test code: 
https://gist.githubusercontent.com/wankunde/b7cf073b31f3a4bf5b525ab4a6b1f700/raw/85db977f5ef8609db27ced49d10ace9a248433c1/TestBlockSize.java
   
   Test result:
   |              | Max allocated size without optimization | Max allocated 
size with optimization  |
   
|--------------|-----------------------------------------|---------------------------------------|
   | G1GC         | 817889280                               | 1019211984        
                    |
   | ZGC          | 671088640                               | 1006629120        
                    |
   | ShenandoahGC | 855638016                               | 964686240         
                    |
   
   Detail test result: 
https://gist.github.com/wankunde/6f3b6ed8abaa247307469ab5a4fae2bb
   
   ### Why are the changes needed?
   
   Optimize spark memory usage.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No
   
   ### How was this patch tested?
   
   Manual test
   
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   No
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to