News for hackers. Stuff that matters.
Re:Ruby 3x3: Matz, Koichi, and Tenderlove on the Future of R... by DamnYuppie on Thursday November 10, 2016 @06:37PM (#12925750)
I am not sure it doesn't make sense for them to just move over to JRuby and have them all focus their efforts their.
Re:Ruby 3x3: Matz, Koichi, and Tenderlove on the Future of R... by sams99 on Thursday November 10, 2016 @07:02PM (#12925974)
At Discourse our biggest constraint we are fighting now is memory, not performance (don't get me wrong, I wish MRI was faster). JRuby is usually more memory hungry than MRI and getting reasonable boot time is not easy on JRuby.

Additionally we don't even boot on JRuby today, I wish we did but it is hard to justify effort here.

Re:Ruby 3x3: Matz, Koichi, and Tenderlove on the Future of R... by dakull on Thursday November 10, 2016 @07:35PM (#12926241)
Did this help in any way? https://tunemygc.com

Just by playing around with ​ RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR you can reduce memory consumption quite a bit.

Re:Ruby 3x3: Matz, Koichi, and Tenderlove on the Future of R... by sams99 on Thursday November 10, 2016 @07:40PM (#12926280)
I did hand tune stuff

https://github.com/discourse/discourse_docker/blob/master/te...

RUBY_GC_HEAP_GROWTH_MAX_SLOTS is critical without it you get way too much bloat. The default is very problematic I discussed this with ko1 but not sure if we can get a better default in for 2.4.

Re:Ruby 3x3: Matz, Koichi, and Tenderlove on the Future of R... by riffraff on Friday November 11, 2016 @12:59AM (#12928345)
> Additionally we don't even boot on JRuby today

what is the blocking issue there?

Re:Ruby 3x3: Matz, Koichi, and Tenderlove on the Future of R... by ksec on Friday November 11, 2016 @05:08AM (#12929346)
Can you elaborate a little, given how memory is very cheap these days.
Re:Ruby 3x3: Matz, Koichi, and Tenderlove on the Future of R... by specialp on Friday November 11, 2016 @12:50PM (#12932710)
Memory is indeed cheap but the problem is when you run Ruby web services you have every worker taking a minimum of ~400mb. This doesn't sound like much but then with micro-services and other APIs also using that much RAM per worker it adds up fast as all of these servers also need to take this much RAM per concurrent connection you would like to support.

For people starting out that is not so much a problem, but if you have moderate to large traffic you need a lot of machines just for the RAM. This is coupled with the fact that many Ruby libraries eschew streaming of files and connections and put things straight into memory despite Ruby having excellent block constructs that easily allow chunking/streaming. So apps also spike in memory and they need a large overhead as well.

Re:Ruby 3x3: Matz, Koichi, and Tenderlove on the Future of R... by ehsanu1 on Thursday November 10, 2016 @07:00PM (#12925966)
Yeah, jruby+truffle could be pretty amazing for ruby performance.

However, having multiple ruby implementations is great too, and they probably would rather keep working on an independent implementation that they have full control over, and whose goals may not align perfectly with that of other implementations.

Re:Ruby 3x3: Matz, Koichi, and Tenderlove on the Future of R... by dakull on Thursday November 10, 2016 @07:40PM (#12926278)
As they pointed out in the interview - it's not a free meal i.e. one could expect high memory usage and slow start-up times.

For me the slow start-up and the JIT requiring ~50K/req for warm-up just ruin the whole experience in coding the app in Ruby I'd rather just use Elixir.

Another interesting project is IBM's OMR [0] - compared to JRuby there are no slow start-ups and weirdly, being still a dev. preview it can run Rails and its deps. without issues, even better than Rubinius stable.

[0] - https://github.com/rubyomr-preview/rubyomr-preview

Re:Ruby 3x3: Matz, Koichi, and Tenderlove on the Future of R... by ehsanu1 on Thursday November 10, 2016 @09:12PM (#12926830)
50k requests seems excessive, are you sure about that? :) Of course it depends on the implementation particulars, and profile-guided optimization may help, but needing a couple thousand requests to warm up is not so bad for a web application server that will see 100x as many requests as that.

If we're very lucky, Substrate VM will be released at some point, solving the startup time issues (and I believe many of the JIT issues, though less clear on that): http://lafo.ssw.uni-linz.ac.at/papers/2013_JVMLanguageSummit...

The OMR project definitely looks interesting, but it doesn't seem to be actively developed (or perhaps the most recent commits are just not public yet). But if it works that well, then maybe there's no need, hah. Will have to try it out.

Re:Ruby 3x3: Matz, Koichi, and Tenderlove on the Future of R... by magaudet on Thursday November 10, 2016 @11:10PM (#12927690)
Hey, OMR developer here.

Ruby+OMR is developed in three pieces: 1) the language independent core, then 2) The language dependent portions (i.e., the VM, and what we call the 'glue')

The language independent core is here: https://github.com/eclipse/omr. It's under active development, :)

I'm actually working on Ruby 2.4 support right now (supremely not prime time, but if you're curious, the branch is here: https://github.com/mgaudet/ruby/tree/ruby_2_4_omr_preliminar...)

Re:Ruby 3x3: Matz, Koichi, and Tenderlove on the Future of R... by dakull on Friday November 11, 2016 @11:22AM (#12932035)
Hi! - why not release a working version for Ruby 2.3? or heck even 2.2 for general use. That would be useful and maybe generate some form of traction.
Re:Ruby 3x3: Matz, Koichi, and Tenderlove on the Future of R... by igravious on Thursday November 10, 2016 @10:47PM (#12927530)
> but it doesn't seem to be actively developed

The source code is here: https://github.com/rubyomr-preview/ruby

Seems the code is being developed internally to IBM. First the docker images of the OMR tech preview were dropped about a year ago. The the source was dropped recently. Targets Ruby 2.2 so I'm going to open an issue asking about targeting 2.3 and folding this work into trunk.

   $ git clone https://github.com/rubyomr-preview/ruby.git --branch ruby_2_2_omr --recursive 
   $ cd ruby
   $ autoconf
   $ ./configure SPEC=linux_x86-64 --with-omr-jit
   $ make
   $ make install
This should build it for you to try out. I urge others to try it out and give feedback.
Re:Ruby 3x3: Matz, Koichi, and Tenderlove on the Future of R... by magaudet on Thursday November 10, 2016 @11:12PM (#12927702)
Hey! thanks for the shout out. I would totally love to see more feedback as well!

We haven't turned on the issue tracker on that repo, but the glue has it's issues turned on: https://github.com/rubyomr-preview/rbjitglue

Working on smoothing this out a bit, and also currently working on upgrading the JIT to target 2.4

Re:Ruby 3x3: Matz, Koichi, and Tenderlove on the Future of R... by igravious on Thursday November 10, 2016 @11:28PM (#12927823)
Thank you for pushing Ruby performance forward! :)
Re:Ruby 3x3: Matz, Koichi, and Tenderlove on the Future of R... by MrBra on Thursday November 10, 2016 @08:14PM (#12926480)
I don't think everyone likes depending on Java.