ServicePackageResourceGovernancePolicy CpuCores [英] ServicePackageResourceGovernancePolicy CpuCores

查看:140
本文介绍了ServicePackageResourceGovernancePolicy CpuCores的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,有...


背景:

我们限制服务使用的CpuCores数量在ApplicationManifest.xml中使用ServicePackageResourceGovernancePolicy 

例如

  < ServiceManifestImport>

..

  &NBSP; <政策>

  &NBSP; &NBSP; < ServicePackageResourceGovernancePolicy CpuCores =" [Web1_CPUCores]" />

  &NBSP; < / policies>

  < / ServiceManifestImport>
$


为每个环境覆盖参数Web1_CPUCores。 



问题:

一个环境只有2个可用的cpu核心,因此我们不希望为该环境应用该策略。通过实证测试,我们发现当我们将CpuCores设置为0时,策略不会被应用于
,例如Get-ServiceFabricClusterLoadInformation将ClusterLoad显示为 
$


LoadMetricInformation  &NBSP;  :

...

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; LoadMetricName&NBSP; &NBSP; &NBSP; &NBSP; :servicefabric:/ _ CpuCores

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; ClusterCapacity&NBSP; &NBSP; &NBSP;  :6

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; ClusterLoad&NBSP; &NBSP; &NBSP; &NBSP; &NBSP;  :0

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; ClusterRemainingCapacity:6

...
$


请确认这是正确的,并指出任何确认这一点的文件。



解决方案

您是否检查过该文档以查看是否存在回答你的问题? 


https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-resource-governance


Hi there,

Background:
We are restricting the number of CpuCores used by a service by using the ServicePackageResourceGovernancePolicy in ApplicationManifest.xml 
e.g.
  <ServiceManifestImport>
..
    <Policies>
      <ServicePackageResourceGovernancePolicy CpuCores="[Web1_CPUCores]" />
    </Policies>
  </ServiceManifestImport>

The parameter Web1_CPUCores is overridden for each of the environment. 

Question:
One environment has only 2 cpu cores available so we don't want to apply the policy for that environment. With empirical testing we found that when we set the CpuCores to 0 the policy doesn't get applied
e.g. Get-ServiceFabricClusterLoadInformation shows the ClusterLoad as 

LoadMetricInformation     :
...
                            LoadMetricName        : servicefabric:/_CpuCores
                            ClusterCapacity       : 6
                            ClusterLoad           : 0
                            ClusterRemainingCapacity : 6
...

Please confirm this is correct and point to any documentation confirming this.


解决方案

Have you checked the doc on this to see if it answers your questions? 

https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-resource-governance


这篇关于ServicePackageResourceGovernancePolicy CpuCores的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