[ 
https://issues.apache.org/jira/browse/YARN-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13801840#comment-13801840
 ] 

Jason Lowe commented on YARN-415:
---------------------------------

bq. The most accurate timestamp for a container start/end with respect to 
utilization/chargeback is when the scheduler allocates/releases it, as that's 
the moment that the resource becomes inaccessible/accessible. Is there a reason 
we need to set these with an asynchronous event after the scheduler has 
completed the operation?

The asynchronous event is generated in FiCaSchedulerApp.allocate which is 
already called by the various schedulers right when the container is allocated. 
 Note that the event is timestamped when it is generated not when it is 
received, so the resource usage tracking has an accurate time of allocation 
when performing usage calculations.  Also this is not generating any new events 
rather just using the events which already exist and are required to be sent.

bq.  Why not move the calculation entirely into the scheduler (providing code 
that could be shared across all schedulers).

I'm not seeing how the proposed change is going to make the calculation 
significantly more accurate unless the RM is lagging seriously far behind 
processing events, and the calculation will be accurate once the app completes 
as all events will be processed by that time.

I'm not totally against moving the calculation into FiCaSchedulerApp or 
something similar, but it does create new issues to solve that we didn't have 
before like locking between the scheduler and RMAppAttemptImpl to share this 
resource usage report and making sure it doesn't disappear when the scheduler's 
done with the app.

> Capture memory utilization at the app-level for chargeback
> ----------------------------------------------------------
>
>                 Key: YARN-415
>                 URL: https://issues.apache.org/jira/browse/YARN-415
>             Project: Hadoop YARN
>          Issue Type: New Feature
>          Components: resourcemanager
>    Affects Versions: 0.23.6
>            Reporter: Kendall Thrapp
>            Assignee: Andrey Klochkov
>         Attachments: YARN-415--n2.patch, YARN-415--n3.patch, 
> YARN-415--n4.patch, YARN-415--n5.patch, YARN-415--n6.patch, 
> YARN-415--n7.patch, YARN-415--n8.patch, YARN-415.patch
>
>
> For the purpose of chargeback, I'd like to be able to compute the cost of an
> application in terms of cluster resource usage.  To start out, I'd like to 
> get the memory utilization of an application.  The unit should be MB-seconds 
> or something similar and, from a chargeback perspective, the memory amount 
> should be the memory reserved for the application, as even if the app didn't 
> use all that memory, no one else was able to use it.
> (reserved ram for container 1 * lifetime of container 1) + (reserved ram for
> container 2 * lifetime of container 2) + ... + (reserved ram for container n 
> * lifetime of container n)
> It'd be nice to have this at the app level instead of the job level because:
> 1. We'd still be able to get memory usage for jobs that crashed (and wouldn't 
> appear on the job history server).
> 2. We'd be able to get memory usage for future non-MR jobs (e.g. Storm).
> This new metric should be available both through the RM UI and RM Web 
> Services REST API.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to