-
Notifications
You must be signed in to change notification settings - Fork 81
Add resource requirements for Volcano installation #419
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
base: master
Are you sure you want to change the base?
Changes from all commits
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 | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -122,3 +122,58 @@ job.batch/volcano-admission-init 1/1 28s 6m10s | |||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| 一切配置就绪,您可以开始使用 Volcano 部署 AI/ML 和大数据负载了。现在您已经完成了 Volcano 的全部安装,您可以运行如下的例子测试安装的正确性:[样例](https://github.com/volcano-sh/volcano/tree/master/example) | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| ## 资源要求 | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| Volcano pod请求的资源可以按如下方式自定义: | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| ```yaml | ||||||||||||||||||||||||||||||||||
| # container resources | ||||||||||||||||||||||||||||||||||
| resources: | ||||||||||||||||||||||||||||||||||
| requests: | ||||||||||||||||||||||||||||||||||
| cpu: 500m | ||||||||||||||||||||||||||||||||||
| memory: 500Mi | ||||||||||||||||||||||||||||||||||
| limits: | ||||||||||||||||||||||||||||||||||
| cpu: 2 | ||||||||||||||||||||||||||||||||||
| memory: 2Gi | ||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| 其中volcano-admission组件的资源配额设置与集群规模有关,参见表1。 | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| 表1 volcano-admission的建议值 | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| | 集群规模 | CPU Request(m) | CPU Limit(m) | Memory Request(Mi) | Memory Limit(Mi) | | ||||||||||||||||||||||||||||||||||
| | -------------- | -------------- | ------------ | ------------------ | ---------------- | | ||||||||||||||||||||||||||||||||||
| | 50节点 | 200 | 500 | 500 | 500 | | ||||||||||||||||||||||||||||||||||
| | 200节点 | 500 | 1000 | 1000 | 2000 | | ||||||||||||||||||||||||||||||||||
| | 1000节点及以上 | 1500 | 2500 | 3000 | 4000 | | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| volcano-controller和volcano-scheduler组件的资源配额设置与集群节点和Pod规模相关,其建议值如下: | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - 小于100个节点,可使用默认配置,即CPU的申请值为500m,限制值为2000m;内存的申请值为500Mi,限制值为2000Mi。 | ||||||||||||||||||||||||||||||||||
| - 高于100个节点,每增加100个节点(10000个Pod),建议CPU的申请值增加500m,内存的申请值增加1000Mi;CPU的限制值建议比申请值多1500m,内存的限制值建议比申请值多1000Mi。 | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| 申请值推荐计算公式: | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - CPU申请值:计算“目标节点数 * 目标Pod规模”的值,并在表2中根据“集群节点数 * Pod规模”的计算值进行插值查找,向上取最接近规格的申请值及限制值。 | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| 例如2000节点和2w个Pod的场景下,“目标节点数 * 目标Pod规模”等于4000w,向上取最接近的规格为700/7w(“集群节点数 * Pod规模”等于4900w),因此建议CPU申请值为4000m,限制值为5500m。 | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+159
to
+161
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 explanation for calculating the requested CPU is a bit complex and could be hard to follow. Phrases like "插值查找" (interpolation search) and "向上取最接近规格" (round up to the closest spec) could be simplified for better readability. Consider rephrasing to be more direct, for example: |
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - 内存申请值:建议每1000个节点分配2.4Gi内存,每1w个Pod分配1Gi内存,二者叠加进行计算。(该计算方法相比表2中的建议值会存在一定的误差,通过查表或计算均可) | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| 即:内存申请值 = 目标节点数/1000 * 2.4Gi + 目标Pod规模/1w * 1Gi。例如2000节点和2w个Pod的场景下,内存申请值 = 2 * 2.4Gi + 2 * 1G = 6.8Gi。 | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| 表2 volcano-controller和volcano-scheduler的建议值 | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| | 集群节点数/Pod规模 | CPU Request(m) | CPU Limit(m) | Memory Request(Mi) | Memory Limit(Mi) | | ||||||||||||||||||||||||||||||||||
| | ------------------ | -------------- | ------------ | ------------------ | ---------------- | | ||||||||||||||||||||||||||||||||||
| | 50/5k | 500 | 2000 | 500 | 2000 | | ||||||||||||||||||||||||||||||||||
| | 100/1w | 1000 | 2500 | 1500 | 2500 | | ||||||||||||||||||||||||||||||||||
| | 200/2w | 1500 | 3000 | 2500 | 3500 | | ||||||||||||||||||||||||||||||||||
| | 300/3w | 2000 | 3500 | 3500 | 4500 | | ||||||||||||||||||||||||||||||||||
| | 400/4w | 2500 | 4000 | 4500 | 5500 | | ||||||||||||||||||||||||||||||||||
| | 500/5w | 3000 | 4500 | 5500 | 6500 | | ||||||||||||||||||||||||||||||||||
| | 600/6w | 3500 | 5000 | 6500 | 7500 | | ||||||||||||||||||||||||||||||||||
| | 700/7w | 4000 | 5500 | 7500 | 8500 | | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+171
to
+178
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. In Table 2, the "集群节点数/Pod规模" column uses a mix of
Suggested change
|
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
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.
The explanation for calculating the requested CPU is a bit complex and could be hard to follow. Phrases like "perform interpolation search" and "round up the request value and limit value that are closest to the specifications" could be simplified for better readability.
Consider rephrasing to be more direct, for example:
"To determine the CPU request, first calculate the product of the target number of nodes and pods. Then, find the row in Table 2 where the product of 'Nodes' and 'Pods' is the smallest value that is greater than or equal to your calculated product. Use the CPU request and limit from that row."