Sage Maker Studio CPU 使用率 [英] Sage Maker Studio CPU Usage

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

问题描述

我在 sage maker studio 工作,我有一个实例运行一项计算密集型任务:

I'm working in sage maker studio, and I have a single instance running one computationally intensive task:

运行我的任务的内核似乎已用尽,但实际实例仅使用了少量资源.是否发生了某种节流?我可以配置它以便使用更多的实例吗?

It appears that the kernel running my task is maxed out, but the actual instance is only using a small amount of its resources. Is there some sort of throttling occurring? Can I configure this so that more of the instance is utilized?

推荐答案

您的 ml.c5.xlarge 实例带有 4 个 vCPU.然而,Python 默认只使用一个 CPU.(来源:我可以将多线程应用于计算密集型任务吗?蟒蛇?)

Your ml.c5.xlarge instance comes with 4 vCPU. However, Python only uses a single CPU by default. (Source: Can I apply multithreading for computationally intensive task in python?)

因此,您的 ml.c5.xlarge 实例的总体 CPU 利用率很低.要利用所有 vCPU,您可以尝试多处理.

As a result, the overall CPU utilization of your ml.c5.xlarge instance is low. To utilize all the vCPUs, you can try multiprocessing.

以下示例使用 2 vCPU + 4 GiB 实例执行.

The examples below are performed using a 2 vCPU + 4 GiB instance.

在第一张图中,未设置多处理.实例 CPU 利用率在 50% 左右达到峰值.

In the first picture, multiprocessing is not set up. The instance CPU utilization peaks at around 50%.

单处理:

在第二张图中,我创建了 50 个同时运行的进程.实例 CPU 利用率立即上升到 100%.

In the second picture, I created 50 processes to be run simultaneously. The instance CPU utilization rises to 100% immediately.

多处理:

这篇关于Sage Maker Studio CPU 使用率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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