Ruby-服务器优化的Ruby发行版通过APTYUM实现更少内存更快速易于安装和安全补丁

  • T3_544276
    了解作者
  • 60.5KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-19 21:04
    上传日期
服务器优化的Ruby发行版:通过APT/YUM实现更少内存,更快速,易于安装和安全补丁
Ruby-服务器优化的Ruby发行版通过APTYUM实现更少内存更快速易于安装和安全补丁.zip
  • fullstaq-labs-fullstaq-ruby-server-edition-62e7896
  • environments
  • centos-7
  • Dockerfile
    1.3KB
  • image_tag
    186B
  • debian-9
  • Dockerfile
    1.1KB
  • image_tag
    186B
  • ubuntu-18.04
  • Dockerfile
    1.1KB
  • image_tag
    186B
  • utility
  • Dockerfile
    1.4KB
  • Gemfile
    41B
  • image_tag
    186B
  • Gemfile.lock
    816B
  • lib
  • build_all_packages_support.rb
    11.8KB
  • progress_tracker.rb
    7KB
  • library.sh
    2.1KB
  • resources
  • test-env
  • Gemfile
    215B
  • Gemfile.lock
    531B
  • ruby_malloctrim.patch
    1011B
  • ruby_25_jemalloc.patch
    378B
  • ruby_25_malloctrim.patch
    380B
  • ruby_26_jemalloc.patch
    693B
  • ruby_26_malloctrim.patch
    697B
  • container-entrypoints
  • build-rbenv-rpm
    1.3KB
  • test-debs-prepare
    437B
  • test-rpms-prepare
    314B
  • build-ruby-deb
    1.5KB
  • test-rpms
    820B
  • test-debs
    862B
  • build-jemalloc
    1.5KB
  • build-ruby
    4.9KB
  • build-ruby-rpm
    2.3KB
  • build-rbenv-deb
    1.3KB
  • internal-scripts
  • test-rpms
    5.8KB
  • autodetect-shlib-dependencies
    4.2KB
  • test-debs
    6KB
  • build-all-packages.rb
    8.8KB
  • build-rbenv-rpm
    2.1KB
  • build-environment-image
    1.5KB
  • Gemfile
    55B
  • build-ruby-deb
    2.2KB
  • test-rpms
    3.4KB
  • config.yml
    2.3KB
  • test-debs
    3.4KB
  • build-jemalloc
    3KB
  • LICENSE.md
    1.1KB
  • build-ruby
    4.2KB
  • README.md
    34KB
  • push-environment-images
    318B
  • build-ruby-rpm
    2.2KB
  • Gemfile.lock
    208B
  • .editorconfig
    656B
  • .gitignore
    92B
  • build-rbenv-deb
    2.1KB
  • build-all-packages
    233B
