Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7168#discussion_r34099262
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/RDD.scala ---
    @@ -1078,7 +1078,9 @@ abstract class RDD[T: ClassTag](
           val scale = math.max(math.ceil(math.pow(numPartitions, 1.0 / 
depth)).toInt, 2)
           // If creating an extra level doesn't help reduce
           // the wall-clock time, we stop tree aggregation.
    -      while (numPartitions > scale + numPartitions / scale) {
    +
    +      // Don't trigger treeAggregation for 5 partitions
    +      while (numPartitions > 5 && (numPartitions > scale + numPartitions / 
scale)) {
    --- End diff --
    
    `5` is an example. I think the right logic is `numPartitions > scale + 
math.ceil(1.0 * numPartitions / scale)`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to