mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Disable jemalloc and use malloc_trim instead (#17538)
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
This commit is contained in:
parent
47881e7a59
commit
cdcdfa1ea5
@ -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
|
||||
}
|
||||
|
||||
6
internal/core/thirdparty/CMakeLists.txt
vendored
6
internal/core/thirdparty/CMakeLists.txt
vendored
@ -70,6 +70,6 @@ if ( LINUX OR APPLE)
|
||||
endif()
|
||||
|
||||
# ******************************* Thridparty jemalloc ********************************
|
||||
if ( LINUX )
|
||||
add_subdirectory( jemalloc )
|
||||
endif()
|
||||
#if ( LINUX )
|
||||
# add_subdirectory( jemalloc )
|
||||
#endif()
|
||||
@ -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 &
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user