Skip to content

Users/cheqi/pre merge tikv parallelbuild#447

Open
MaggieQi wants to merge 30 commits into
users/qiazh/pre-merge-tikv-bugfixfrom
users/cheqi/pre-merge-tikv-parallelbuild
Open

Users/cheqi/pre merge tikv parallelbuild#447
MaggieQi wants to merge 30 commits into
users/qiazh/pre-merge-tikv-bugfixfrom
users/cheqi/pre-merge-tikv-parallelbuild

Conversation

@MaggieQi
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates SPFresh/TiKV benchmarking and SPANN dynamic posting handling to support parallel/batched TiKV append paths, multi-chunk posting management, and related benchmark configuration.

Changes:

  • Adds batched/priority append logic and TiKV multi-merge/count-cache handling for SPANN dynamic postings.
  • Updates benchmark/test configuration flow for TiKV, parallel BKT build, and search-during-insert threads.
  • Adjusts helper infrastructure including thread-pool front insertion, TiKV constructor parameters, and benchmark artifacts/config files.

Reviewed changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Test/src/VersionMapTest.cpp Updates TiKV test DB construction for the new TiKVIO constructor.
Test/src/SPFreshTest.cpp Reworks benchmark config propagation and thread parameters.
Test/src/main.cpp Guards Abseil deadlock-detection setup behind TIKV.
evaluation/2026-05-08-merged_spfresh/benchmark.ini Adds a TiKV benchmark configuration.
benchmark.ini Removes the previous root benchmark config.
AnnService/src/Core/SPANN/SPANNIndex.cpp Updates head ID loading, head build parameters, and TiKV DB construction.
AnnService/src/Core/SPANN/ExtraFileController.cpp Adjusts IO thread calculation for layered builds.
AnnService/inc/Helper/ThreadPool.h Switches job storage to deque and adds front insertion.
AnnService/inc/Helper/KeyValueIO.h Adds default MultiMerge and async stats hook.
AnnService/inc/Core/SPANN/ExtraTiKVController.h Moves posting count cache into TiKV IO and adds batched/multi-chunk merge paths.
AnnService/inc/Core/SPANN/ExtraDynamicSearcher.h Adds append jobs, batched append, and refactors posting DB access through KeyValueIO.
.vscode/launch.json Updates ASAN preload path to GCC 13.
.gitignore Broadens ignored perftest artifacts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1673 to +1674

for (auto& kv : headAppends)
Comment on lines +1208 to +1224
std::vector<int> fetchedCounts;
AsyncGetPostingCounts(keys, &fetchedCounts,
std::chrono::microseconds(5000000));

auto batch = std::make_shared<TiKVIO::AsyncBatch>();
batch->Add(static_cast<int>(keys.size()));

// std::vector<std::atomic<int>> is non-resizable but in-place
// constructible to size N with zero-initialization.
std::vector<std::atomic<int>> okFlags(keys.size());
for (auto& f : okFlags) f.store(0, std::memory_order_relaxed);

for (size_t i = 0; i < keys.size(); i++) {
int newCount = fetchedCounts[i] + static_cast<int>(values[i].size());
AsyncAppendChunkAndUpdateCount(
keys[i], values[i], newCount,
batch, &okFlags[i], MaxTimeout);
{ static std::atomic<int> _logOnce{0}; if (_logOnce.fetch_add(1) == 0) SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "[PATH] Append using SINGLE-KEY Get+Put path (no multi-chunk)\n"); }
std::string fullPosting;
auto ret = Get(key, &fullPosting, MaxTimeout, reqs);
if (ret != ErrorCode::Success) fullPosting.clear();
Comment thread Test/src/SPFreshTest.cpp
DistCalcMethod distMethod = iniReader.GetParameter("Benchmark", "DistMethod", DistCalcMethod::L2);
bool rebuild = iniReader.GetParameter("Benchmark", "Rebuild", true);
bool rebuildSsdOnly = iniReader.GetParameter("Benchmark", "RebuildSSDOnly", false);
bool rebuild = (iniReader.GetParameter("Benchmark", "Rebuild", true) || iniReader.GetParameter("Benchmark", "RebuildSSDOnly", false));
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 13 changed files in this pull request and generated 3 comments.

Comment on lines +1208 to +1222
std::vector<int> fetchedCounts;
AsyncGetPostingCounts(keys, &fetchedCounts,
std::chrono::microseconds(5000000));

auto batch = std::make_shared<TiKVIO::AsyncBatch>();
batch->Add(static_cast<int>(keys.size()));

// std::vector<std::atomic<int>> is non-resizable but in-place
// constructible to size N with zero-initialization.
std::vector<std::atomic<int>> okFlags(keys.size());
for (auto& f : okFlags) f.store(0, std::memory_order_relaxed);

for (size_t i = 0; i < keys.size(); i++) {
int newCount = fetchedCounts[i] + static_cast<int>(values[i].size());
AsyncAppendChunkAndUpdateCount(
Comment on lines +601 to +604
if (!hasHead) {
SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "CheckCentroid cannot find head in posting! pid:%d, where:%s\n", pid, where.c_str());
exit(-1);
}
Comment on lines +661 to +667
int count = static_cast<int>(value.size());
auto countRet = SetPostingCount(key, count, timeout);
if (countRet != ErrorCode::Success) {
SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, "PutPostingToDB: SetPostingCount failed for key %d (data written OK)\n", key);
}
if (m_postingCountCache) m_postingCountCache->Put(key, count);
return ErrorCode::Success;
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 13 changed files in this pull request and generated 5 comments.

Comment thread AnnService/inc/Core/SPANN/ExtraTiKVController.h Outdated
Comment on lines +601 to +603
if (!hasHead) {
SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "CheckCentroid cannot find head in posting! pid:%d, where:%s\n", pid, where.c_str());
exit(-1);
Comment on lines +2696 to +2699
std::error_code ec;
std::string prevHeadVectorFile = m_opt->m_indexDirectory + FolderSep + m_opt->m_headIndexFolder + FolderSep + p_headIndex->GetParameter("VectorFilePath");
std::string curHeadVectorFile = m_opt->m_indexDirectory + FolderSep + m_opt->m_headVectorFile;
std::filesystem::copy_file(prevHeadVectorFile, curHeadVectorFile, std::filesystem::copy_options::overwrite_existing, ec);
Comment on lines +89 to +91
struct ShardData {
std::list<std::pair<SizeType, int>> order; // front = MRU
std::unordered_map<SizeType, std::list<std::pair<SizeType, int>>::iterator> map;
Comment thread AnnService/inc/Helper/KeyValueIO.h
zqxjjj and others added 2 commits May 18, 2026 16:14
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@zqxjjj zqxjjj requested a review from Copilot May 18, 2026 08:16
@zqxjjj
Copy link
Copy Markdown
Collaborator

zqxjjj commented May 18, 2026

{
"timestamp": "2026-05-18T02:56:29",
"config": {
"vectorPath": "/mnt/md0/qiazh/sift1b/base.1B.u8bin",
"queryPath": "/mnt/md0/qiazh/sift1b/query.public.10K.u8bin",
"truthPath": "truth",
"indexPath": "/mnt/md0/qiazh/sptag_bench/spfresh_sift1b_v10_multichunk/spann_index",
"quantizerPath": "",
"ValueType": "UInt8",
"dimension": 128,
"baseVectorCount": 1000000,
"insertVectorCount": 10000000,
"DeleteVectorCount": 0,
"BatchNum": 10,
"topK": 5,
"numQueries": 200,
"numSearchThreads": 4,
"numInsertThreads": 16,
"layers": 2,
"DistMethod": "L2"
},
"results": {
"build timeSeconds": 96.6067,
"benchmark0_query_before_insert": {
"numQueries": 200,
"meanLatency": 11.2112,
"p50": 10.9680,
"p90": 12.8920,
"p95": 13.9680,
"p99": 15.4270,
"minLatency": 8.5350,
"maxLatency": 15.5240,
"qps": 354.2977,
"latencyBreakdown": {
"postingReadMs": {"mean": 5.9106, "p50": 5.8290, "p90": 7.2040, "p95": 7.7870, "p99": 8.4700},
"versionMapMs": {"mean": 4.2461, "p50": 4.1730, "p90": 4.8070, "p95": 5.1840, "p99": 5.8000},
"compMs": {"mean": 0.1072, "p50": 0.1100, "p90": 0.1500, "p95": 0.1610, "p99": 0.2070},
"setupMs": {"mean": 2.1835, "p50": 2.1320, "p90": 2.5300, "p95": 2.8370, "p99": 3.8700},
"layers": {
"0": {
"postingReadMs": {"mean": 2.9268, "p50": 2.8540, "p90": 3.6130, "p95": 3.8090, "p99": 4.5060},
"versionMapMs": {"mean": 4.2461, "p50": 4.1730, "p90": 4.8070, "p95": 5.1840, "p99": 5.8000},
"compMs": {"mean": 0.0613, "p50": 0.0600, "p90": 0.0870, "p95": 0.0990, "p99": 0.1590},
"setupMs": {"mean": 2.1835, "p50": 2.1320, "p90": 2.5300, "p95": 2.8370, "p99": 3.8700},
"totalMs": {"mean": 5.1253, "p50": 4.9840, "p90": 6.0500, "p95": 6.3200, "p99": 6.8840},
"postingCountMean": 64.0000,
"versionCheckCountMean": 64.0000,
"listElementsMean": 2172.7200
},
"1": {
"postingReadMs": {"mean": 2.9838, "p50": 2.8510, "p90": 4.0080, "p95": 4.1900, "p99": 4.5430},
"versionMapMs": {"mean": 0.0000, "p50": 0.0000, "p90": 0.0000, "p95": 0.0000, "p99": 0.0000},
"compMs": {"mean": 0.0459, "p50": 0.0460, "p90": 0.0670, "p95": 0.0770, "p99": 0.1050},
"setupMs": {"mean": 0.0308, "p50": 0.0290, "p90": 0.0410, "p95": 0.0490, "p99": 0.0610},
"totalMs": {"mean": 3.0666, "p50": 2.9260, "p90": 4.1020, "p95": 4.2530, "p99": 4.6390},
"postingCountMean": 64.0000,
"versionCheckCountMean": 0.0000,
"listElementsMean": 1916.4150
}
}
},
"recall": {
"recallAtK": 0.9830,
"k": 5,
"numQueries": 200
}
},
"benchmark0b_query_before_insert_round2": {
"numQueries": 200,
"meanLatency": 11.6162,
"p50": 11.4720,
"p90": 13.0120,
"p95": 13.3690,
"p99": 15.6570,
"minLatency": 9.0280,
"maxLatency": 16.0970,
"qps": 342.7169,
"latencyBreakdown": {
"postingReadMs": {"mean": 6.1998, "p50": 6.1260, "p90": 7.3190, "p95": 7.5970, "p99": 8.8290},
"versionMapMs": {"mean": 4.3824, "p50": 4.3340, "p90": 4.9520, "p95": 5.3130, "p99": 5.9750},
"compMs": {"mean": 0.1082, "p50": 0.1110, "p90": 0.1500, "p95": 0.1660, "p99": 0.2000},
"setupMs": {"mean": 2.2613, "p50": 2.2340, "p90": 2.6340, "p95": 2.8400, "p99": 3.3030},
"layers": {
"0": {
"postingReadMs": {"mean": 3.1719, "p50": 3.0770, "p90": 3.9580, "p95": 4.2480, "p99": 4.9210},
"versionMapMs": {"mean": 4.3824, "p50": 4.3340, "p90": 4.9520, "p95": 5.3130, "p99": 5.9750},
"compMs": {"mean": 0.0611, "p50": 0.0620, "p90": 0.0860, "p95": 0.0950, "p99": 0.1230},
"setupMs": {"mean": 2.2613, "p50": 2.2340, "p90": 2.6340, "p95": 2.8400, "p99": 3.3030},
"totalMs": {"mean": 5.4305, "p50": 5.4190, "p90": 6.3510, "p95": 6.7390, "p99": 7.3530},
"postingCountMean": 64.0000,
"versionCheckCountMean": 64.0000,
"listElementsMean": 2172.7200
},
"1": {
"postingReadMs": {"mean": 3.0278, "p50": 2.9640, "p90": 3.7620, "p95": 4.1180, "p99": 4.4510},
"versionMapMs": {"mean": 0.0000, "p50": 0.0000, "p90": 0.0000, "p95": 0.0000, "p99": 0.0000},
"compMs": {"mean": 0.0471, "p50": 0.0460, "p90": 0.0710, "p95": 0.0770, "p99": 0.0940},
"setupMs": {"mean": 0.0306, "p50": 0.0280, "p90": 0.0400, "p95": 0.0540, "p99": 0.0700},
"totalMs": {"mean": 3.1117, "p50": 3.0400, "p90": 3.8610, "p95": 4.2330, "p99": 4.5600},
"postingCountMean": 64.0000,
"versionCheckCountMean": 0.0000,
"listElementsMean": 1916.4150
}
}
},
"recall": {
"recallAtK": 0.9830,
"k": 5,
"numQueries": 200
}
},
"benchmark1_insert": {
"batch_1": {
"Load timeSeconds": 0.5459,
"Load vectorCount": 1000000,
"Clone timeSeconds": 0.7677,
"numQueries": 200,
"meanLatency": 10.0525,
"p50": 9.8240,
"p90": 10.8890,
"p95": 11.2320,
"p99": 12.2770,
"minLatency": 8.1480,
"maxLatency": 45.0090,
"qps": 0.0995,
"batch barrier waitSeconds": 0.0000,
"inserted": 1000000,
"insert timeSeconds": 4972.5303,
"insert throughput": 201.1049,
"search": {
"numQueries": 200,
"meanLatency": 11.6414,
"p50": 11.6710,
"p90": 13.0260,
"p95": 13.3430,
"p99": 14.6400,
"minLatency": 9.2830,
"maxLatency": 14.6700,
"qps": 340.4215,
"latencyBreakdown": {
"postingReadMs": {"mean": 5.9548, "p50": 5.8420, "p90": 7.0260, "p95": 7.6320, "p99": 8.4420},
"versionMapMs": {"mean": 4.6371, "p50": 4.6480, "p90": 5.2200, "p95": 5.4010, "p99": 5.8190},
"compMs": {"mean": 0.1564, "p50": 0.1500, "p90": 0.2240, "p95": 0.2620, "p99": 0.3130},
"setupMs": {"mean": 2.3134, "p50": 2.2610, "p90": 2.6860, "p95": 2.8190, "p99": 3.1410},
"layers": {
"0": {
"postingReadMs": {"mean": 3.1343, "p50": 3.0580, "p90": 4.0240, "p95": 4.3400, "p99": 5.0320},
"versionMapMs": {"mean": 4.6371, "p50": 4.6480, "p90": 5.2200, "p95": 5.4010, "p99": 5.8190},
"compMs": {"mean": 0.1176, "p50": 0.1120, "p90": 0.1650, "p95": 0.1960, "p99": 0.2680},
"setupMs": {"mean": 2.3134, "p50": 2.2610, "p90": 2.6860, "p95": 2.8190, "p99": 3.1410},
"totalMs": {"mean": 5.6482, "p50": 5.6230, "p90": 6.5680, "p95": 6.8940, "p99": 7.4720},
"postingCountMean": 64.0000,
"versionCheckCountMean": 64.0000,
"listElementsMean": 4374.2000
},
"1": {
"postingReadMs": {"mean": 2.8205, "p50": 2.7890, "p90": 3.4790, "p95": 3.8470, "p99": 4.4440},
"versionMapMs": {"mean": 0.0000, "p50": 0.0000, "p90": 0.0000, "p95": 0.0000, "p99": 0.0000},
"compMs": {"mean": 0.0389, "p50": 0.0360, "p90": 0.0630, "p95": 0.0810, "p99": 0.1210},
"setupMs": {"mean": 0.0290, "p50": 0.0270, "p90": 0.0390, "p95": 0.0450, "p99": 0.0740},
"totalMs": {"mean": 2.8962, "p50": 2.8590, "p90": 3.5580, "p95": 3.9080, "p99": 4.5080},
"postingCountMean": 64.0000,
"versionCheckCountMean": 0.0000,
"listElementsMean": 1922.3450
}
}
},
"recall": {
"recallAtK": 0.9870,
"k": 5,
"numQueries": 200
}
},
"search_round2": {
"numQueries": 200,
"meanLatency": 11.5796,
"p50": 11.5820,
"p90": 12.9590,
"p95": 13.2890,
"p99": 14.0620,
"minLatency": 8.6420,
"maxLatency": 14.0950,
"qps": 342.6107,
"latencyBreakdown": {
"postingReadMs": {"mean": 5.8696, "p50": 5.8080, "p90": 6.8190, "p95": 7.2820, "p99": 7.7500},
"versionMapMs": {"mean": 4.6627, "p50": 4.6530, "p90": 5.2400, "p95": 5.3830, "p99": 5.7890},
"compMs": {"mean": 0.1551, "p50": 0.1550, "p90": 0.2050, "p95": 0.2300, "p99": 0.2890},
"setupMs": {"mean": 2.3363, "p50": 2.3030, "p90": 2.7140, "p95": 2.8600, "p99": 3.0640},
"layers": {
"0": {
"postingReadMs": {"mean": 3.0546, "p50": 3.0160, "p90": 3.7230, "p95": 4.0850, "p99": 4.6330},
"versionMapMs": {"mean": 4.6627, "p50": 4.6530, "p90": 5.2400, "p95": 5.3830, "p99": 5.7890},
"compMs": {"mean": 0.1157, "p50": 0.1160, "p90": 0.1480, "p95": 0.1570, "p99": 0.2100},
"setupMs": {"mean": 2.3363, "p50": 2.3030, "p90": 2.7140, "p95": 2.8600, "p99": 3.0640},
"totalMs": {"mean": 5.5698, "p50": 5.4640, "p90": 6.4710, "p95": 6.7650, "p99": 7.4710},
"postingCountMean": 64.0000,
"versionCheckCountMean": 64.0000,
"listElementsMean": 4374.2000
},
"1": {
"postingReadMs": {"mean": 2.8150, "p50": 2.7870, "p90": 3.3550, "p95": 3.6840, "p99": 4.2100},
"versionMapMs": {"mean": 0.0000, "p50": 0.0000, "p90": 0.0000, "p95": 0.0000, "p99": 0.0000},
"compMs": {"mean": 0.0394, "p50": 0.0370, "p90": 0.0660, "p95": 0.0790, "p99": 0.1250},
"setupMs": {"mean": 0.0280, "p50": 0.0260, "p90": 0.0380, "p95": 0.0430, "p99": 0.0570},
"totalMs": {"mean": 2.8913, "p50": 2.8590, "p90": 3.4150, "p95": 3.7990, "p99": 4.3280},
"postingCountMean": 64.0000,
"versionCheckCountMean": 0.0000,
"listElementsMean": 1922.3450
}
}
},
"recall": {
"recallAtK": 0.9870,
"k": 5,
"numQueries": 200
}
},
"save timeSeconds": 0.0926
},
"batch_2": {
"Load timeSeconds": 1.0513,
"Load vectorCount": 2000000,
"Clone timeSeconds": 1.3666,
"numQueries": 200,
"meanLatency": 10.2565,
"p50": 10.0260,
"p90": 10.9020,
"p95": 11.3020,
"p99": 12.4700,
"minLatency": 8.5060,
"maxLatency": 48.6810,
"qps": 0.0975,
"batch barrier waitSeconds": 0.0000,
"inserted": 1000000,
"insert timeSeconds": 4960.1582,
"insert throughput": 201.6065,
"search": {
"numQueries": 200,
"meanLatency": 10.9063,
"p50": 10.8360,
"p90": 12.2500,
"p95": 12.6530,
"p99": 13.7500,
"minLatency": 9.0420,
"maxLatency": 13.9240,
"qps": 365.5445,
"latencyBreakdown": {
"postingReadMs": {"mean": 7.2743, "p50": 7.2740, "p90": 8.4080, "p95": 8.8960, "p99": 9.6650},
"versionMapMs": {"mean": 2.4877, "p50": 2.2860, "p90": 3.3630, "p95": 3.7530, "p99": 4.9230},
"compMs": {"mean": 0.2543, "p50": 0.2540, "p90": 0.3470, "p95": 0.3840, "p99": 0.4390},
"setupMs": {"mean": 1.2241, "p50": 1.1300, "p90": 1.5740, "p95": 2.0390, "p99": 2.8120},
"layers": {
"0": {
"postingReadMs": {"mean": 3.8034, "p50": 3.8180, "p90": 4.5830, "p95": 4.8790, "p99": 5.2510},
"versionMapMs": {"mean": 2.4877, "p50": 2.2860, "p90": 3.3630, "p95": 3.7530, "p99": 4.9230},
"compMs": {"mean": 0.2031, "p50": 0.2010, "p90": 0.2770, "p95": 0.3090, "p99": 0.3860},
"setupMs": {"mean": 1.2241, "p50": 1.1300, "p90": 1.5740, "p95": 2.0390, "p99": 2.8120},
"totalMs": {"mean": 5.3496, "p50": 5.2800, "p90": 6.3240, "p95": 6.5870, "p99": 7.2940},
"postingCountMean": 64.0000,
"versionCheckCountMean": 64.0000,
"listElementsMean": 6400.6300
},
"1": {
"postingReadMs": {"mean": 3.4709, "p50": 3.3790, "p90": 4.3570, "p95": 4.5270, "p99": 4.9390},
"versionMapMs": {"mean": 0.0000, "p50": 0.0000, "p90": 0.0000, "p95": 0.0000, "p99": 0.0000},
"compMs": {"mean": 0.0512, "p50": 0.0500, "p90": 0.0820, "p95": 0.0930, "p99": 0.1330},
"setupMs": {"mean": 0.0320, "p50": 0.0300, "p90": 0.0440, "p95": 0.0510, "p99": 0.0700},
"totalMs": {"mean": 3.5585, "p50": 3.4700, "p90": 4.4380, "p95": 4.5930, "p99": 5.0610},
"postingCountMean": 64.0000,
"versionCheckCountMean": 0.0000,
"listElementsMean": 1976.8850
}
}
},
"recall": {
"recallAtK": 0.9890,
"k": 5,
"numQueries": 200
}
},
"search_round2": {
"numQueries": 200,
"meanLatency": 10.2469,
"p50": 10.1340,
"p90": 11.7170,
"p95": 12.1330,
"p99": 12.7790,
"minLatency": 8.2960,
"maxLatency": 12.7940,
"qps": 387.3004,
"latencyBreakdown": {
"postingReadMs": {"mean": 6.5187, "p50": 6.4080, "p90": 7.9460, "p95": 8.1580, "p99": 8.5070},
"versionMapMs": {"mean": 2.5428, "p50": 2.4120, "p90": 3.4500, "p95": 3.7260, "p99": 4.4200},
"compMs": {"mean": 0.2605, "p50": 0.2570, "p90": 0.3430, "p95": 0.3880, "p99": 0.5110},
"setupMs": {"mean": 1.2751, "p50": 1.1670, "p90": 1.8050, "p95": 2.1160, "p99": 2.9690},
"layers": {
"0": {
"postingReadMs": {"mean": 3.4040, "p50": 3.3800, "p90": 4.2650, "p95": 4.4830, "p99": 4.8870},
"versionMapMs": {"mean": 2.5428, "p50": 2.4120, "p90": 3.4500, "p95": 3.7260, "p99": 4.4200},
"compMs": {"mean": 0.2058, "p50": 0.1990, "p90": 0.2700, "p95": 0.3010, "p99": 0.3810},
"setupMs": {"mean": 1.2751, "p50": 1.1670, "p90": 1.8050, "p95": 2.1160, "p99": 2.9690},
"totalMs": {"mean": 4.9560, "p50": 4.8690, "p90": 5.8340, "p95": 6.0800, "p99": 6.6050},
"postingCountMean": 64.0000,
"versionCheckCountMean": 64.0000,
"listElementsMean": 6400.6300
},
"1": {
"postingReadMs": {"mean": 3.1147, "p50": 2.9510, "p90": 4.0670, "p95": 4.2640, "p99": 4.5570},
"versionMapMs": {"mean": 0.0000, "p50": 0.0000, "p90": 0.0000, "p95": 0.0000, "p99": 0.0000},
"compMs": {"mean": 0.0547, "p50": 0.0520, "p90": 0.0810, "p95": 0.1040, "p99": 0.1580},
"setupMs": {"mean": 0.0345, "p50": 0.0320, "p90": 0.0480, "p95": 0.0530, "p99": 0.0850},
"totalMs": {"mean": 3.2059, "p50": 3.0530, "p90": 4.1400, "p95": 4.3700, "p99": 4.6620},
"postingCountMean": 64.0000,
"versionCheckCountMean": 0.0000,
"listElementsMean": 1976.8850
}
}
},
"recall": {
"recallAtK": 0.9890,
"k": 5,
"numQueries": 200
}
},
"save timeSeconds": 0.1162
},
"batch_3": {
"Load timeSeconds": 1.0826,
"Load vectorCount": 3000000,
"Clone timeSeconds": 1.4206,
"numQueries": 200,
"meanLatency": 8.3188,
"p50": 8.0870,
"p90": 9.1550,
"p95": 9.5300,
"p99": 10.2320,
"minLatency": 6.6190,
"maxLatency": 42.7150,
"qps": 0.1202,
"batch barrier waitSeconds": 1.3254,
"inserted": 1000000,
"insert timeSeconds": 5287.6797,
"insert throughput": 189.1189,
"search": {
"numQueries": 200,
"meanLatency": 10.3117,
"p50": 10.1460,
"p90": 11.9360,
"p95": 12.4040,
"p99": 13.6380,
"minLatency": 7.5530,
"maxLatency": 14.2400,
"qps": 385.2911,
"latencyBreakdown": {
"postingReadMs": {"mean": 6.8284, "p50": 6.7700, "p90": 8.0860, "p95": 8.6880, "p99": 10.1370},
"versionMapMs": {"mean": 2.2952, "p50": 2.1840, "p90": 2.9400, "p95": 3.1900, "p99": 4.4680},
"compMs": {"mean": 0.3065, "p50": 0.3040, "p90": 0.4280, "p95": 0.4670, "p99": 0.5580},
"setupMs": {"mean": 1.1546, "p50": 1.0720, "p90": 1.5630, "p95": 1.7230, "p99": 2.3010},
"layers": {
"0": {
"postingReadMs": {"mean": 3.6760, "p50": 3.6250, "p90": 4.5920, "p95": 4.8660, "p99": 5.7650},
"versionMapMs": {"mean": 2.2952, "p50": 2.1840, "p90": 2.9400, "p95": 3.1900, "p99": 4.4680},
"compMs": {"mean": 0.2546, "p50": 0.2480, "p90": 0.3500, "p95": 0.3830, "p99": 0.4250},
"setupMs": {"mean": 1.1546, "p50": 1.0720, "p90": 1.5630, "p95": 1.7230, "p99": 2.3010},
"totalMs": {"mean": 5.1484, "p50": 5.1040, "p90": 6.1330, "p95": 6.3150, "p99": 7.1830},
"postingCountMean": 64.0000,
"versionCheckCountMean": 64.0000,
"listElementsMean": 7878.5500
},
"1": {
"postingReadMs": {"mean": 3.1524, "p50": 3.0630, "p90": 4.0200, "p95": 4.3000, "p99": 5.6670},
"versionMapMs": {"mean": 0.0000, "p50": 0.0000, "p90": 0.0000, "p95": 0.0000, "p99": 0.0000},
"compMs": {"mean": 0.0520, "p50": 0.0480, "p90": 0.0880, "p95": 0.1090, "p99": 0.1510},
"setupMs": {"mean": 0.0283, "p50": 0.0270, "p90": 0.0390, "p95": 0.0440, "p99": 0.0470},
"totalMs": {"mean": 3.2407, "p50": 3.1440, "p90": 4.1130, "p95": 4.4010, "p99": 5.7600},
"postingCountMean": 64.0000,
"versionCheckCountMean": 0.0000,
"listElementsMean": 2166.6200
}
}
},
"recall": {
"recallAtK": 0.9830,
"k": 5,
"numQueries": 200
}
},
"search_round2": {
"numQueries": 200,
"meanLatency": 10.7606,
"p50": 10.7200,
"p90": 12.0770,
"p95": 12.5270,
"p99": 13.7450,
"minLatency": 7.9880,
"maxLatency": 13.8550,
"qps": 369.7062,
"latencyBreakdown": {
"postingReadMs": {"mean": 7.0573, "p50": 7.0430, "p90": 8.3370, "p95": 8.8650, "p99": 9.5760},
"versionMapMs": {"mean": 2.4055, "p50": 2.2470, "p90": 3.2410, "p95": 3.6080, "p99": 4.8700},
"compMs": {"mean": 0.3497, "p50": 0.3380, "p90": 0.5050, "p95": 0.5640, "p99": 0.7420},
"setupMs": {"mean": 1.2226, "p50": 1.1570, "p90": 1.7200, "p95": 1.9810, "p99": 2.4250},
"layers": {
"0": {
"postingReadMs": {"mean": 3.8146, "p50": 3.8460, "p90": 4.7470, "p95": 5.0250, "p99": 5.7720},
"versionMapMs": {"mean": 2.4055, "p50": 2.2470, "p90": 3.2410, "p95": 3.6080, "p99": 4.8700},
"compMs": {"mean": 0.2862, "p50": 0.2750, "p90": 0.4040, "p95": 0.4640, "p99": 0.5270},
"setupMs": {"mean": 1.2226, "p50": 1.1570, "p90": 1.7200, "p95": 1.9810, "p99": 2.4250},
"totalMs": {"mean": 5.3644, "p50": 5.3520, "p90": 6.3370, "p95": 6.6800, "p99": 7.2630},
"postingCountMean": 64.0000,
"versionCheckCountMean": 64.0000,
"listElementsMean": 7878.5500
},
"1": {
"postingReadMs": {"mean": 3.2426, "p50": 3.1730, "p90": 4.1540, "p95": 4.3620, "p99": 4.9130},
"versionMapMs": {"mean": 0.0000, "p50": 0.0000, "p90": 0.0000, "p95": 0.0000, "p99": 0.0000},
"compMs": {"mean": 0.0635, "p50": 0.0610, "p90": 0.1050, "p95": 0.1340, "p99": 0.2150},
"setupMs": {"mean": 0.0347, "p50": 0.0330, "p90": 0.0500, "p95": 0.0540, "p99": 0.0970},
"totalMs": {"mean": 3.3421, "p50": 3.2660, "p90": 4.2680, "p95": 4.4590, "p99": 4.9610},
"postingCountMean": 64.0000,
"versionCheckCountMean": 0.0000,
"listElementsMean": 2166.6200
}
}
},
"recall": {
"recallAtK": 0.9830,
"k": 5,
"numQueries": 200
}
},
"save timeSeconds": 0.1441
},
"batch_4": {
"Load timeSeconds": 1.2967,
"Load vectorCount": 4000000,
"Clone timeSeconds": 1.7333,
"numQueries": 200,
"meanLatency": 12.2591,
"p50": 11.7700,
"p90": 15.3690,
"p95": 16.8080,
"p99": 29.7650,
"minLatency": 7.4620,
"maxLatency": 40.7170,
"qps": 0.0816,
"batch barrier waitSeconds": 1.7674,
"inserted": 1000000,
"insert timeSeconds": 5162.9756,
"insert throughput": 193.6868,
"search": {
"numQueries": 200,
"meanLatency": 11.4799,
"p50": 11.5080,
"p90": 12.4140,
"p95": 12.6350,
"p99": 15.3130,
"minLatency": 8.3070,
"maxLatency": 15.3490,
"qps": 345.2746,
"latencyBreakdown": {
"postingReadMs": {"mean": 7.7196, "p50": 7.8700, "p90": 8.7910, "p95": 9.0700, "p99": 10.3950},
"versionMapMs": {"mean": 2.2748, "p50": 2.1470, "p90": 3.0060, "p95": 3.4430, "p99": 4.7920},
"compMs": {"mean": 0.4103, "p50": 0.3670, "p90": 0.5950, "p95": 0.6870, "p99": 0.8710},
"setupMs": {"mean": 1.1436, "p50": 1.0750, "p90": 1.4840, "p95": 1.6820, "p99": 2.6490},
"layers": {
"0": {
"postingReadMs": {"mean": 4.3066, "p50": 4.4160, "p90": 5.2130, "p95": 5.4070, "p99": 6.1370},
"versionMapMs": {"mean": 2.2748, "p50": 2.1470, "p90": 3.0060, "p95": 3.4430, "p99": 4.7920},
"compMs": {"mean": 0.3297, "p50": 0.3010, "p90": 0.4810, "p95": 0.5340, "p99": 0.6480},
"setupMs": {"mean": 1.1436, "p50": 1.0750, "p90": 1.4840, "p95": 1.6820, "p99": 2.6490},
"totalMs": {"mean": 5.8532, "p50": 5.9720, "p90": 6.6890, "p95": 6.8290, "p99": 7.4980},
"postingCountMean": 64.0000,
"versionCheckCountMean": 64.0000,
"listElementsMean": 8663.8250
},
"1": {
"postingReadMs": {"mean": 3.4130, "p50": 3.4140, "p90": 4.2540, "p95": 4.5470, "p99": 4.9050},
"versionMapMs": {"mean": 0.0000, "p50": 0.0000, "p90": 0.0000, "p95": 0.0000, "p99": 0.0000},
"compMs": {"mean": 0.0806, "p50": 0.0760, "p90": 0.1340, "p95": 0.1630, "p99": 0.2760},
"setupMs": {"mean": 0.0359, "p50": 0.0350, "p90": 0.0490, "p95": 0.0580, "p99": 0.0810},
"totalMs": {"mean": 3.5292, "p50": 3.5410, "p90": 4.3760, "p95": 4.6610, "p99": 5.0110},
"postingCountMean": 64.0000,
"versionCheckCountMean": 0.0000,
"listElementsMean": 2474.3500
}
}
},
"recall": {
"recallAtK": 0.9830,
"k": 5,
"numQueries": 200
}
},
"search_round2": {
"numQueries": 200,
"meanLatency": 10.5197,
"p50": 10.3840,
"p90": 11.8000,
"p95": 12.8010,
"p99": 15.4470,
"minLatency": 8.3320,
"maxLatency": 16.5240,
"qps": 378.5785,
"latencyBreakdown": {
"postingReadMs": {"mean": 6.7009, "p50": 6.5150, "p90": 7.9830, "p95": 8.6630, "p99": 10.2100},
"versionMapMs": {"mean": 2.4775, "p50": 2.3050, "p90": 3.2530, "p95": 3.6430, "p99": 4.2980},
"compMs": {"mean": 0.3378, "p50": 0.3320, "p90": 0.4160, "p95": 0.4560, "p99": 0.6750},
"setupMs": {"mean": 1.2801, "p50": 1.1410, "p90": 1.8760, "p95": 2.2020, "p99": 2.6030},
"layers": {
"0": {
"postingReadMs": {"mean": 3.6426, "p50": 3.5790, "p90": 4.4810, "p95": 5.0220, "p99": 5.8510},
"versionMapMs": {"mean": 2.4775, "p50": 2.3050, "p90": 3.2530, "p95": 3.6430, "p99": 4.2980},
"compMs": {"mean": 0.2776, "p50": 0.2690, "p90": 0.3330, "p95": 0.3640, "p99": 0.5270},
"setupMs": {"mean": 1.2801, "p50": 1.1410, "p90": 1.8760, "p95": 2.2020, "p99": 2.6030},
"totalMs": {"mean": 5.1961, "p50": 5.0840, "p90": 6.0720, "p95": 6.3900, "p99": 8.4580},
"postingCountMean": 64.0000,
"versionCheckCountMean": 64.0000,
"listElementsMean": 8663.8250
},
"1": {
"postingReadMs": {"mean": 3.0583, "p50": 2.9170, "p90": 3.8660, "p95": 4.4720, "p99": 5.2850},
"versionMapMs": {"mean": 0.0000, "p50": 0.0000, "p90": 0.0000, "p95": 0.0000, "p99": 0.0000},
"compMs": {"mean": 0.0602, "p50": 0.0590, "p90": 0.0950, "p95": 0.1060, "p99": 0.1760},
"setupMs": {"mean": 0.0288, "p50": 0.0280, "p90": 0.0380, "p95": 0.0400, "p99": 0.0470},
"totalMs": {"mean": 3.1540, "p50": 3.0220, "p90": 3.9670, "p95": 4.6650, "p99": 5.3620},
"postingCountMean": 64.0000,
"versionCheckCountMean": 0.0000,
"listElementsMean": 2474.3500
}
}
},
"recall": {
"recallAtK": 0.9830,
"k": 5,
"numQueries": 200
}
},
"save timeSeconds": 0.1792
},

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 13 changed files in this pull request and generated 4 comments.

{ static std::atomic<int> _logOnce{0}; if (_logOnce.fetch_add(1) == 0) SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "[PATH] Append using SINGLE-KEY Get+Put path (no multi-chunk)\n"); }
std::string fullPosting;
auto ret = Get(key, &fullPosting, MaxTimeout, reqs);
if (ret == ErrorCode::KeyNotFound) {
Comment thread Test/src/SPFreshTest.cpp
DistCalcMethod distMethod = iniReader.GetParameter("Benchmark", "DistMethod", DistCalcMethod::L2);
bool rebuild = iniReader.GetParameter("Benchmark", "Rebuild", true);
bool rebuildSsdOnly = iniReader.GetParameter("Benchmark", "RebuildSSDOnly", false);
bool rebuild = (iniReader.GetParameter("Benchmark", "Rebuild", true) || iniReader.GetParameter("Benchmark", "RebuildSSDOnly", false));
Comment on lines +601 to +603
if (!hasHead) {
SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "CheckCentroid cannot find head in posting! pid:%d, where:%s\n", pid, where.c_str());
exit(-1);
Comment on lines +1103 to +1113
SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "Loading headIDFile for layer %d...\n", currentLayer - 1);
std::shared_ptr<Helper::DiskIO> ptr = SPTAG::f_createIO();
if (ptr == nullptr ||
!ptr->Initialize((m_options.m_indexDirectory + FolderSep + m_options.m_headIDFile).c_str(),
std::ios::binary | std::ios::in))
{
SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "No headIDFile file:%s\n",
(m_options.m_indexDirectory + FolderSep + m_options.m_headIDFile).c_str());
}
else {
localToGlobalID.Load(ptr, this->m_iDataBlockSize, this->m_iDataCapacity);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants