title: Spark v3.0.0 - WARN DAGScheduler: broadcasting large task binary with size xx
body: <p>I'm new to spark. I'm coding a machine learning algorithm in Spark standalone (v3.0.0) with this configurations set:</p>
  <pre><code>SparkConf conf = new SparkConf();
  conf.setMaster(&quot;local[*]&quot;);
  conf.set(&quot;spark.driver.memory&quot;, &quot;8g&quot;);
  conf.set(&quot;spark.driver.maxResultSize&quot;, &quot;8g&quot;);
  conf.set(&quot;spark.memory.fraction&quot;, &quot;0.6&quot;);
  conf.set(&quot;spark.memory.storageFraction&quot;, &quot;0.5&quot;);
  conf.set(&quot;spark.sql.shuffle.partitions&quot;, &quot;5&quot;);
  conf.set(&quot;spark.memory.offHeap.enabled&quot;, &quot;false&quot;);
  conf.set(&quot;spark.reducer.maxSizeInFlight&quot;, &quot;96m&quot;);
  conf.set(&quot;spark.shuffle.file.buffer&quot;, &quot;256k&quot;);
  conf.set(&quot;spark.sql.debug.maxToStringFields&quot;, &quot;100&quot;);
  </code></pre>
  <p>This is how I create the CrossValidator</p>
  <pre><code>ParamMap[] paramGrid = new ParamGridBuilder()
              .addGrid(gbt.maxBins(), new int[]{50})
              .addGrid(gbt.maxDepth(), new int[]{2, 5, 10})
              .addGrid(gbt.maxIter(), new int[]{5, 20, 40})
              .addGrid(gbt.minInfoGain(), new double[]{0.0d, .1d, .5d})
              .build();
  
      CrossValidator gbcv = new CrossValidator()
              .setEstimator(gbt)
              .setEstimatorParamMaps(paramGrid)
              .setEvaluator(gbevaluator)
              .setNumFolds(5)
              .setParallelism(8)
              .setSeed(session.getArguments().getTrainingRandom());
  </code></pre>
  <p>The problem is that when (in paramGrid) maxDepth is just {2, 5} and maxIter {5, 20} all works just fine, but when it is like in the code above it keeps logging:
  <code>WARN DAGScheduler: broadcasting large task binary with size xx</code>,
  with xx going from 1000 KiB to 2.9 MiB, often leading to a timeout exception
  Which spark parameters should i change to avoid this?</p>