Top all-time · #8740
@tmm1
Personal blog · tmm1.netprogramming
@tmm1 is a personal blog at tmm1.net about programming. Since 2013, 8 different Hacker News readers have linked it 14 times, most often “Ruby 2.1: Out-of-Band GC”. The last post was in 2014, but the archive is still widely read.
Too few sampled comments (8) to say how often HN recommends it.?
Why HN links it
HN readers link tmm1's posts on Ruby 2.1 internals, mainly out-of-band GC, the method cache and GC tuning. One commenter points to the other posts as a way to learn about new Ruby 2.1 features.
Summarised by Claude from a sample of 8 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Most-linked posts?
- Ruby 2.1: Out-of-Band GC3 people · 3 mentions · first linked 2014-01-30
- Garbage Collection in Ruby 2.13 people · 3 mentions · first linked 2013-12-30
- /ruby21-method-cache/2 people · 2 mentions · first linked 2013-12-24
What Hacker News says?
In the Ruby world this is called "out-of-band GC" and is supported by multiple application servers: http://tmm1.net/ruby21-oobgc/
Comment linking /ruby21-oobgc/
on “PyPy for low-latency systems”Submitted Garbage Collection in Ruby 2.1 as a story · 163 points
HN discussion> (you are using Unicorn, right? You should be!) No, you should be using Puma.[0] Unicorn is a work of art and it is incredibly simple, but with that comes a lot of waste. Puma won't fix this problem as it lies in MRI, but you will be able to run way less processes so total memory consumption won't be such an issue. Ruby 2.1 comes with an asterisk. It's a lot faster but you should take some time to tune the GC to yo…
Comment linking /
on “Ruby Garbage Collection: Still Not Ready for Production”Submitted Ruby 2.1: Out-of-Band GC as a story · 139 points
HN discussionI insist, it's mostly solved: http://tmm1.net/ruby21-method-cache/
Comment linking /ruby21-method-cache/
on “The Dynamic Def – abusing Ruby's def statement”Submitted Ruby 2.1: Profiling Ruby as a story · 102 points
HN discussionMany styles are implemented that way. Check out Java for (many) examples.[1] Naively, with Ruby's mark-sweep collector[2], you might want to do the sweep phase in parallel, adding garbage blocks to the free list. You could do the mark phase as well, with I believe a pause to make the marks a consistent snapshot. [1] http://www.oracle.com/technetwork/java/javase/tech/g1-intro-... , for one. [2] http://tmm1.net/ruby21…
Comment linking /ruby21-rgengc/
on “Ruby 2.1: Out-of-Band GC”Submitted Ruby 2.1: Process.clock_gettime as a story · 15 points
HN discussionThe https://github.com/simeonwillbanks/busted gem provides some nice helpers around RubyVM.stat for finding cache invalidations. It can also take advantage of the dtrace/systemtap probes that shipped with ruby 2.1 ( http://tmm1.net/ruby21-method-cache ) which can be used as an alternative to the ftrace technique described in the blog post.
Comment linking /ruby21-method-cache
on “Tuning Ruby's Global Method Cache”That's actually a huge help. What I've also been looking for (and haven't been able to find) is a good guide on How to Tune your GC settings. Aman Gupta has gotten the closest so far* (I think), but I'd really love a step-by-step of "OK, open your console, run `GC.start`, take note of this property because it means X and indicates that Y would be a good setting for Z, etc. etc" * http://tmm1.net/ruby21-rgengc/
Comment linking /ruby21-rgengc/
on “Incremental GC in Ruby MRI”If you're on heroku (or similarly memory-constrained VPS), it's worth noting that 2.1+ can use significantly more memory. I've been collecting bookmarks on how to properly tune the GC environment variables in these situations -- hopefully they'll help someone else: Heroku discussion: https://discussion.heroku.com/t/tuning-rgengc-2-1-on-heroku/... Using Out-of-band GC on 2.1: http://tmm1.net/ruby21-oobgc/
Comment linking /ruby21-oobgc/
on “Incremental GC in Ruby MRI”Take a look at the other posts by @tmm1 as well to learn about cool new Ruby 2.1 things: http://tmm1.net/ruby21-process-setproctitle/ http://tmm1.net/ruby21-fstrings/ http://tmm1.net/ruby21-method-cache/
Comment linking /ruby21-method-cache/
on “Ruby 2.1: Process.clock_gettime”