/docker-centos-jemalloc

This is docker image for diagnostic native memory leaks in Java

Primary LanguageDockerfileApache License 2.0Apache-2.0

Docker image with Java 8 and jemalloc

The docker image intended for debugging native memory leaks.

Tools

Configure

Configure Java to use jemalloc using LD_PRELOAD.

LD_PRELOAD="/usr/local/lib/libjemalloc.so"

Enable profiling using MALLOC_CONF.

MALLOC_CONF="prof_leak:true,prof:true,lg_prof_interval:25,lg_prof_sample:18,prof_prefix:/tmp/jeprof"

Reports

Use jeprof to produce a text report or a nice graph over the allocations – eventually the leak should stand out.

Graphical report

jeprof --svg /tmp/jeprof.* > jeprof-report.svg

Text report

jeprof --text /tmp/jeprof.* > jeprof.log

Run Docker Container

docker run -ti --rm aukhatov/centos-jemalloc:8u191b09