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

Build Ruby-slim with jemalloc #192

Closed
wants to merge 2 commits into from
Closed

Build Ruby-slim with jemalloc #192

wants to merge 2 commits into from

Conversation

jvrplmlmn
Copy link

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
Copy link
Member

tianon commented Feb 26, 2018 via email

@shaneog
Copy link

shaneog commented Mar 2, 2018

@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
Copy link

codenamev commented Jul 5, 2018

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

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.

* 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
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