Git Product home page Git Product logo

jemalloc-rb's Introduction

jemalloc

Instant jemalloc injection into Ruby apps, for better performance and less memory.

Why jemalloc?

Ruby relies on malloc(3) for its internal memory allocation. Using better malloc() implementation will boost your application performance, and supress the memory usage.

jemalloc is a malloc(3) implementation, originally developed by Jason Evans. jemalloc handles small object better than other allocators so usually gives better performance and memory usage to Ruby programs.

Why jemalloc?

Installing jemalloc separately from Ruby is pain in some cases (e.g. Heroku, EngineYard, etc). je gem contains jemalloc itself within a gem, and enables instant jemalloc injection in a really easy way: install je gem, and launch your app with je command.

Install

Install jemalloc gem in your application. For bundler based application, please add the following line into your Gemfile, and and install jemalloc by bundle install.

gem 'jemalloc'

Usage

Execute your application with je command, which is contained in je gem. Example command for Rails + bundler application is like follows.

$ bundle exec je ./script/rails s

-v option will let you confirm jemalloc is actually injected.

$ bundle exec je -v ./script/rails s
=> Injecting jemalloc...
=> Booting WEBrick
...

Limitation

Currently, this gem works only on Linux and Mac OS X.

License

BSD-derived License.

jemalloc-rb's People

Contributors

arthurnn avatar joshk avatar kzk avatar nobu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.