Set LD_PRELOAD env for jemalloc (#18612)

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
This commit is contained in:
bigsheeper 2022-08-11 19:50:37 +08:00 committed by GitHub
parent f22fc4f236
commit 004ba37436
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 0 deletions

View File

@ -32,6 +32,7 @@ COPY ./lib/ /milvus/lib/
ENV PATH=/milvus/bin:$PATH
ENV LD_LIBRARY_PATH=/milvus/lib:$LD_LIBRARY_PATH:/usr/lib
ENV LD_PRELOAD=/milvus/lib/libjemalloc.so
# Add Tini
ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini /tini

View File

@ -32,6 +32,7 @@ COPY ./lib/ /milvus/lib/
ENV PATH=/milvus/bin:$PATH
ENV LD_LIBRARY_PATH=/milvus/lib:$LD_LIBRARY_PATH:/usr/lib
ENV LD_PRELOAD=/milvus/lib/libjemalloc.so
# Add Tini
ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini /tini

View File

@ -16,6 +16,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
LIBJEMALLOC=$PWD/internal/core/output/lib/libjemalloc.so
if test -f "$LIBJEMALLOC"; then
#echo "Found $LIBJEMALLOC"
export LD_PRELOAD="$LIBJEMALLOC"
else
echo "WARN: Cannot find $LIBJEMALLOC"
fi
fi
echo "Starting rootcoord..."
nohup ./bin/milvus run rootcoord > /tmp/rootcoord.log 2>&1 &

View File

@ -16,5 +16,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
LIBJEMALLOC=$PWD/internal/core/output/lib/libjemalloc.so
if test -f "$LIBJEMALLOC"; then
#echo "Found $LIBJEMALLOC"
export LD_PRELOAD="$LIBJEMALLOC"
else
echo "WARN: Cannot find $LIBJEMALLOC"
fi
fi
echo "Starting standalone..."
nohup ./bin/milvus run standalone > /tmp/standalone.log 2>&1 &