This is an automated email from the ASF dual-hosted git repository.

ccondit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-site.git


The following commit(s) were added to refs/heads/master by this push:
     new c755615ddc [YUNIKORN-1780] Document application resource usage report 
(#307)
c755615ddc is described below

commit c755615ddc02e77d159feca1e92d6aac272c45b8
Author: Yongjun Zhang <[email protected]>
AuthorDate: Tue Jun 20 12:18:19 2023 -0500

    [YUNIKORN-1780] Document application resource usage report (#307)
    
    Closes: #307
    
    Signed-off-by: Craig Condit <[email protected]>
---
 docs/user_guide/resource_quota_mgmt.md | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/docs/user_guide/resource_quota_mgmt.md 
b/docs/user_guide/resource_quota_mgmt.md
index 9233142a34..04bf73f22b 100644
--- a/docs/user_guide/resource_quota_mgmt.md
+++ b/docs/user_guide/resource_quota_mgmt.md
@@ -332,3 +332,18 @@ The configured placement rule will create the queues, if 
required, and add the a
 
 Since the namespace `finance` is annotated with the example value, and the 
rules are in place.
 Applications in the `finance` namespace will run in the 
`root.production.finance` queue that is created dynamically.
+
+### Application resource usage report
+The sum of the resources consumed by all the pods of an application is the 
total resource usage of the application.
+The resource usage of a pod is measured as `resource-unit times the runtime 
length of the pod`. For example, if the resource of a pod
+is described as `cpu: "100m" memory: "500M"`, then with a runtime of 30 
seconds, the resource consumption will be
+`vcore: 3000, memory: 15000000000`.
+
+YuniKorn logs an application summary line with prefix "`YK_APP_SUMMARY:`" upon 
the application's completion. The summary includes various information about 
the application including the total resource usage. As an example:
+
+`YK_APP_SUMMARY: 
{"appId":"test-app-id","submissionTime":1685487033533,"startTime":1685487035535,"finishTime":1685488714483,"user":"nobody","queue":"root.test-queue","state":"Completed","rmID":"cluster-A","resourceUsage":{"instType1":{"memory":38315403247616,"vcore":1622000},"instType2":{"memory":368171374608384,"vcore":16245000}}}`
+
+For each instance type used by the application, a resource usage entry is 
reported in the summary. The resource usage is reported for both cpu and 
memory, as microcpu-seconds and byte-seconds respectively.
+
+As an example, this information could be ingested into a database table. 
Analysis then could be done to understand historically the needed resources for 
an application in general, and the requirements needed at a queue level for all 
applications scheduled to run in the queue. In addition, the resource usage 
could be translated to resource cost, and charged back to the application owner.
+


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to