Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: replace jemalloc to reduce memory usage #1764

Merged
merged 1 commit into from
Aug 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions dist/images/Dockerfile.base
Original file line number Diff line number Diff line change
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