From c15945628e9338e56ad07e56b3bff658b9864f86 Mon Sep 17 00:00:00 2001 From: Rafael dos Santos Silva Date: Wed, 7 Dec 2016 20:29:38 -0200 Subject: [PATCH] Adds tcmalloc and lockless allocators to base image --- image/base/Dockerfile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/image/base/Dockerfile b/image/base/Dockerfile index b349de1..c1c07f7 100644 --- a/image/base/Dockerfile +++ b/image/base/Dockerfile @@ -3,7 +3,6 @@ FROM ubuntu:16.04 ENV PG_MAJOR 9.5 -ENV CONFIGURE_OPTS --with-jemalloc MAINTAINER Sam Saffron "https://twitter.com/samsaffron" @@ -31,7 +30,7 @@ RUN apt-get -y install build-essential git wget \ postgresql-${PG_MAJOR} postgresql-client-${PG_MAJOR} \ postgresql-contrib-${PG_MAJOR} libpq-dev libreadline-dev \ language-pack-en cron anacron \ - psmisc rsyslog vim whois brotli + psmisc rsyslog vim whois brotli libunwind-dev RUN sed -i -e 's/start -q anacron/anacron -s/' /etc/cron.d/anacron RUN sed -i.bak 's/$ModLoad imklog/#$ModLoad imklog/' /etc/rsyslog.conf RUN dpkg-divert --local --rename --add /sbin/initctl @@ -58,6 +57,14 @@ RUN mkdir /jemalloc && cd /jemalloc &&\ tar -xjf jemalloc-3.6.0.tar.bz2 && cd jemalloc-3.6.0 && ./configure --prefix=/usr && make && make install &&\ cd / && rm -rf /jemalloc +RUN mkdir /gperftools && git clone https://github.com/gperftools/gperftools.git /gperftools &&\ + cd /gperftools && git checkout gperftools-2.5 && ./autogen.sh && ./configure --prefix=$PWD/lib &&\ + make install && mv lib/lib/libtcmalloc_minimal.so.4.3.0 /usr/lib && cd / && rm -rf /gperftools + +RUN mkdir /lockless && cd /lockless && curl -O https://locklessinc.com/downloads/lockless_allocator_linux.tgz &&\ + tar zxf lockless_allocator_linux.tgz && mv lockless_allocator_linux/64bit/libllalloc.so.1.4 /usr/lib &&\ + cd / && rm -rf /lockless + RUN echo 'gem: --no-document' >> /usr/local/etc/gemrc &&\ mkdir /src && cd /src && git clone https://github.com/sstephenson/ruby-build.git &&\ cd /src/ruby-build && ./install.sh &&\ -- 2.25.1