未验证 提交 cdcdfa1e 编写于 作者: B bigsheeper 提交者: GitHub

Disable jemalloc and use malloc_trim instead (#17538)

Signed-off-by: Nbigsheeper <yihao.dai@zilliz.com>
上级 47881e7a
......@@ -32,7 +32,6 @@ 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
......
......@@ -32,7 +32,6 @@ 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
......
......@@ -9,6 +9,9 @@
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
// or implied. See the License for the specific language governing permissions and limitations under the License
#ifndef __APPLE__
#include <malloc.h>
#endif
#include <vector>
#include "Reduce.h"
#include "common/CGoHelper.h"
......@@ -83,4 +86,7 @@ DeleteSearchResultDataBlobs(CSearchResultDataBlobs cSearchResultDataBlobs) {
}
auto search_result_data_blobs = reinterpret_cast<milvus::segcore::SearchResultDataBlobs*>(cSearchResultDataBlobs);
delete search_result_data_blobs;
#ifdef __linux__
malloc_trim(0);
#endif
}
......@@ -70,6 +70,6 @@ if ( LINUX OR APPLE)
endif()
# ******************************* Thridparty jemalloc ********************************
if ( LINUX )
add_subdirectory( jemalloc )
endif()
\ No newline at end of file
#if ( LINUX )
# add_subdirectory( jemalloc )
#endif()
\ No newline at end of file
......@@ -16,16 +16,6 @@
# 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 &
......
......@@ -16,15 +16,5 @@
# 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 &
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册