Create the Dockerfile (vim Dockerfile
):
FROM confluentinc/cp-enterprise-control-center:7.5.2
USER root
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && dnf install -y jemalloc-devel
USER appuser
ENV LD_PRELOAD=/usr/lib64/libjemalloc.so
Build the Dockerfile:
docker build . -t alexjbleasdale/cp-enterprise-control-center-jemalloc:7.5.2
docker push alexjbleasdale/cp-enterprise-control-center-jemalloc:7.5.2
Test:
cd confluent-dockerfiles/simple-broker-kraft-c3jemalloc-sr
docker compose up
SSH into C3 instance:
docker compose exec control-center bash
Find the process id:
ps aux
If you want to see the full command, you can run:
echo "$(ps aux)"
You should see the PID
:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
appuser 1 19.5 4.6 9478020 1341780 ? Ssl 15:39 4:01 java -cp /usr/share/java/acl/*:/usr/share/java/confluent-control-center/*
Run pmap -x 1
pmap -x 1 | grep jemalloc
You should see:
[appuser@control-center lib64]$ pmap -x 1 | grep jemalloc
00007f79ebe00000 528 384 0 r-x-- libjemalloc.so.2
00007f79ebe84000 2044 0 0 ----- libjemalloc.so.2
00007f79ec083000 24 24 16 r---- libjemalloc.so.2
00007f79ec089000 4 4 4 rw--- libjemalloc.so.2