Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Steps to run Logstash with native Ruby and not JRuby #3233

Closed
technosf opened this issue May 12, 2015 · 6 comments
Closed

Question: Steps to run Logstash with native Ruby and not JRuby #3233

technosf opened this issue May 12, 2015 · 6 comments

Comments

@technosf
Copy link

Hi,

I'm hoping to use logstash on a small server limited to embedded Java and 512M of RAM... And I can! It's just very slow start-up and sucks up a lot of resource that I need elsewhere.

I would like to use native Linux Ruby instead of JRuby to, hopefully, free up resources... So, I am setting USE_RUBY=1... but runner.rb dies at line 46:
kernel_require.rb:56:in 'require': cannot load such file -- i18n (LoadError)

I'm guessing that this is a path issue GEMS_HOME and GEMS_PATH and that there is interplay between logstash and the native Ruby libs. As I neophyte w.r.t. Ruby, could someone point me to a guide or point out some other doc that could point the way so that I have a stable install, even though I am aware of the date and ES limitations.

Thanks!

@colinsurprenant
Copy link
Contributor

@technosf USE_RUBY=1 will in fact use you current ruby interpreter but note that we currently do not support non-JRuby interpreters. USE_RUBY=1 is more intended for development mode when you want to test with a different local JRuby version for example.

If you have limited resources, you can tweak the maximum logstash heap size which is 500M by default, you could set it to 256M with LS_HEAP_SIZE=256m.

@technosf
Copy link
Author

The memory is pegged down, as you suggest @colinsurprenant, but it's the CPU utilization that is my focus. Being able to try native Ruby would have been informative.

@technosf technosf reopened this May 14, 2015
@jordansissel
Copy link
Contributor

it's the CPU utilization that is my focus

MRI is, for general performance, slower than JRuby in most thing I use. MRI's startup time is faster, but once JRuby gets going (15-30 seconds warmup), it's often 1.5 to 2x faster, if not more. I won't discourage experimentation, though!

When I was fiddling with MRI yesterday, I found I could get Logstash under MRI mostly working, at least for plugin testing, by using MRI to build the elastic/logstash-devutils gem and the logstash-core gem from elastic/logstash, then installing them in MRI. Hope this helps you get started :)

@jordansissel
Copy link
Contributor

Oops, Didn't mean to close :)

@technosf
Copy link
Author

Commenting out the JRuby checks in devutils and I have, in local gems:

bundler (1.9.9, 1.9.7)
logstash-core (2.0.0.dev)
logstash-devutils (0.0.13)

etc.

Stuck on bundler - tried flipping a few switches in bundler.rb, but it's beyond my current ken of Ruby - guessing it's a path issue (I'm playing this out on windoze right now).

cannot load such file -- bundler (LoadError)
kernel_require.rb:56:in `require`
bundler.rb:29:in `setup!'
environment.rb:46:in `<main>'

Thanks for your help Jordan.

@suyograo suyograo removed the v2.0.0 label Sep 25, 2015
@suyograo
Copy link
Contributor

At this point only JRuby is supported for development and production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants