News for hackers. Stuff that matters.
Re:Ruby Garbage Collection: Still Not Ready for Production by noelwelsh on Friday March 28, 2014 @12:47PM (#7488368)
Why not use the JVM (e.g. JRuby)? These problems have long been solved (if they ever occurred to start with.)
Re:Ruby Garbage Collection: Still Not Ready for Production by gdeglin on Friday March 28, 2014 @01:07PM (#7488504)
http://www.isrubyfastyet.com/ seems to show that Rails+JRuby performance remains disappointingly bad. The memory usage is kind of nuts too, not sure why it's so high.

Edit:

This page explains the high memory usage and it seems more reasonable now: https://github.com/jruby/jruby/wiki/Troubleshooting-Memory-U...

Re:Ruby Garbage Collection: Still Not Ready for Production by teacup50 on Saturday March 29, 2014 @12:36AM (#7491430)
These benchmarks are uselessly bad:

- The client connections are run without concurrency, serially, on the same machine: https://github.com/brianhempel/isrubyfastyet/blob/master/run...

- The JIT is only given 3 seconds to warm up: https://github.com/brianhempel/isrubyfastyet/blob/master/run... -- HotSpot kicks ass, but not after only 3 seconds of serially issued requests.

- By running the tests single-threaded, they're throwing away one of the major wins of the JVM -- low overhead concurrency.

Re:Ruby Garbage Collection: Still Not Ready for Production by RyanZAG on Friday March 28, 2014 @03:01PM (#7489264)
I think this would be a better benchmark than that one as it runs a more apples-apples comparison:

http://www.techempower.com/benchmarks/#section=data-r8&hw=i7...

Re:Ruby Garbage Collection: Still Not Ready for Production by rubiquity on Friday March 28, 2014 @12:59PM (#7488452)
I think a lot of Rubyists unfortunately don't write thread safe code :( I've worked on many Rails apps that have some mutable state on the ApplicationController and the models. Also, developing on the JVM requires a change in tooling that a lot of Rubyists aren't used to, as well as the slow JVM start up times which can make TDD with JRuby a pain. JRuby is consistently getting better, though.
Re:Ruby Garbage Collection: Still Not Ready for Production by mbillie1 on Friday March 28, 2014 @01:07PM (#7488502)
> mutable state on the ApplicationController and the models

Well, mutable state on the models seems pretty fair, unless I'm misunderstanding you. It's rather unforgivable on ApplicationController though.

Edit: and the slow startup time doing TDD with JRuby was my primary complaint when I developed in it. Although iirc you can use nailgun or something to keep the JVM active and mitigate that pain.

Re:Ruby Garbage Collection: Still Not Ready for Production by rubiquity on Friday March 28, 2014 @01:12PM (#7488539)
Sorry, I meant mutable state on classes, which is just a sneaky way of having global state.
Re:Ruby Garbage Collection: Still Not Ready for Production by OutThisLife on Saturday March 29, 2014 @10:34AM (#7492340)
Can you give an example? I'm learning Rails and I'd like to avoid bad practices.
Re:Ruby Garbage Collection: Still Not Ready for Production by Twirrim on Saturday March 29, 2014 @07:24PM (#7494411)
Is the JRuby environment sufficiently different that you can't TDD against MRI and then save JRuby for final validation testing and deployment? They shouldn't be that different, unless you're not writing pure ruby code.

Alternatively, Nailgun should reduce a lot of that pain. Effectively you have a running server instance of JVM and run some clients on it. That gives you JVM speed advantages without the slow startup. JRuby natively supports it: https://github.com/jruby/jruby/wiki/JRubyWithNailgun

Re:Ruby Garbage Collection: Still Not Ready for Production by r4um on Friday March 28, 2014 @01:00PM (#7488458)
Exactly. Jruby warbler rocks, create easily deployable artifacts jars, wars etc and you have rock solid JVM at your disposal.
Re:Ruby Garbage Collection: Still Not Ready for Production by joevandyk on Friday March 28, 2014 @01:31PM (#7488702)
Slow startup time for large ruby applications.