Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

producthunt/heroku-buildpack-jemalloc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

heroku-buildpack-jemalloc

I am a Heroku buildpack that installs jemalloc into a dyno slug.

Install

Heroku supports using multiple buildpacks for an app.

heroku buildpacks:add --index 1 https://github.com/mojodna/heroku-buildpack-jemalloc.git
git push heroku master

Usage

Recommended

Set the JEMALLOC_ENABLED config option to true and jemalloc will be used for all commands run inside of your dynos.

heroku config:set JEMALLOC_ENABLED=true

Per dyno

To control when jemalloc is configured on a per dyno basis use jemalloc.sh <cmd> and ensure that JEMALLOC_ENABLED is unset.

Example Procfile:

web: jemalloc.sh bundle exec puma -C config/puma.rb

Configuration

JEMALLOC_ENABLED

Set this to true to automatically enable jemalloc.

heroku config:set JEMALLOC_ENABLED=true

To disable jemalloc set the option to false. This will cause the application to restart disabling jemalloc.

heroku config:set JEMALLOC_ENABLED=false

JEMALLOC_VERSION

Set this to select or pin to a specific version of jemalloc. The default is to use the latest stable version if this is not set. You will receive an error mentioning tar if the version does not exist.

A full list of supported versions and stacks is available on the releases page.

note: This setting is only used during slug compilation. Changing it will require a code change to be deployed in order to take affect.

heroku config:set JEMALLOC_VERSION=5.0.1

Building

This uses Docker to build against Heroku stack-image-like images.

make VERSION=5.0.1

Artifacts will be dropped in dist/ based on Heroku stack and jemalloc version.

Deploying New Versions

  • make VERSION=X.Y.Z
  • open dist
  • Go to releases
  • Edit the release corresponding to each heroku Stack
  • Drag and drop the new build to attach

Creating a New Stack

  • Go to releases
  • Click "Draft a new release"
  • Tag is the name of the Stack (e.g. heroku-18)
  • Target is release-master
  • Title is Builds for the [stack] stack

Packages

No packages published

Languages

  • Shell 61.3%
  • Makefile 38.7%