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

   ### What changes were proposed in this pull request?
   
   This PR update document recommends users to use JDK 8u362 and later versions.
   
   ### Why are the changes needed?
   
   8u362 fixed a performance issue: 
https://github.com/openjdk/jdk8u-dev/pull/161
   
   Benchmark code:
   ```scala
   val dir = "/tmp/spark/benchmark"
   val N = 2000000
   val columns = Range(0, 100).map(i => s"id % $i AS id$i")
   
   spark.range(N).selectExpr(columns: _*).write.mode("Overwrite").parquet(dir)
   
   val cnt = 60
   val selectExps = columns.take(cnt).map(_.split(" ").last).map(c => 
s"count(distinct $c)")
   val start = System.currentTimeMillis()
   spark.read.parquet(dir).selectExpr(selectExps: _*).collect()
   println(s"Benchmark result. Java version: 
${System.getProperty("java.version")}. Time(ms): ${System.currentTimeMillis() - 
start}")
   ```
   
   8u352 benchmark result:
   ```shell
   export 
JAVA_HOME=/Users/yumwang/Downloads/zulu8.66.0.15-ca-jdk8.0.352-macosx_x64
   export PATH=${JAVA_HOME}/bin:${PATH}
   
   bin/spark-shell  --master "local[2]" -i benchmark.scala
   Benchmark result. Java version: 1.8.0_352. Time(ms): 641155
   ```
   
   8u362 benchmark result:
   ```shell
   export 
JAVA_HOME=/Users/yumwang/Downloads/zulu8.68.0.19-ca-jdk8.0.362-macosx_x64
   export PATH=${JAVA_HOME}/bin:${PATH}
   
   bin/spark-shell  --master "local[2]" -i benchmark.scala
   Benchmark result. Java version: 1.8.0_362. Time(ms): 79360
   ```
   
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   N/A.


-- 
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: reviews-unsubscr...@spark.apache.org

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