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

JRuby install of 9.1.5.0 takes ages #6892

Closed
perlun opened this issue Nov 17, 2016 · 25 comments
Closed

JRuby install of 9.1.5.0 takes ages #6892

perlun opened this issue Nov 17, 2016 · 25 comments
Labels

Comments

@perlun
Copy link

perlun commented Nov 17, 2016

I wrote this as an issue a long time ago: travis-ci/travis-rubies#22, and since then 9.1.6.0 has been released. It takes about 2-3 minutes to install it on Travis, far from acceptable.

Could we get a rvm-preinstalled 9.1.6.0 in the base image? Would be extremely appreciated.

(Update: See my gist link below for a workaround.)

@BanzaiMan
Copy link
Contributor

If you are using GCE, please install HAVEGED.

@perlun
Copy link
Author

perlun commented Nov 17, 2016

It helps a bit, but not enough. I want it to be as fast as using MRI (i.e. a few seconds is acceptable).

@perlun
Copy link
Author

perlun commented Nov 17, 2016

(travis-ci/docs-travis-ci-com#743 talks about haveged btw)

@BanzaiMan
Copy link
Contributor

We will be updating pre-installed JRuby versions on GCE images, but there will always be a chance that your desired version is not (because we cannot pre-install all language runtimes).

@BanzaiMan
Copy link
Contributor

I don't think "a few seconds" is achievable with JRuby installations.

@headius
Copy link

headius commented Nov 17, 2016

@BanzaiMan I came here to file a bug about this same problem and suggest that Travis add haveged to the base image. Is that a reasonable path forward? Container-based setups are always going to burn through entropy, so this seems like a good thing to do in general.

@headius
Copy link

headius commented Nov 17, 2016

FWIW, here's installing JRuby 9.1.6.0 without haveged and with haveged. Seems like it's still a good idea to have it built-in.

@BanzaiMan
Copy link
Contributor

@headius yes, I think it is in everyone's interest to have HAVEGED available by default.

@perlun
Copy link
Author

perlun commented Nov 22, 2016

I don't think "a few seconds" is achievable with JRuby installations.

I'm very sure it is, at least when talking about "already installed" versions.

I did a quick test now, made a simple repo that uses a preinstalled version of JRuby: https://travis-ci.org/perlun/jruby-1.7-test/builds/177978599

The RVM install took 0.13s.

The problem there is that the only 9k JRuby available on the 12.04 image is jruby-9.0.0.0.pre1, i.e. age-old. I think the Trusty image have a somewhat more recent version, but we really need to get something from the JRuby 9.1.x series to be anywhere near usable.

(Sorry to be so complaining; we are paying every month both for the Travis service and now unfortunately a lot of waiting time on the builds, so that's why I'm quite annoyed with the current situation.)

@BanzaiMan
Copy link
Contributor

I think you misunderstood my previous statement.

If a JRuby runtime is pre-installed, RVM is not installing anything. It is not installation taking "a few seconds". It's basically a no-op.

I understand the frustration, but, as I said, under the circumstances, I do not think "a few seconds" is achievable with JRuby installations. We will work on getting HAVEGED pre-installed to help.

@perlun
Copy link
Author

perlun commented Nov 22, 2016

I understand the frustration, but, as I said, under the circumstances, I do not think "a few seconds" is achievable with JRuby installations. We will work on getting HAVEGED pre-installed to help.

I understand, and that's fine. But I also think we should add a non-beta version of jruby 9k (9.1.5.0 or 9.1.6.0) to either the 12.04 (current default) image or the new Trusty beta, as a preinstalled version. That would be the real "win" here, the haveged stuff is of course good but it's still much much too slow IMHO. If there is another place to give feedback on the Trusty beta, let me know - I'm happy to reroute this as needed to get someone to dig into it.

Right now, there are many more MRI versions available (on 12.04) than JRuby versions which is problematic for us who work more with JRuby than MRI. This is the output from the linked build above:

$ rvm list

rvm rubies

   jruby-1.7.19-d18 [ x86_64 ]
=> jruby-1.7.19-d19 [ x86_64 ]
   jruby-9.0.0.0.pre1 [ x86_64 ]
   ree-1.8.7-2012.02 [ x86_64 ]
   ruby-1.8.7-head [ x86_64 ]
   ruby-1.8.7-p374 [ x86_64 ]
   ruby-1.9.2-p330 [ x86_64 ]
 * ruby-1.9.3-p551 [ x86_64 ]
   ruby-2.0.0-p598 [ x86_64 ]
   ruby-2.1.2 [ x86_64 ]
   ruby-2.1.3 [ x86_64 ]
   ruby-2.1.4 [ x86_64 ]
   ruby-2.1.5 [ x86_64 ]
   ruby-2.2.0 [ x86_64 ]

9.0.0.0.pre1 was released about 22 months ago (2015-01-20). It's practically unusable for most real-world scenarios, at least at my employer. Please fix. 😄

@nateberkopec
Copy link

nateberkopec commented Nov 22, 2016

Well, to be fair, the latest MRI version in that list was released in December 2014. Maybe @BanzaiMan can explain why all of the preinstalled ruby versions are old.

@perlun
Copy link
Author

perlun commented Nov 22, 2016

Well, to be fair, the latest MRI version in that least was released in December 2014

True, but it's less of a problem with MRI since the install takes about 20s extra (compared to 2-3 minutes with JRuby). But I agree, it would be interesting to hear more details on why all preinstalled Rubies are ancient.

@BanzaiMan
Copy link
Contributor

BanzaiMan commented Nov 22, 2016

That is an excellent question!

I agree that these runtimes on Precise are ancient—practically dead in Internet time.

Many things contributed to delay in image updates. We moved our infrastructures to a new provider, we added Trusty support, and scaling things, etc. We focused our work on making updating images easier and more consistent. That work is almost done.

We are planning image updates as we speak. It is not yet clear which ones we are going to have pre-installed (not many, unfortunately, due to disk space concerns), but a modern JRuby 9.1.x will be there, along with MRI versions.

@perlun
Copy link
Author

perlun commented Nov 23, 2016

We are planning image updates as we speak. It is not yet clear which ones we are going to have pre-installed (not many, unfortunately, due to disk space concerns), but a modern JRuby 9.1.x will be there, along with MRI versions.

@BanzaiMan - thanks a lot for the status update on that. Eagerly waiting - keep us posted if you have something (even of alpha/beta quality) that you want us to test before it's rolled out to the general public.

@BanzaiMan
Copy link
Contributor

You can look at https://github.com/travis-ci/packer-templates to get ideas of what's coming down the pipeline. The announcements go to https://docs.travis-ci.com/user/build-environment-updates/.

@perlun
Copy link
Author

perlun commented Jan 3, 2017

Any update on this one? It's equally frustrating still.

@perlun
Copy link
Author

perlun commented Jan 11, 2017

@BanzaiMan There hasn't been any update to the list of announcements for a full month. How are we doing with these changes? It's costing us a significant amount of time at the moment, in terms of meaningless waiting time for builds to complete...

@BanzaiMan
Copy link
Contributor

@perlun Sorry for the delay. Precise images may not get the JRuby update love, given how old Precise itself is. travis-ci/packer-templates#391 aims to get it on Trusty.

@perlun
Copy link
Author

perlun commented Jan 11, 2017

@BanzaiMan That's fine; we can move to Trusty once it's there. Thanks for the update! Awaiting this ❤️ from Travis to land. 😉

@BanzaiMan
Copy link
Contributor

@perlun Thanks for your patience.

@perlun
Copy link
Author

perlun commented Feb 2, 2017

FWIW, Trusty seems to be much faster on JRuby installs in general: down to less than a minute (compared to 2-3 minutes normally) when enabling these settings:

sudo: false
dist: trusty

Still not "great" but at least a step in the right direction.

@perlun
Copy link
Author

perlun commented Mar 14, 2017

FWIW, I decided to implement this workaround for now: https://gist.github.com/perlun/a20924957203d4fc202e9b6523d79598

By skipping RVM and just downloading the binaries directly, we are down from 100-200 seconds to about 10s (includinggem install bundler).

@perlun
Copy link
Author

perlun commented Jul 18, 2017

@BanzaiMan I looked at the list of preinstalled Ruby versions in one of our trusty builds. It seems like Ruby 2.2, 2.3 and 2.4 is preinstalled there, but no JRuby version. Can this really be the case? It would be super-nice if we could have jruby-latest and jruby-HEAD be preinstalled... because of the issues mentioned in this thread.

@stale
Copy link

stale bot commented Apr 13, 2018

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues

@stale stale bot added the stale label Apr 13, 2018
@stale stale bot closed this as completed Apr 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants