Upgrade to Ruby 2.1.0?


(Lee_Ars) #1

So Ruby just bumped their stable to 2.1.0—should us brave souls with nothing better to do for X-mas week try to upgrade, or should we hang back until @sam & co. take some time to examine the potential impacts?

I’m ready to pull the trigger because I’m crazy like that, but wanted to at least check in first.


(Jeff Atwood) #2

I am sure Sam will be on it asap, given his and our interest in better Ruby performance.


#3

Sam’s interest on performance is off the charts! :smile:


(Stéphane Klein) #4

Some news information about it ? Some one have did the test with Ruby 2.1.0 ?


(Sam Saffron) #5

I use Ruby 2.1.0 locally, in particular I use this Ruby 2.1.0:

This is the only Ruby 2.1.0 I would recommend at the moment. The released version has bugs and random segfaults. In fact I stopped travis (our automatic test tool) from running 2.1.0 cause of random segfaults.

Added on that, 2.1.0 as released has a performance regression for “median” request time over 2.0.0 even though avg and high percentiles are noticeably better.

The Github release Aman put together solves these issues thanks to a few patches by @funny_falcon (pool allocator and global method cache replacement)

At this point in time I can only bless the Github release of 2.1.0 which I may be deploying here at some point in the next month or so (something that is fairly simple with our Docker setup)

So please, hold off on 2.1.0 for now, at least until 2.1.1 is released. At that point we can revisit this.


(Stephan) #6

http://ruby-lang.org/en/news/2014/02/24/ruby-2-1-1-is-released/


(Sam Saffron) #7

Its awesome news, though still holding off on a recommendation here due to memory concerns.

If you have no issues with memory usage 2.1.1 should be a fine upgrade.


(Sam Saffron) #8

FYI some more news about memory issues in Ruby 2.1.1

https://bugs.ruby-lang.org/issues/9607


(Sam Saffron) #9

I took it on myself to create a decent Ruby 2.1.1 image for Discourse.

It contains GitHub Ruby with a few more patches by me: (here is the list more or less)

The source and distribution is at: GitHub - SamSaffron/ruby at github_2_1

Of course we are all on Docker so playing with this is SUPER easy. Just add the following to your template definition:

base_image: "samsaffron/discourse_21:1.0"

I am gathering stats at the moment on my blog to see what kind of memory impact this upgrade has, will report back in a week or so.


Bottom line, this release should be faster than the current Ruby we are using, but is likely use up more memory.

If you want to play with this Ruby build, outside of Discourse, you can start with our base image:

docker pull samsaffron/discourse_base_21:1.0

The base image contains nothing specific to Discourse, you can use it as a starting point for any Rails deployment.


(Erlend Sogge Heggen) #10