gpt4 book ai didi

google-cloud-platform - GCP 上 f1-micro 的 CPU 使用率是多少?

转载 作者:行者123 更新时间:2023-12-04 23:51:31 25 4
gpt4 key购买 nike

我的 f1-micro 实例的实例详细信息显示了 CPU 利用率在 8% 到 15% 之间波动的图表,但比例是多少? f1-micro 有 0.2 个 CPU,那么我的最大 20% 是多少?或者图中的 100% 是否标记了我 20% 的 CPU?有时图表会超过 20%,但它会爆炸吗?或者图中的爆破是从 100% 开始的吗?

提高性能的建议始终显示。这只是销售策略吗? VM 是看门狗,因此它不会做太多事情。

最佳答案

我尝试建立一个小测试来回答您的问题,如果有兴趣,您可以做同样的事情来仔细检查。

测试

我创建了两个实例,一个是 f1-micro,一个是 n1-standard-1,然后我使用 stress 强制 CPU 突发, 但您可以使用您选择的任何工具。

$ sudo apt-get install stress
$ stress --cpu 1 & top

通过这种方式,我们可以将两个实例的 top 输出与仪表板中显示的输出进行比较,因为操作系统不知道共享 CPU,所以我们期望 100% 看到从机器内部。

结果

虽然这两个实例的 top 输出都按预期显示当前使用了 99.9% 的 CPU,但仪表板的输出更有趣。

  • n1-standard-1 始终保持在 100% 左右的稳定值。

  • f1-micro 显示初始峰值达到 250%(因为它使用分配的 CPU 的更大份额,即它在突发模式下运行)然后减少到 100 %.

我重复了几次测试,每次都得到相同的行为,因此 % 指的是您当前使用的 CPU 份额。

此功能已记录 here :

"f1-micro machine types offer bursting capabilities that allow instances to use additional physical CPU for short periods of time. Bursting happens automatically when your instance requires more physical CPU than originally allocated"

另一方面,如果您想了解更多有关这些建议及其工作原理的信息,可以查看 Official Documentation .

关于google-cloud-platform - GCP 上 f1-micro 的 CPU 使用率是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48126912/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com