Skip to content
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

Fixed resources used/wasted computation for spark jobs - (Depends on Custom SHS - Requires peakJvmUsedMemory metric) #287

Merged
merged 4 commits into from
Jan 10, 2018

Conversation

skakker
Copy link
Contributor

@skakker skakker commented Sep 12, 2017

Fixed the calculation of resources used/wastage, now the resources used is calculated by summing up the resources used by each executor as opposed to before where the executors were assumed to use the entire memory allocated for them. The resources allocated for use is also calculated by multiplying the time spent by each executor with the total memory allocated for an executor, and then summing them up.

val totalExecutorTaskTimeMillis = totalExecutorTaskTimeMillisOf(data)

val resourcesAllocatedForUse =
aggregateresourcesAllocatedForUse(executorInstances, executorMemoryBytes, applicationDurationMillis)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allocated resources should take care of the dynamic allocation.

var sumResourceUsage: BigInt = 0
executorSummaries.foreach(
executorSummary => {
var memUsed: Long = executorSummary.peakJvmUsedMemory.getOrElse(JVM_USED_MEMORY, 0) //+ MemoryFormatUtils.stringToBytes("300M")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to add a buffer on top of the peak memory.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable "resourcesActuallyUsedWithBuffer" (line no: 64) is the resource usage with buffer and for calculating resources wasted, this value is being considered.

@shkhrgpt
Copy link
Contributor

shkhrgpt commented Oct 5, 2017

I think it would good if you can provide a brief description of this PR. It helps in the review.
Thanks.

@skakker
Copy link
Contributor Author

skakker commented Oct 6, 2017

@shkhrgpt: Done

Copy link
Contributor

@akshayrai akshayrai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Peak JVM Used Memory is not part of the upstream public Spark Release. Otherwise this looks good.

@akshayrai akshayrai changed the title Fixed resources used/wasted computation for spark jobs Fixed resources used/wasted computation for spark jobs - (Depends on Custom SHS - Requires peakJvmUsedMemory metric) Jan 10, 2018
@skakker skakker changed the base branch from master to customSHSWork January 10, 2018 06:13
@akshayrai akshayrai merged commit 17e2e65 into linkedin:customSHSWork Jan 10, 2018
akshayrai pushed a commit that referenced this pull request Feb 21, 2018
…Custom SHS - Requires peakJvmUsedMemory metric) (#287)
akshayrai pushed a commit that referenced this pull request Feb 27, 2018
…Custom SHS - Requires peakJvmUsedMemory metric) (#287)
akshayrai pushed a commit that referenced this pull request Mar 6, 2018
…Custom SHS - Requires peakJvmUsedMemory metric) (#287)
arpang pushed a commit to arpang/dr-elephant that referenced this pull request Mar 14, 2018
akshayrai pushed a commit that referenced this pull request Mar 19, 2018
…Custom SHS - Requires peakJvmUsedMemory metric) (#287)
akshayrai pushed a commit that referenced this pull request Mar 19, 2018
…Custom SHS - Requires peakJvmUsedMemory metric) (#287)
akshayrai pushed a commit that referenced this pull request Mar 30, 2018
…Custom SHS - Requires peakJvmUsedMemory metric) (#287)
akshayrai pushed a commit that referenced this pull request Apr 6, 2018
…Custom SHS - Requires peakJvmUsedMemory metric) (#287)
akshayrai pushed a commit that referenced this pull request May 21, 2018
…Custom SHS - Requires peakJvmUsedMemory metric) (#287)
pralabhkumar pushed a commit to pralabhkumar/dr-elephant that referenced this pull request Aug 31, 2018
varunsaxena pushed a commit that referenced this pull request Oct 16, 2018
…Custom SHS - Requires peakJvmUsedMemory metric) (#287)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants