Ruby 2.2 Support? #11

Open
samnang opened this Issue Jan 3, 2015 · 9 comments

Comments

Projects
None yet
6 participants
@samnang

samnang commented Jan 3, 2015

After I upgraded my Rails(4.1.8) to Ruby 2.2.0. I notice some error messages in my logs:

app web.1     - - E, [2015-01-02T04:19:12.265987 #12] ERROR -- : listen loop error: unknown key: old_object (ArgumentError)
app web.1     - - E, [2015-01-02T04:19:12.266103 #12] ERROR -- : /app/vendor/bundle/ruby/2.2.0/gems/gctools-0.2.3/lib/gctools/oobgc/unicorn_middleware.rb:14:in `run'
app web.1     - - E, [2015-01-02T04:19:12.266146 #12] ERROR -- : /app/vendor/bundle/ruby/2.2.0/gems/gctools-0.2.3/lib/gctools/oobgc/unicorn_middleware.rb:14:in `process_client'
app web.1     - - E, [2015-01-02T04:19:12.266177 #12] ERROR -- : /app/vendor/bundle/ruby/2.2.0/gems/unicorn-worker-killer-0.4.2/lib/unicorn/worker_killer.rb:51:in `process_client'
app web.1     - - E, [2015-01-02T04:19:12.266207 #12] ERROR -- : /app/vendor/bundle/ruby/2.2.0/gems/unicorn-worker-killer-0.4.2/lib/unicorn/worker_killer.rb:124:in `process_client'
app web.1     - - E, [2015-01-02T04:19:12.266237 #12] ERROR -- : /app/vendor/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:670:in `worker_loop'
app web.1     - - E, [2015-01-02T04:19:12.266267 #12] ERROR -- : /app/vendor/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:525:in `spawn_missing_workers'
app web.1     - - E, [2015-01-02T04:19:12.266296 #12] ERROR -- : /app/vendor/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:140:in `start'
app web.1     - - E, [2015-01-02T04:19:12.266324 #12] ERROR -- : /app/vendor/bundle/ruby/2.2.0/gems/unicorn-4.8.3/bin/unicorn:126:in `<top (required)>'
app web.1     - - E, [2015-01-02T04:19:12.266354 #12] ERROR -- : /app/vendor/bundle/ruby/2.2.0/bin/unicorn:23:in `load'
app web.1     - - E, [2015-01-02T04:19:12.266381 #12] ERROR -- : /app/vendor/bundle/ruby/2.2.0/bin/unicorn:23:in `<main>'

I was wondering do we still suppose to use it on Ruby 2.2? Or it should only be used on Ruby 2.1?

@tmm1

This comment has been minimized.

Show comment
Hide comment
@tmm1

tmm1 Jan 3, 2015

Owner

oobgc is unnecessary in Ruby 2.2, since it includes an incremental GC (RIncGC) and will not pause the world for a long time.

Owner

tmm1 commented Jan 3, 2015

oobgc is unnecessary in Ruby 2.2, since it includes an incremental GC (RIncGC) and will not pause the world for a long time.

@samnang

This comment has been minimized.

Show comment
Hide comment

samnang commented Jan 3, 2015

Thank @tmm1 .

@samnang samnang closed this Jan 3, 2015

@tmm1

This comment has been minimized.

Show comment
Hide comment
@tmm1

tmm1 Jan 3, 2015

Owner

I'm going to leave this open (so others can find it) until I get a chance to update the README.

Owner

tmm1 commented Jan 3, 2015

I'm going to leave this open (so others can find it) until I get a chance to update the README.

@tmm1 tmm1 reopened this Jan 3, 2015

hale added a commit to hale/gctools that referenced this issue Mar 21, 2015

Update README.md
Add a note about Ruby 2.2 compatibility.

closes #11
@noach-cellogicmobile

This comment has been minimized.

Show comment
Hide comment
@noach-cellogicmobile

noach-cellogicmobile Jan 20, 2016

Any chance you might merge hale's pull request? I, too, inferred that gctools was still relevant to Ruby >= 2.2, since the repo had recent commits but had no mention of being obsolete. Thanks!

Any chance you might merge hale's pull request? I, too, inferred that gctools was still relevant to Ruby >= 2.2, since the repo had recent commits but had no mention of being obsolete. Thanks!

@justindowning

This comment has been minimized.

Show comment
Hide comment
@justindowning

justindowning Jun 7, 2016

@tmm1 I believe v0.2.4 supports ruby >= 2.2 quite well now.

@tmm1 I believe v0.2.4 supports ruby >= 2.2 quite well now.

@thedrow

This comment has been minimized.

Show comment
Hide comment
@thedrow

thedrow Jun 19, 2016

So if it's not needed in 2.2 what does it do when we run it in Ruby 2.2?

thedrow commented Jun 19, 2016

So if it's not needed in 2.2 what does it do when we run it in Ruby 2.2?

@justindowning

This comment has been minimized.

Show comment
Hide comment
@justindowning

justindowning Jun 20, 2016

@thedrow I believe it "just works". I think this commit adds support for the ruby 2.2 symbol name.

I'm using it with Rails 4 + Ruby 2.3 just fine.

justindowning commented Jun 20, 2016

@thedrow I believe it "just works". I think this commit adds support for the ruby 2.2 symbol name.

I'm using it with Rails 4 + Ruby 2.3 just fine.

@thedrow

This comment has been minimized.

Show comment
Hide comment
@thedrow

thedrow Jun 21, 2016

I'm confused. It doesn't fail but it does nothing useful on 2.2? Or does it still provide a benefit when running under MRI Ruby 2.2?

thedrow commented Jun 21, 2016

I'm confused. It doesn't fail but it does nothing useful on 2.2? Or does it still provide a benefit when running under MRI Ruby 2.2?

@evazion evazion referenced this issue in r888888888/danbooru Oct 10, 2016

Closed

Upgrade to Ruby 2.3 #2712

@peteygao

This comment has been minimized.

Show comment
Hide comment
@peteygao

peteygao Jan 25, 2017

The answer to "is there a benefit" is... wait for it... workload dependent. Tada! What a shocker!

RIncGC behaves differently from a web-request-based "Out-of-band GC", so you can't replace one with the other and expect the exact same performance behaviour.

If your app spawns a lot of temp vars and triggers multiple GC runs during every request, and you'd like to have a clean slate before every new request (and avoid triggering as many GC during requests--remember, RIncGC still slows your app down, they just won't block for the entire duration of a GC run), then OOBGC can still be helpful. If, on the other hand, you've kept your app pretty light and there isn't a lot of garbage created per request, and a GC is only triggered once every few requests, then OOBGC will actually hurt you (very slightly) than give any benefits.

However, these are broad stroke assumptions! You MUST profile your specific app!

Where assumption and reality diverge is where you'll have performance issues.

The answer to "is there a benefit" is... wait for it... workload dependent. Tada! What a shocker!

RIncGC behaves differently from a web-request-based "Out-of-band GC", so you can't replace one with the other and expect the exact same performance behaviour.

If your app spawns a lot of temp vars and triggers multiple GC runs during every request, and you'd like to have a clean slate before every new request (and avoid triggering as many GC during requests--remember, RIncGC still slows your app down, they just won't block for the entire duration of a GC run), then OOBGC can still be helpful. If, on the other hand, you've kept your app pretty light and there isn't a lot of garbage created per request, and a GC is only triggered once every few requests, then OOBGC will actually hurt you (very slightly) than give any benefits.

However, these are broad stroke assumptions! You MUST profile your specific app!

Where assumption and reality diverge is where you'll have performance issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment