Local Rubygems mirror very slow for gem install

Mark Selby's Avatar

Mark Selby

30 May, 2017 06:57 PM

We have a paradigm within our environment to try and install all software from mirrors inside our own environment. We are using the rubygems-mirror gem to mirror all of rubygems.org once a day. We then have all of our machines point to the local mirror.

One thing that we have noticed is that gem install is almost 15x slower from our local mirror than from rubygems.org.

We have enabled the --debug option to gem install and it looks like the fetching of the gem takes a lot longer when served locally. I would image that there is a whole different code/index path that the official rubygems.org uses verses the one we use with a local mirror.

Is there any advice that you can provide for us. We would still like to use a local mirrior but al increase the speed at which gems are resolved from the local mirror.

All and any help is greatly appreciated

Fetching: json-pointer-0.0.1.gem (100%)
Successfully installed json-pointer-0.0.1
Parsing documentation for json-pointer-0.0.1
Installing ri documentation for json-pointer-0.0.1
Done installing documentation for json-pointer after 0 seconds
1 gem installed

real 0m1.081s
user 0m0.921s
sys 0m0.036s

----------------------------------------------------------------

Fetching: json-pointer-0.0.1.gem (100%)
Successfully installed json-pointer-0.0.1
Parsing documentation for json-pointer-0.0.1
Installing ri documentation for json-pointer-0.0.1
Done installing documentation for json-pointer after 0 seconds
1 gem installed

real 0m15.694s
user 0m15.407s
sys 0m0.260s

  1. Support Staff 1 Posted by David Radcliffe on 31 May, 2017 01:01 AM

    David Radcliffe's Avatar

    Take a look at Gemstash. That's the only recommended mirror solution right now. https://github.com/bundler/gemstash

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac