TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The Cost of Ruby 1.9.3's GC::Profiler

70 点作者 joegaudet超过 12 年前

6 条评论

cheald超过 12 年前
For what it's worth, I checked Newrelic's gem (which is what I use to monitor my GC), and it does clean up after itself by invoking GC::Profiler::clear after a run.<p>Still though, that's ugly. There are a number of places where Ruby as a systems scripting language (small scripts, short runtime) really clashes with Ruby as an application language (large apps, long runtime), and the GC seems to be at the heart of most of them.
评论 #4807490 未加载
评论 #4807351 未加载
VeejayRampay超过 12 年前
Very interesting article but the bit about Ruby's GC being a "steaming pile of shit" sounds pretty immature and is really unwarranted. The technical merits of the article alone should be enough for the author to avoid having to resort to such extremities. Just my two cents.
评论 #4806899 未加载
评论 #4807479 未加载
charliesome超过 12 年前
Instead of writing your own profiler, it might be worth contributing your improvements back to Ruby itself.<p>Create an account on the bug tracker (<a href="http://bugs.ruby-lang.org" rel="nofollow">http://bugs.ruby-lang.org</a>) and open an issue with a patch attached. I've sent a few patches in to Ruby in the past and they're always pretty appreciative of the contribution.
narsil超过 12 年前
I've been executing long-running scripts that handle map-reduce jobs in production and ruby's garbage collector is by far the worst I've had to deal with. Other python and java processes running similar operations handle this much better. It was equally parts sad and hilarious when I realized that even the GC profiler needed clean up or it would hose our system after a few days.
headius超过 12 年前
MRI does GC runs like they're going out of style. I recently did some comparisons with JRuby and saw 100x more GC runs on MRI, and easily 10x more time doing those runs. GC::Profiler ends up eating a crapload of memory as a result.<p>Check out slide 37 and surrounding slides. If you're complaining about GC and aren't giving JRuby a shot, you're missing out. <a href="http://www.slideshare.net/CharlesNutter/why-jruby-rubyconf-2012" rel="nofollow">http://www.slideshare.net/CharlesNutter/why-jruby-rubyconf-2...</a>
ice799超过 12 年前
lolruby