运行这么多 ruby 进程正常吗?
我的服务器上的某个网站加载时遇到问题,正在运行“top”并看到以下内容:
alt text http://share.shpigford.com/images/ruby_processes-20091112-103834.png
数十个 ruby 进程...我不知道这意味着什么,也不知道这是否正常。 :)
I'm having issues with a site on my server loading and was running 'top' and saw this:
alt text http://share.shpigford.com/images/ruby_processes-20091112-103834.png
Dozens of ruby processes...and I have no idea what that means or if that's normal. :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我有一种感觉,您的 PassengerMaxPoolSize 对于这样的情况设置得太高少量内存。总计起来,您的 ruby 进程就占用了 81% 的可用内存。
请参阅 ServerFault 上的相关讨论。这个问题可能应该迁移到那里。
I have a feeling that your PassengerMaxPoolSize is set too high for such a small amount of memory. Just totaling that up your ruby processes are eating 81% of your available memory.
See this related discussion on ServerFault. This question should probably be migrated over there.
我不知道你的系统上什么是正常的。
在服务器生产环境中,Ruby 通过添加进程来扩展,因此我希望每个 CPU 核心至少看到一个进程。 (真实或虚拟 - 我的 i7 920 有 8 个虚拟核心,需要 8 个 ruby 进程才能实现 100% CPU 负载。)
数十个听起来很多,但如果您的站点使用大量 ruby 来执行各种守护进程,则这是可能的。
我认为您必须询问知道系统上应该运行什么的人。
I don't know what is normal on your system.
In a sever production environment ruby scales by adding processes, so I would expect to see at least one process per CPU core. (Real or virtual - my i7 920 has 8 virtual cores and needs 8 ruby processes for a 100% CPU load.)
Dozens sound like a lot, but it could be possible if your site is using lots of ruby for miscellaneous daemon processes.
I think you'll have to ask someone who knows what is supposed to run on the system.