内容介绍
# Fullstaq Ruby Server Edition: a server-optimized Ruby distribution Fullstaq Ruby is a Ruby distribution that's optimized for use in servers. It is the easiest way to: * Install Ruby on servers — we supply precompiled binaries. * Keep Ruby security-patched or up-to-date — integrates with your OS package manager. * Significantly reduce memory usage of your Ruby apps — a memory reduction of 50% is quite realistic. * Increase performance — thanks to the usage of better memory allocators. You can think of Fullstaq Ruby as a competitor of `apt/yum install ruby`, `rbenv install` and `rvm install`. We supply [native OS packages](#how-it-works) for various Ruby versions, which are optionally compiled with [Jemalloc](#what-is-jemalloc-and-how-does-it-benefit-me) or [malloc_trim](#what-is-malloc-trim-and-how-does-it-benefit-me), allowing for lower memory usage and potentially increased performance. Our [packaging method](#minor_version_packages) allows much easier security patching. > Fullstaq Ruby is a work-in-progress! Features like APT/YUM repo, editions optimized for containers and Heroku, and much more, are planned. Please see [our roadmap](https://github.com/fullstaq-labs/fullstaq-ruby-umbrella/projects). **Table of contents:** * [Key features](#key-features) * [Background](#background) - [Why was Fullstaq Ruby created?](#why-was-fullstaq-ruby-created) - [Who is behind Fullstaq Ruby?](#who-is-behind-fullstaq-ruby) * [How it works](#how-it-works) - [Package organization](#package-organization) - [Rbenv integration](#rbenv-integration) - [Minor version packages: a great way to keep Ruby security-patched](#minor-version-packages-a-great-way-to-keep-ruby-security-patched) - [About variants](#about-variants) - [Comparisons to other systems](#comparisons-to-other-systems) + [Vs RVM and Rbenv](#vs-rvm-and-rbenv) + [Vs Ruby packages included in operating systems' official repositories](#vs-ruby-packages-included-in-operating-systems-official-repositories) + [Vs the Brightbox PPA](#vs-the-brightbox-ppa) + [Vs JRuby, TruffleRuby and Rubinius](#vs-jruby-truffleruby-and-rubinius) * [Installation](#installation) - [RHEL/CentOS](#rhelcentos) - [Debian/Ubuntu](#debianubuntu) - [Deactivate Git-based Rbenv](#deactivate-git-based-rbenv) - [Activate Rbenv shell integration (optional)](#activate-rbenv-shell-integration-optional) + [System-wide shell integration](#system-wide-shell-integration) * [Usage after installation](#usage-after-installation) - [Using a specific Ruby version](#using-a-specific-ruby-version) - [Usage with Rbenv](#usage-with-rbenv) - [Passenger for Nginx/Apache integration](#passenger-for-nginxapache-integration) - [Puma, Unicorn or Passenger Standalone integration](#puma-unicorn-or-passenger-standalone-integration) - [Capistrano integration](#capistrano-integration) * [FAQ](#faq) - [What is Jemalloc and how does it benefit me?](#what-is-jemalloc-and-how-does-it-benefit-me) - [What is malloc_trim and how does it benefit me?](#what-is-malloc-trim-and-how-does-it-benefit-me) - [Is Fullstaq Ruby faster than regular Ruby (MRI)?](#is-fullstaq-ruby-faster-than-regular-ruby-mri) - [Why does Fullstaq Ruby integrate with Rbenv?](#why-does-fullstaq-ruby-integrate-with-rbenv) - [I do not need multiple Rubies (and have no need for Rbenv), is Fullstaq Ruby suitable for me?](#i-do-not-need-multiple-rubies-and-have-no-need-for-rbenv-is-fullstaq-ruby-suitable-for-me) - [Which variant should I pick?](#which-variant-should-i-pick) - [Why a new distribution? Why not contribute to Ruby core?](#why-a-new-distribution-why-not-contribute-to-ruby-core) --- ## Key features * **Precompiled binaries: save time and energy, increase security** Stop wasting time and energy with compiling Ruby or applying source patches. We supply precompiled Ruby binaries so that you don't have to. Improve security by eliminating the need to install a compiler on your server. * **Native OS packages: install and update with tools you already use** We supply our binaries as [_native OS packages_](#how-it-works) (e.g. via APT, YUM). Easily integrate with your configuration management tools, no need to integrate yet another installer. Easily keep Ruby security-patched or up-to-date with tools you already use. * **Jemalloc and `malloc_trim` integration: reduce memory usage, increase performance** > Main articles: > - [What is Jemalloc and how does it benefit me?](#what-is-jemalloc-and-how-does-it-benefit-me) > - [What is malloc_trim and how does it benefit me?](#what-is-malloc-trim-and-how-does-it-benefit-me) > - [Is Fullstaq Ruby faster than regular Ruby (MRI)?](#is-fullstaq-ruby-faster-than-regular-ruby-mri) In Hongli Lai's research project [What Causes Ruby Memory Bloat?](https://www.joyfulbikeshedding.com/blog/2019-03-14-what-causes-ruby-memory-bloat.html), Hongli has identified the OS memory allocator as a major cause of memory bloating in Ruby. There are two good solutions for this problem: either by using [the Jemalloc memory allocator](#what-is-jemalloc-and-how-does-it-benefit-me), or by using [the `malloc_trim` API](#what-is-malloc-trim-and-how-does-it-benefit-me). Both solutions require patching the Ruby interpreter, but we've done that for you so that you don't have to. Use our binaries, and benefit from reduced memory usage and potentially increased performance out-of-the-box and in a hassle-free manner. * **Multiple Ruby versions: ensure compatibility** Not all apps are deployed against the latest Ruby — at least, not all the time. We supply binaries for _multiple Ruby versions_. Enjoy the benefits of Fullstaq Ruby no matter which Ruby version you use. * **Rbenv integration: manage Ruby versions with already-familiar tools** Our multi-Ruby support works by integrating with the popular Ruby version manager [Rbenv](https://github.com/rbenv/rbenv). Continue to benefit from Rbenv ecosystem tooling like [capistrano-rbenv](#capistrano-integration). No need to learn another tool for managing Ruby versions. ## Background ### Why was Fullstaq Ruby created? Fullstaq Ruby came about for two reasons: * **Optimizing for server use cases.** Ruby uses a lot of memory. In fact, [way too much and much more than it is "supposed to"](https://www.joyfulbikeshedding.com/blog/2019-03-14-what-causes-ruby-memory-bloat.html). Fortunately, there are "simple" solutions that provide a lot of benefit to users without requiring difficult code changes in Ruby: by compiling Ruby against the [Jemalloc](http://jemalloc.net/) memory allocator, or by modifying Ruby to make use the `malloc_trim` API. In case you use Jemalloc, you even get a nice performance improvement. > Main articles: > - [What is Jemalloc and how does it benefit me?](#what-is-jemalloc-and-how-does-it-benefit-me) > - [What is malloc_trim and how does it benefit me?](#what-is-malloc-trim-and-how-does-it-benefit-me) > - [Is Fullstaq Ruby faster than regular Ruby (MRI)?](#is-fullstaq-ruby-faster-than-regular-ruby-mri) Unfortunately for people who use Ruby in server use cases (e.g. most Ruby web apps), Ruby core developers are a bit careful/conservative and are hesitant to adopt Jemalloc, citing concerns that Jemalloc may cause regressions in non-server use cases, as well as other compatibility-related concerns. That's where Fullstaq Ruby comes in: we are opinionated. Fullstaq Ruby does not care about non-server use cases, and we prefer a more progressive approach, so we make choices to optimize for that use case. * **Installing the Ruby version you want, and keeping it security-patched, is a miserable experience.** The most viable ways to install Ruby are: 1. From OS repositories, e.g. `apt install ruby`/`yum install ruby`. 2. Compiling Ruby using a version manager like RVM or Rbenv. 3. Installing precompiled binaries supplied by RVM or Rben
评论
    相关推荐