这是正常的吗? ruby的CPU使用率50%?

发布于 2024-11-14 17:12:26 字数 218 浏览 3 评论 0原文

在 Macbook Pro 一体式 OSX 10.6 Snow Leopard、双核上运行。我注意到活动监视器显示 ruby​​ 进程始终以 50% 的速度运行...

有人看到相同的结果吗?这是“正常”吗?

编辑: 进一步澄清。我的手不在键盘上。 Rails 服务器和 ruby​​ 控制台正在运行,但没有任何活动。我还运行 Rails 3.1 RC1。

Running on Macbook Pro unibody OSX 10.6 Snow Leopard, dual-core. I notice Activity Monitor is stating the ruby process running at 50% consistently...

Is anyone seeing the same results? Is this 'normal'?

EDIT:
Further into clarifying. My hands are not on the keyboard. The Rails server and ruby console are running, but without any activity. I am also running Rails 3.1 RC1.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

合久必婚 2024-11-21 17:12:26

这取决于你在做什么。如果你什么都不做,那就不,这不正常。如果您正在积极开发,那么您可能已经创建了一个无限循环。

It depends on what you are doing. If you do simply nothing, then no, this isn't normal. If you are actively developing, then you might have created an endless loop.

不奢求什么 2024-11-21 17:12:26

通常,一个无限循环使用一个 CPU 核心(在您的情况下使用 50%,因为您的 Mac 具有双核)。

Usually, one infinity loop uses one core of CPU (50% usage in your case, because your Mac has got dual-core).

挽梦忆笙歌 2024-11-21 17:12:26

这并不常见,不。我已经看到它发生了几次,但我不知道为什么......这不是我的代码中的无限循环。我怀疑堆栈深处或解释器中存在竞争条件。我认为,这种情况最常发生在从睡眠事件恢复后。

我只是杀死进程。

It's not common, no. I've seen it happen a few times, but I don't know why.. It's not a endless loop in my code. I suspect a race condition somewhere deep in the stack or in the interpreter. It happens most often after a resume from sleep event I think.

I just kill the process.

删除→记忆 2024-11-21 17:12:26

我已经重新启动了服务器。 Ruby 的 CPU 进程似乎已经下降到更合理的状态/百分比。目前,为0.2。

我开始怀疑是否有什么东西触发了 Rails 3.1 RC1 的 CPU 峰值。毕竟它还不是 Rails 的稳定版本。将观察结果如何。

I've restarted the server. The CPU process for Ruby seems to have subsided to a more reasonable state / percentage. At the moment, at a 0.2.

I'm starting to suspect that something may have triggered a CPU spike with Rails 3.1 RC1. After all, it is still not the stable release of Rails. Will observe how this plays out.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文