Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kzk/jemalloc-rb
gem install jemalloc && bundle exec je ./script/rails s
https://github.com/kzk/jemalloc-rb
Last synced: about 2 months ago
JSON representation
gem install jemalloc && bundle exec je ./script/rails s
- Host: GitHub
- URL: https://github.com/kzk/jemalloc-rb
- Owner: kzk
- Created: 2012-08-04T09:01:32.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2022-11-15T09:30:51.000Z (almost 2 years ago)
- Last Synced: 2024-05-16T06:25:03.221Z (4 months ago)
- Language: Ruby
- Homepage: http://www.canonware.com/jemalloc/
- Size: 1.84 MB
- Stars: 239
- Watchers: 17
- Forks: 36
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog
Awesome Lists containing this project
README
# jemalloc
Instant [jemalloc](http://www.canonware.com/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](http://gembundler.com/) 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](http://www.canonware.com/jemalloc/license.html).