Rubinius - Improving the Rails ecosystem

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

Post a comment
Embed Video
Edit your comment Cancel

2 Favorites

Rubinius - Improving the Rails ecosystem - Presentation Transcript

  1. Improving the Rails ecosystem The Rubinius Virtual Machine 1
  2. Thanks EY! 2
  3. Be thinking of questions
  4. a_better_ruby == a_better_rails # => true
  5. Brand new code base
  6. Write in ruby first. Then C if you have to.
  7. If you’re not failing every now and again, it’s a sign you’re not doing anything very innovative. Woody Allen
  8. A work in progrees
  9. Nov. 3: 1.0 preview End of 07: 1.0
  10. You’re the customer
  11. Help me help you.
  12. Tell me your pain.
  13. Some current pain
  14. Memory usage Memory
  15. • 1.8 garbage collector is simple, but too simple. • Rubinius uses modern techniques to decrease memory usage and increase throughput Memory 15
  16. The forking problem Memory
  17. In 1.8... • Start up a mongrel. • Require all your code. • fork() the process. • Watch your memory double. Memory 17
  18. In Rubinius... • Start up a mongrel. • Require all your code. • fork() the process. • Watch NO change in the memory footprint! Memory 18
  19. Memory change per additional mongrel instance 1 2 3 4 1.8 rubinius 19
  20. Packaging / Deployment
  21. .rba == .jar .rba == .war Packaging
  22. • Precompiled code (.rbc) • Meta data about project • RDoc • Assets Packaging 22
  23. Performance
  24. Built for change Performance
  25. Modern Techniques • Inline caching • Pre-compiled code • JIT (eventually) Performance 25
  26. 3 legged dog turtles space shuttle rubinius Performance 26
  27. Error reporting
  28. Normal Backtraces An exception has occurred: User requested termination with Control-C (Interrupt) Backtrace: Readline.readline at kernel/core/readline.rb:52 main.__script__ at lib/bin/sirb.rb:78 main.load at kernel/core/compile.rb:78 main.require at kernel/core/compile.rb:129 Array#each at kernel/core/array.rb:526 Integer(Fixnum)#times at kernel/core/integer.rb:19 Array#each at kernel/core/array.rb:526 main.require at kernel/core/compile.rb:112 Array#each at kernel/core/array.rb:526 Integer(Fixnum)#times at kernel/core/integer.rb:19 Array#each at kernel/core/array.rb:526 main.require at kernel/core/compile.rb:111 main.__script__ at kernel/loader.rb:159 Reporting 28
  29. C extensions can misbehave Reporting
  30. VALUE test_segfault(VALUE self) { // Get a pointer to address 4. char *i = (char*)4; // Attempt to read from address 4 // which is definitely not allowed. x = *i; // Never get this far. return Qnil; } Raises an exception! Segfault detected in function 0x90a00 (accessing 0x4) (MemorySegmentionError) SomeExtension#test_segfault at extensions/test/test.c main.__script__ at extensions/test/test.rb:38 main.load at kernel/core/compile.rb:95 main.__script__ at kernel/loader.rb:122 Reporting
  31. Time lost to segfaults (in minutes) 1.8 rubinius 200 200 150 100 70 50 30 10 6 2 1 3 5 31
  32. Profiling
  33. In 1.8... • Profiling is instrumented only. • The speed hit is prohibitive for running in production mode Profiling 33
  34. In Rubinius... • Sampling profiler available always • Has little to no impact on performance Profiling 34
  35. In my_app.rb require ‘simple_profile’ profile(:profile1) do obj.run_slow_method end shell# rbx profiler --analyze profile1.results Profiling 35
  36. In environment.rb require ‘simple_profile’ SimpleProfiler.profile_actions SimpleProfiler.profile_views shell# rbx profiler --analyze actions.results shell# rbx profiler --analyze views.results Profiling 36
  37. Disclaimer
  38. • All statements and numbers and opinions are only those of Evan Phoenix. • All statistics are made up, but represent a general trend. 38
  39. Evan Phoenix evan@fallingsnow.net ephoenix@engineyard.com 39

+ evanphxevanphx, 3 years ago

custom

5949 views, 2 favs, 0 embeds more stats

A talk on Rubinius at RailsConf Europe 2007.

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 5949
    • 5949 on SlideShare
    • 0 from embeds
  • Comments 1
  • Favorites 2
  • Downloads 141
Most viewed embeds

more

All embeds

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories