enhance: set jemalloc prof disable by default (#41850)

issue: #40730

- add assertion for insert message
- add more buffer for seal notifier

Signed-off-by: chyezh <chyezh@outlook.com>
This commit is contained in:
Zhen Ye 2025-05-15 20:10:23 +08:00 committed by GitHub
parent ba8f62a3b2
commit ae43230703
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 13 additions and 9 deletions

View File

@ -32,7 +32,7 @@ COPY --chown=root:root --chmod=774 ./lib/ /milvus/lib/
ENV PATH=/milvus/bin:$PATH
ENV LD_LIBRARY_PATH=/milvus/lib:$LD_LIBRARY_PATH:/usr/lib
ENV LD_PRELOAD=${MILVUS_ASAN_LIB}:/milvus/lib/libjemalloc.so
ENV MALLOC_CONF=background_thread:true,prof:true
ENV MALLOC_CONF=background_thread:true
ENTRYPOINT ["/tini", "--"]

View File

@ -23,4 +23,4 @@ COPY --chown=root:root --chmod=774 ./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
ENV MALLOC_CONF=background_thread:true,prof:true
ENV MALLOC_CONF=background_thread:true

View File

@ -19,7 +19,7 @@ COPY --chown=root:root --chmod=774 ./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
ENV MALLOC_CONF=background_thread:true,prof:true
ENV MALLOC_CONF=background_thread:true
ENTRYPOINT ["/tini", "--"]

View File

@ -36,7 +36,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_ASAN_LIB}:/milvus/lib/libjemalloc.so
ENV MALLOC_CONF=background_thread:true,prof:true
ENV MALLOC_CONF=background_thread:true
ENTRYPOINT ["/tini", "--"]

View File

@ -33,7 +33,7 @@ COPY --chown=root:root --chmod=774 ./lib/ /milvus/lib/
ENV PATH=/milvus/bin:$PATH
ENV LD_LIBRARY_PATH=/milvus/lib:$LD_LIBRARY_PATH:/usr/lib
ENV LD_PRELOAD=${MILVUS_ASAN_LIB}:/milvus/lib/libjemalloc.so
ENV MALLOC_CONF=background_thread:true,prof:true
ENV MALLOC_CONF=background_thread:true
ENTRYPOINT ["/tini", "--"]

View File

@ -33,7 +33,7 @@ COPY --chown=root:root --chmod=774 ./lib/ /milvus/lib/
ENV PATH=/milvus/bin:$PATH
ENV LD_LIBRARY_PATH=/milvus/lib:$LD_LIBRARY_PATH:/usr/lib
ENV LD_PRELOAD=${MILVUS_ASAN_LIB}:/milvus/lib/libjemalloc.so
ENV MALLOC_CONF=background_thread:true,prof:true
ENV MALLOC_CONF=background_thread:true
ENTRYPOINT ["/tini", "--"]

View File

@ -48,6 +48,10 @@ func (r *redoAppendInterceptor) waitUntilGrowingSegmentReady(ctx context.Context
if msg.MessageType() == message.MessageTypeInsert {
insertMessage := message.MustAsMutableInsertMessageV1(msg)
h := insertMessage.Header()
if len(h.Partitions) != 1 {
// TODO: We will support multi-partition insert in the future.
panic("insert message should only have one partition")
}
for _, partition := range h.Partitions {
ready, err := r.shardManager.WaitUntilGrowingSegmentReady(h.CollectionId, partition.PartitionId)
if err != nil {

View File

@ -21,7 +21,7 @@ var (
func newSealWorker(statsManager *StatsManager) *sealWorker {
w := &sealWorker{
statsManager: statsManager,
sealNotifier: make(chan sealSegmentIDWithPolicy, 1),
sealNotifier: make(chan sealSegmentIDWithPolicy, 100),
growingBytesNotifier: syncutil.NewCooldownNotifier[uint64](growingBytesNotifyCooldown, 100),
}
return w

View File

@ -21,7 +21,7 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
if test -f "$LIBJEMALLOC"; then
#echo "Found $LIBJEMALLOC"
export LD_PRELOAD="$LIBJEMALLOC"
export MALLOC_CONF=background_thread:true,prof:true
export MALLOC_CONF=background_thread:true
else
echo "WARN: Cannot find $LIBJEMALLOC"
fi

View File

@ -21,7 +21,7 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
if test -f "$LIBJEMALLOC"; then
#echo "Found $LIBJEMALLOC"
export LD_PRELOAD="$LIBJEMALLOC"
export MALLOC_CONF=background_thread:true,prof:true
export MALLOC_CONF=background_thread:true
else
echo "WARN: Cannot find $LIBJEMALLOC"
fi