From 7ffcf7b5e6e63e4c9bd990f4c2a33c9335aacd3a Mon Sep 17 00:00:00 2001 From: Rafael dos Santos Silva Date: Wed, 7 Dec 2016 20:57:47 -0200 Subject: [PATCH] tcmalloc 2.5 is the default allocator, but this is now configurable --- image/base/Dockerfile | 1 + templates/web.template.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/image/base/Dockerfile b/image/base/Dockerfile index c1c07f7..323d6f1 100644 --- a/image/base/Dockerfile +++ b/image/base/Dockerfile @@ -3,6 +3,7 @@ FROM ubuntu:16.04 ENV PG_MAJOR 9.5 +ENV ALLOCATOR /usr/lib/libtcmalloc_minimal.so.4.3.0 MAINTAINER Sam Saffron "https://twitter.com/samsaffron" diff --git a/templates/web.template.yml b/templates/web.template.yml index c95ff59..b7ad699 100644 --- a/templates/web.template.yml +++ b/templates/web.template.yml @@ -91,7 +91,7 @@ run: # postgres cd $home chown -R discourse:www-data /shared/log/rails - HOME=/home/discourse USER=discourse exec chpst -u discourse:www-data -U discourse:www-data bundle exec config/unicorn_launcher -E production -c config/unicorn.conf.rb + LD_PRELOAD=$ALLOCATOR HOME=/home/discourse USER=discourse exec chpst -u discourse:www-data -U discourse:www-data bundle exec config/unicorn_launcher -E production -c config/unicorn.conf.rb - file: path: /etc/service/nginx/run -- 2.25.1