Optimizing memory consumption with tcmalloc or jemalloc
When most of your memory is allocated in a large number of noncontiguous blocks (for example, small chunks of common data), memory fragmentation can cause resource starvation. To avoid resource starvation and optimize memory consumption and transactional throughput, try applying a different memory allocation library in your cluster. IBM® Spectrum Symphony is certified with tcmalloc (gperftools 2.2) and jemalloc (3.0.0).
Before you begin
You must download and compile the tcmalloc or jemalloc
library on hosts in your cluster. Use these steps as a reference to compile either library.
- Download and compile tcmalloc as follows:
- Download the gperftools-2.2.tar.gz package from https://github.com/gperftools/gperftools/releases/download/gperftools-2.2/gperftools-2.2.tar.gz and extract the
files:
# tar zxvf gperftools-2.2.tar.gz - From the gperftools-2.2 directory, compile the
library:
# cd gperftools-2.2 # ./configure --enable-frame-pointers # make - Copy the .libs/libtcmalloc.so file to the ${SOAM_HOME}/version/EGO_machine_type/lib64 directory in your IBM Spectrum Symphony installation.
- Download the gperftools-2.2.tar.gz package from https://github.com/gperftools/gperftools/releases/download/gperftools-2.2/gperftools-2.2.tar.gz and extract the
files:
- Download and compile jemalloc as follows:
- Download the jemalloc-3.0.0.tar.bz2 package from https://github.com/jemalloc/jemalloc/releases/download/3.0.0/jemalloc-3.0.0.tar.bz2 and extract the
files:
# tar xjf jemalloc-3.0.0.tar.bz2 - From the jemalloc-3.0.0 directory, compile the
library:
# cd jemalloc-3.0.0 # ./configure # make - Copy the jemalloc-3.0.0/lib/libjemalloc.so.1 file to the ${SOAM_HOME}/version/EGO_machine_type/lib64 directory in your IBM Spectrum Symphony installation.
- Download the jemalloc-3.0.0.tar.bz2 package from https://github.com/jemalloc/jemalloc/releases/download/3.0.0/jemalloc-3.0.0.tar.bz2 and extract the
files:
Procedure
After you download and compile the library, follow these steps to enable tcmalloc or jemalloc in your cluster: