From 65d20ae3d830b3187e1f94fb09ede5a39b943518 Mon Sep 17 00:00:00 2001 From: "yudong.cai" Date: Tue, 10 Sep 2019 18:35:32 +0800 Subject: [PATCH] MS-507 fix performance issue when set CPU_CACHE to 16 or 64 Former-commit-id: 402b5d91a9866c38bc7dd16be1fa22de5a0b6bf8 --- cpp/CHANGELOG.md | 3 ++- cpp/src/db/engine/ExecutionEngineImpl.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cpp/CHANGELOG.md b/cpp/CHANGELOG.md index c0dedf4aff..aff760ebec 100644 --- a/cpp/CHANGELOG.md +++ b/cpp/CHANGELOG.md @@ -5,6 +5,7 @@ Please mark all change in change log and use the ticket from JIRA. # Milvus 0.4.0 (2019-07-28) ## Bug +- MS-119 - The problem of combining the log files - MS-411 - Fix metric unittest linking error - MS-412 - Fix gpu cache logical error - MS-416 - ExecutionEngineImpl::GpuCache has not return value cause crash @@ -30,7 +31,7 @@ Please mark all change in change log and use the ticket from JIRA. - MS-493 - Knowhere unittest crash - MS-453 - GPU search error when nprobe set more than 1024 - MS-510 - unittest out of memory and crashed -- MS-119 - The problem of combining the log files +- MS-507 - Dataset 10m-512, index type sq8,performance in-normal when set CPU_CACHE to 16 or 64 ## Improvement - MS-327 - Clean code for milvus diff --git a/cpp/src/db/engine/ExecutionEngineImpl.cpp b/cpp/src/db/engine/ExecutionEngineImpl.cpp index 9f0b825b93..45bc0d0ecd 100644 --- a/cpp/src/db/engine/ExecutionEngineImpl.cpp +++ b/cpp/src/db/engine/ExecutionEngineImpl.cpp @@ -303,13 +303,15 @@ Status ExecutionEngineImpl::Search(long n, } Status ExecutionEngineImpl::Cache() { - zilliz::milvus::cache::CpuCacheMgr::GetInstance()->InsertItem(location_, index_); + cache::DataObjPtr obj = std::make_shared(index_, PhysicalSize()); + zilliz::milvus::cache::CpuCacheMgr::GetInstance()->InsertItem(location_, obj); return Status::OK(); } Status ExecutionEngineImpl::GpuCache(uint64_t gpu_id) { - zilliz::milvus::cache::GpuCacheMgr::GetInstance(gpu_id)->InsertItem(location_, index_); + cache::DataObjPtr obj = std::make_shared(index_, PhysicalSize()); + zilliz::milvus::cache::GpuCacheMgr::GetInstance(gpu_id)->InsertItem(location_, obj); return Status::OK(); }