Skip to content

Commit

Permalink
perf: replace jemalloc to reduce memory usage (#1764)
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed Aug 2, 2022
1 parent 3551315 commit 2dd46e6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dist/images/Dockerfile.base
Expand Up @@ -9,7 +9,7 @@ ENV SRC_DIR='/usr/src'
RUN apt update && apt install build-essential git libnuma-dev autoconf curl \
python3 libmnl-dev libpcap-dev libtool libcap-ng-dev libssl-dev pkg-config \
python3-six libunbound-dev libunwind-dev dh-make fakeroot debhelper dh-python \
flake8 python3-sphinx graphviz groff wget libjemalloc-dev -y
flake8 python3-sphinx graphviz groff wget -y

RUN cd /usr/src/ && \
git clone -b ovn-22.03.1 --depth=1 https://github.com/kubeovn/ovs.git && \
Expand All @@ -20,8 +20,8 @@ RUN cd /usr/src/ && \
if [ "$ARCH" = "amd64" -a "$NO_AVX512" = "true" ]; then curl -s https://github.com/kubeovn/ovs/commit/38c59e078d69b343f56ab0f380fb9f42b94b7c02.patch | git apply; fi && \
./boot.sh && \
rm -rf .git && \
CONFIGURE_OPTS='LIBS=-ljemalloc' && \
if [ "$ARCH" = "amd64" ]; then CONFIGURE_OPTS='LIBS=-ljemalloc CFLAGS="-O2 -g -msse4.2 -mpopcnt"'; fi && \
CONFIGURE_OPTS='' && \
if [ "$ARCH" = "amd64" ]; then CONFIGURE_OPTS='CFLAGS="-O2 -g -msse4.2 -mpopcnt"'; fi && \
DATAPATH_CONFIGURE_OPTS='--prefix=/usr' EXTRA_CONFIGURE_OPTS=$CONFIGURE_OPTS DEB_BUILD_OPTIONS='parallel=8 nocheck' fakeroot debian/rules binary

RUN dpkg -i /usr/src/python3-openvswitch*.deb /usr/src/libopenvswitch*.deb
Expand All @@ -39,8 +39,8 @@ RUN cd /usr/src/ && git clone -b v22.03.1 --depth=1 https://github.com/ovn-org/o
sed -i 's/OVN/ovn/g' debian/changelog && \
rm -rf .git && \
./boot.sh && \
CONFIGURE_OPTS='LIBS=-ljemalloc' && \
if [ "$ARCH" = "amd64" ]; then CONFIGURE_OPTS='LIBS=-ljemalloc CFLAGS="-O2 -g -msse4.2 -mpopcnt"'; fi && \
CONFIGURE_OPTS='' && \
if [ "$ARCH" = "amd64" ]; then CONFIGURE_OPTS='CFLAGS="-O2 -g -msse4.2 -mpopcnt"'; fi && \
OVSDIR=/usr/src/ovs EXTRA_CONFIGURE_OPTS=$CONFIGURE_OPTS DEB_BUILD_OPTIONS='parallel=8 nocheck' fakeroot debian/rules binary

RUN mkdir /packages/ && \
Expand All @@ -56,7 +56,7 @@ ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt upgrade -y && apt install ca-certificates python3 hostname libunwind8 netbase \
ethtool iproute2 ncat libunbound-dev procps libatomic1 kmod iptables \
tcpdump ipset curl uuid-runtime openssl inetutils-ping arping ndisc6 \
logrotate libjemalloc2 dnsutils net-tools nmap -y --no-install-recommends && \
logrotate dnsutils net-tools nmap -y --no-install-recommends && \
rm -rf /var/lib/apt/lists/* && \
cd /usr/sbin && \
ln -sf /usr/sbin/iptables-legacy iptables && \
Expand Down

0 comments on commit 2dd46e6

Please sign in to comment.