-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AutoTuner/Bootstrapper should recommend Dataproc Spark performance enhancements #1539
base: dev
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2989,4 +2989,32 @@ We recommend using nodes/workers with more memory. Need at least 17496MB memory. | |
// scalastyle:on line.size.limit | ||
compareOutput(expectedResults, autoTunerOutput) | ||
} | ||
|
||
test("test AutoTuner sets Dataproc Spark performance enhancements") { | ||
// mock the properties loaded from eventLog | ||
val logEventsProps: mutable.Map[String, String] = | ||
mutable.LinkedHashMap[String, String]( | ||
"spark.executor.cores" -> "16", | ||
"spark.executor.instances" -> "1", | ||
"spark.executor.memory" -> "80g", | ||
"spark.executor.resource.gpu.amount" -> "1", | ||
"spark.executor.instances" -> "1" | ||
) | ||
val dataprocWorkerInfo = buildGpuWorkerInfoAsString(None, Some(32), | ||
Some("212992MiB"), Some(5), Some(4), Some(T4Gpu.getMemory), Some(T4Gpu.toString)) | ||
val infoProvider = getMockInfoProvider(0, Seq(0), Seq(0.0), | ||
logEventsProps, Some(testSparkVersion)) | ||
val clusterPropsOpt = ProfilingAutoTunerConfigsProvider | ||
.loadClusterPropertiesFromContent(dataprocWorkerInfo) | ||
val platform = PlatformFactory.createInstance(PlatformNames.DATAPROC, clusterPropsOpt) | ||
val autoTuner: AutoTuner = ProfilingAutoTunerConfigsProvider | ||
.buildAutoTunerFromProps(dataprocWorkerInfo, infoProvider, platform) | ||
val (properties, comments) = autoTuner.getRecommendedProperties() | ||
val autoTunerOutput = Profiler.getAutoTunerResultsAsString(properties, comments) | ||
val expectedResults = Seq( | ||
"--conf spark.dataproc.enhanced.optimizer.enabled=true", | ||
"--conf spark.dataproc.enhanced.execution.enabled=true" | ||
) | ||
assert(expectedResults.forall(autoTunerOutput.contains)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The assertion is not enough because it is possible that autotuner put two different entries for the same property. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added the check for comparing the complete AutoTuner output. |
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we add those to the yaml file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to tuning yaml file.