Skip to content

Build Ruby-slim with jemalloc - #192

Closed
jvrplmlmn wants to merge 2 commits into
docker-library:masterfrom
cabify:slim/jemalloc
Closed

jvrplmlmn wants to merge 2 commits into
docker-library:masterfrom
cabify:slim/jemalloc

Conversation

@jvrplmlmn

Copy link
Copy Markdown

Using jemalloc can decrease memory usage considerably:

https://www.levups.com/en/blog/2017/optimize_ruby_memory_usage_jemalloc_heroku_scalingo.html
https://medium.com/@adrienjarthon/ruby-jemalloc-results-for-updown-io-d3fb2d32f67f

This PR updates the Ruby slim template to be built with jemalloc.

@tianon

tianon commented Feb 26, 2018 via email

Copy link
Copy Markdown
Member

@shaneog

shaneog commented Mar 2, 2018

Copy link
Copy Markdown

@tianon There is a discussion in the bugtracker which it is acknowledged that jemalloc is better, but that it can't be set as the default due to vagaries of different platforms.
https://bugs.ruby-lang.org/issues/9113

Since this image is based on Debian I can't see any reason for not doing this - it really is a huge benefit.

@yosifkit yosifkit mentioned this pull request Jul 3, 2018
@codenamev

codenamev commented Jul 5, 2018 •

Copy link
Copy Markdown

It looks like this has been resolved upstream so that ruby can now be configured to use --with-jemalloc. As noted by @nobu, you have to configure jemalloc --with-jemalloc-prefix as well.

@jorihardman

Copy link
Copy Markdown

If anyone is looking to run this now, I've forked this repository, merged this PR, and added a public/automated docker hub that can be found here: https://hub.docker.com/r/swipesense/ruby-jemalloc

We've been using this in production for a couple weeks now and have seen great results. I will maintain that docker hub and repo until this or a similar PR is merged.

@jorihardman jorihardman mentioned this pull request Nov 14, 2018
* master: (70 commits)
  Update to 2.6.0-preview3, bundler 1.17.1, rubygems 2.7.8
  Update to 2.4.5, bundler 1.17.1, rubygems 2.7.8
  Update to 2.5.3, bundler 1.17.1, rubygems 2.7.8
  Update to 2.3.8, bundler 1.17.1, rubygems 2.7.8
  Update to 2.6.0-preview2, bundler 1.17.1, rubygems 2.7.8
  Update to 2.5.3, bundler 1.17.1, rubygems 2.7.7
  Update to 2.4.5, bundler 1.17.1, rubygems 2.7.7
  Update to 2.3.8, bundler 1.17.1, rubygems 2.7.7
  Update to 2.6.0-preview2, bundler 1.17.1, rubygems 2.7.7
  Update to 2.4.5, bundler 1.17.0, rubygems 2.7.7
  Update to 2.5.3, bundler 1.17.0, rubygems 2.7.7
  Update to 2.3.8, bundler 1.17.0, rubygems 2.7.7
  Update to 2.6.0-preview2, bundler 1.17.0, rubygems 2.7.7
  Remove Alpine 3.6 support from Ruby 2.4 (now that it has 3.8)
  Update generate-stackbrew-library.sh
  minor tweak to rerun travis
  Support Alpine 3.8
  Upgrade Ruby to 2.5.3
  Update to 2.5.3, bundler 1.16.6, rubygems 2.7.7
  Update to 2.3.8, bundler 1.16.6, rubygems 2.7.7
  ...
@yosifkit

Copy link
Copy Markdown
Member

Closing PR until a recommendation from Ruby upstream. Discussion can continue on #182.

See also #182 (comment)

@yosifkit yosifkit closed this Jan 21, 2019
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

Successfully merging this pull request may close these issues.

7 participants