Uh oh!
There was an error while loading. Please reload this page.
[SPARK-1112, 2156] use min akka frame size to decide how to send task results - #1124
[SPARK-1112, 2156] use min akka frame size to decide how to send task results#1124mengxr wants to merge 5 commits into
Conversation
AmplabJenkins
commented
Jun 19, 2014
Merged build triggered. |
AmplabJenkins
commented
Jun 19, 2014
Merged build started. |
ash211
commented
Jun 19, 2014
Is there a use case for making the min frame size configurable with a parameter? |
AmplabJenkins
commented
Jun 19, 2014
Merged build triggered. |
AmplabJenkins
commented
Jun 19, 2014
Merged build started. |
mengxr
commented
Jun 19, 2014
@ash211 If there is a way to make the configuration delivered consistently to backend, we can use This is a quick fix for |
AmplabJenkins
commented
Jun 19, 2014
Merged build triggered. |
AmplabJenkins
commented
Jun 19, 2014
Merged build started. |
AmplabJenkins
commented
Jun 19, 2014
Merged build finished. |
AmplabJenkins
commented
Jun 19, 2014
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15887/ |
AmplabJenkins
commented
Jun 19, 2014
Merged build finished. |
AmplabJenkins
commented
Jun 19, 2014
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15888/ |
ash211
commented
Jun 19, 2014
I'm not sure the implication of it, but it sounds like it's probably ok to On Wed, Jun 18, 2014 at 7:34 PM, Xiangrui Meng notifications@github.com
|
There was a problem hiding this comment.
200 KB may not enough , Its value should increase as the serialized DirectResult becomes larger .
There was a problem hiding this comment.
I tested with a double array of size very close to 10 * 1024 * 1024. The akka message overhead is about 30-60K. This PR doesn't fix the issues with receiving new tasks from the driver that are bigger than 10MB. @pwendell is working on it.
AmplabJenkins
commented
Jun 19, 2014
Merged build finished. |
AmplabJenkins
commented
Jun 19, 2014
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15891/ |
There was a problem hiding this comment.
This is a slightly disingenuous name/comment, it's really the min maximum frame size.... Can keep the name, but maybe add some clarification in the comment.
aarondav
commented
Jun 19, 2014
LGTM. Note that this fix is "safe" in that in the most conservative case, we'll just return the result through the block manager rather than Akka. This may be a little slower, but should be guaranteed to work. |
AmplabJenkins
commented
Jun 19, 2014
Merged build triggered. |
AmplabJenkins
commented
Jun 19, 2014
Merged build started. |
AmplabJenkins
commented
Jun 19, 2014
Merged build finished. |
AmplabJenkins
commented
Jun 19, 2014
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15894/ |
AmplabJenkins
commented
Jun 19, 2014
Merged build triggered. |
AmplabJenkins
commented
Jun 19, 2014
Merged build finished. |
AmplabJenkins
commented
Jun 19, 2014
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15899/ |
There was a problem hiding this comment.
Why 200K and should we change the similar code that does this for sending task closures (which also subtracts 1024)?
There was a problem hiding this comment.
We computed the difference between the size of the akka message and the size of serialized task result (~10M). The difference is smaller than 60K. I set 200K to be safe. Could you point me to the places where we use 1024?
There was a problem hiding this comment.
@kayousterhout I saw the line in CoarseGrainedSchedulerBackend. Should the overhead be bounded by a fixed size or proportional to the message size?
There was a problem hiding this comment.
Re: your last question, I have no idea...you definitely know more about this than I do at this point. Using the higher, 200K value seems like a safe alternative to what's currently there. It would be great to add this constant in AkkaUtils so we don't need to manually track this down if it changes again in the future.
mengxr
commented
Jun 19, 2014
Jenkins, retest this please. |
AmplabJenkins
commented
Jun 19, 2014
Merged build triggered. |
AmplabJenkins
commented
Jun 19, 2014
Merged build started. |
kayousterhout
commented
Jun 19, 2014
So this can make performance worse for folks that set spark.akka.frameSize in the SparkConf that's on the executor to be higher, right, because this commit means we effectively ignore that parameter setting? Can we just figure out what the max frame size actually is for the backend actor system? Also, this can lead to hung jobs if a user set the frame size to lower than the default of 10, right? @pwendell said you guys chose to ignore this case but it would be nice to add a comment explicitly stating this in the code in case it turns up as a bug later. |
mengxr
commented
Jun 19, 2014
For the first scenario, it won't make the performance worse because the system doesn't really work now for serialized task result of size between 10M and spark.akka.frameSize. But yes, the ideal solution is to get the conf and set the right frame size. Maybe we can first request the conf from the driver, and then create a new ActorSystem on the backend with the correct frame size. This saves us from thinking about different deploy modes. Any ActorSystem created using Now I'm testing whether |
pwendell
commented
Jun 19, 2014
@mengxr I think the scenario is where people have set SPARK_JAVA_OPTS in |
pwendell
commented
Jun 19, 2014
@mengxr this actually hung up while running tests: |
AmplabJenkins
commented
Jun 19, 2014
Merged build finished. |
AmplabJenkins
commented
Jun 19, 2014
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15896/ |
AmplabJenkins
commented
Jun 19, 2014
Merged build finished. All automated tests passed. |
AmplabJenkins
commented
Jun 19, 2014
All automated tests passed. |
mengxr
commented
Jun 19, 2014
I don't get it. As long as the actor systems are created from AkkaUtils.createActorSystem, the minimum value of the max frame size is 10M. All unit tests passed on Jenkins. |
kayousterhout
commented
Jun 19, 2014
I see -- you're right about the min frame size. @pwendell was talking about the first case, where I think the config parameter is currently being correctly honored |
mengxr
commented
Jun 19, 2014
Just tested |
mengxr
commented
Jun 19, 2014
@pwendell@kayousterhout I put an alternative solution in #1132 . Please let me know which do you prefer. |
mengxr
commented
Jun 22, 2014
Closing this in favor of #1132. |
This is an alternative solution to #1124 . Before launching the executor backend, we first fetch driver's spark properties and use it to overwrite executor's spark properties. This should be better than #1124. @pwendell Are there spark properties that might be different on the driver and on the executors? Author: Xiangrui Meng <meng@databricks.com> Closes#1132 from mengxr/akka-bootstrap and squashes the following commits: 77ff32d [Xiangrui Meng] organize imports 68e1dfb [Xiangrui Meng] use timeout from AkkaUtils; remove props from RegisteredExecutor 46d332d [Xiangrui Meng] fix a test 7947c18 [Xiangrui Meng] increase slack size for akka 4ab696a [Xiangrui Meng] bootstrap to retrieve driver spark conf
This is an alternative solution to apache#1124 . Before launching the executor backend, we first fetch driver's spark properties and use it to overwrite executor's spark properties. This should be better than apache#1124. @pwendell Are there spark properties that might be different on the driver and on the executors? Author: Xiangrui Meng <meng@databricks.com> Closesapache#1132 from mengxr/akka-bootstrap and squashes the following commits: 77ff32d [Xiangrui Meng] organize imports 68e1dfb [Xiangrui Meng] use timeout from AkkaUtils; remove props from RegisteredExecutor 46d332d [Xiangrui Meng] fix a test 7947c18 [Xiangrui Meng] increase slack size for akka 4ab696a [Xiangrui Meng] bootstrap to retrieve driver spark conf
This is an alternative solution to apache#1124 . Before launching the executor backend, we first fetch driver's spark properties and use it to overwrite executor's spark properties. This should be better than apache#1124. @pwendell Are there spark properties that might be different on the driver and on the executors? Author: Xiangrui Meng <meng@databricks.com> Closesapache#1132 from mengxr/akka-bootstrap and squashes the following commits: 77ff32d [Xiangrui Meng] organize imports 68e1dfb [Xiangrui Meng] use timeout from AkkaUtils; remove props from RegisteredExecutor 46d332d [Xiangrui Meng] fix a test 7947c18 [Xiangrui Meng] increase slack size for akka 4ab696a [Xiangrui Meng] bootstrap to retrieve driver spark conf
This is an alternative solution to apache#1124 . Before launching the executor backend, we first fetch driver's spark properties and use it to overwrite executor's spark properties. This should be better than apache#1124. @pwendell Are there spark properties that might be different on the driver and on the executors? Author: Xiangrui Meng <meng@databricks.com> Closesapache#1132 from mengxr/akka-bootstrap and squashes the following commits: 77ff32d [Xiangrui Meng] organize imports 68e1dfb [Xiangrui Meng] use timeout from AkkaUtils; remove props from RegisteredExecutor 46d332d [Xiangrui Meng] fix a test 7947c18 [Xiangrui Meng] increase slack size for akka 4ab696a [Xiangrui Meng] bootstrap to retrieve driver spark conf
* [CARMEL-6345] Support backup table command * repair * grammer * comment
Task results are sent either via akka directly or block manager indirectly, based on whether the size of the serialized task is smaller than spark.akka.frameSize. However, the result is actually sent back to the driver via the backend actor, which is initialized before receiving the SparkConf and hence it doesn't know the spark.akka.frameSize. That is the root cause of SPARK-1112.
A quick fix is using the min frame size to decide which route to go.
This PR also fixes SPARK-2156.