Skip to content
View nateberkopec's full-sized avatar

Sponsoring

@matz

Organizations

@puma

Block or report nateberkopec

Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
nateberkopec/README.md

Hi, I make websites and services faster and more scalable.

GPG Signing Policy: I sign commits which I have 100% verified with my own human review. Unsigned commits may be made by autonomous AI agents, whose work has not been reviewed in depth by me.

Pinned Loading

  1. A Guide to GC.stat A Guide to GC.stat
    1
    Most Ruby programmers don't have any idea how garbage collection works in their runtime - what triggers it, how often it runs, and what is garbage collected and what isn't. That's not entirely a bad thing - garbage collection in dynamic languages like Ruby is usually pretty complex, and Ruby programmers are better off just focusing on writing code that matters for their users. 
    2
    
                  
    3
    But, occasionally, you get bitten by GC - either it's running too often or not enough, or your process is using tons of memory but you don't know why. Or maybe you're just curious about how GC works! 
    4
    
                  
    5
    One way we can learn a bit about garbage collection in CRuby (that is, the standard Ruby runtime, written in C) is to look at the built-in `GC` module. If you haven't [read the docs](https://ruby-doc.org/core-2.4.0/GC.html) of this module, check it out. There's a lot of interesting methods in there. But for right now, we're just going to look at one: `GC.stat`. 
  2. puma/puma puma/puma Public

    A Ruby/Rack web server built for parallelism

    Ruby 7.9k 1.5k

  3. dotfiles dotfiles Public

    yup we're doin the thing

    Ruby 102 4