JkSelf commented on issue #26434: [SPARK-29544] [SQL] optimize skewed partition 
based on data size
URL: https://github.com/apache/spark/pull/26434#issuecomment-573031981
 
 
   @cloud-fan
   We have test this PR with the following sql in 5 node clusters.
   
   ```
   spark.range(0, 100000, 1, 6).selectExpr("id % 2 as 
key1").createOrReplaceTempView("test1");
   spark.range(0, 100000, 1, 6).selectExpr("id % 2 +1 as 
key2").createOrReplaceTempView("test2");
   import org.apache.spark.sql.SaveMode.Overwrite
   spark.sql("select * from test1, test2 where key1 = 
key2").write.format("noop").mode(Overwrite).save()
   ```
   The main spark configuration is:
   ```
   spark.sql.shuffle.partitions 500
   spark.sql.autoBroadcastJoinThreshold -1
   spark.sql.adaptive.enabled true
   spark.sql.adaptive.shuffle.localShuffleReader.enabled false
   spark.sql.adaptive.shuffle.reducePostShufflePartitions.enabled false
   spark.sql.adaptive.optimizeSkewedJoin.skewedPartitionSizeThreshold 500
   ```
   This PR can gain about 6x performance improvement(27s vs 162s). And the 
following is the UI of with and without this PR.
   **With this PR:**
   
![image](https://user-images.githubusercontent.com/11972570/72155671-8ed86200-33ee-11ea-89a7-e47c12dd93cc.png)
   
   **Without this PR:**
   
![image](https://user-images.githubusercontent.com/11972570/72155695-a1eb3200-33ee-11ea-8897-95f2165a1569.png)
   
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to