网站设计方案案例,深圳外贸招聘,h5制作软件是什么意思,商城型移动端网站开发多少钱IVF_FLAT (Inverted File with Flat Indexing)
优点:
在数据量适中且维度不是非常高的情况下#xff0c;IVF_FLAT能提供精确的最近邻搜索结果。
相对简单#xff0c;易于理解和实现。
缺点:
当数据集非常大时#xff0c;IVF_FLAT需要大量的内存来存储整个数据集#xff0c;…IVF_FLAT (Inverted File with Flat Indexing)
优点:
在数据量适中且维度不是非常高的情况下IVF_FLAT能提供精确的最近邻搜索结果。
相对简单易于理解和实现。
缺点:
当数据集非常大时IVF_FLAT需要大量的内存来存储整个数据集这可能导致性能瓶颈。
检索速度随着数据集的增长而显著降低因为需要与所有候选数据点计算相似度。
HNSW (Hierarchical Navigable Small World Graphs)
优点:
HNSW特别适合高维数据能够在大规模数据集上提供高效的近似最近邻搜索。
即使数据集很大HNSW也能保持较快的查询速度。
缺点:
HNSW的构建过程可能较为复杂和耗时尤其是在数据流式更新的情况下。
结果为近似最近邻虽然通常足够准确但在某些场景下可能不如IVF_FLAT精确。
对于小数据场景特别是如果数据量不大且可以接受较高的内存消耗IVF_FLAT可能是一个更好的选择因为它能提供精确的结果。然而如果数据集的维度非常高或者你希望优化查询速度即使数据量较小HNSW仍然可能是更优的选择。
在实际应用中选择哪一种算法还应考虑具体业务需求比如是否可以容忍近似结果、系统资源限制、以及是否需要实时更新索引等因素。如果数据量和维度都不大而且对查询速度的要求不是特别高那么IVF_FLAT可能就足够了但如果需要在高维数据上进行快速查询HNSW则更加合适。
HNSW 分层可导航小世界图索引
1.M
M是一个关键参数它定义了图中每个节点的最大出边数即每个节点可以连接到的最多其他节点的数量
在HNSW的多级图结构中M控制着图的连通性和密度。
2.efConstruction
efConstruction定义了在构建图时算法为每个节点寻找最近邻时考虑的候选节点数量。换句话说它是构建索引过程中用于决定每个节点连接哪些其他节点的探索因子。
它控制了算法在添加新节点时考虑的候选邻居数量。当添加一个新节点时算法会从当前图中选取efConstruction个节点作为候选并从中挑选出最佳的邻居节点来建立连接
3.ef-search
ef_search有时简写为 ef是HNSWHierarchical Navigable Small World graphs算法中用于查询阶段的一个重要参数。在查询时ef_search定义了算法在试图找到最近邻时考虑的候选节点数量。
它控制着搜索的广度即算法在搜索图时愿意检查多少条边。
ef_search 控制搜索过程的效率和精度它影响算法在搜索时探索的路径数量。
4.k
k通常是指查询时返回的最近邻nearest neighbors的数量IVF_FALT 带平面索引的倒排文件
lists
lists参数实际上指的是nlist它是IVF_FLAT索引中聚类或列表的数量。nlist决定了数据集被分割成多少个子集。
probes
probes参数是指在搜索时实际检查的聚类数量官网地址如下 https://zilliz.com/vector-database-benchmark-tool?databaseZillizCloud%2CMilvus%2CElasticCloud%2CPgVector%2CPinecone%2CQdrantCloud%2CWeaviateClouddatasetmediumfilternone%2Clow%2Chightab1
https://gitee.com/woohello/VectorDBBench
1.前置条件 1.python 3.11 Ssl 问题解决 https://cloud.tencent.com/developer/article/2424089 https://blog.csdn.net/qq_43370607/article/details/137382955
pip install vectordb-bench1.ivf_flat 性能验证
nohup ./ivf_flat.sh /root/octopus/benchmarker/dimension/ivf_flat.log 21 /usr/local/python3.12/bin/vectordbbench milvusivfflat --uri http://xxxxx:32437 --drop-old --lists 1024 --probes 5{run_id: 09c01adfa7a5470ea6176855cccd5628,task_label: 09c01adfa7a5470ea6176855cccd5628,results: [{metrics: {max_load_count: 0,load_duration: 158.9442,qps: 3031.743,serial_latency_p99: 0.008,recall: 0.5065,ndcg: 0.5493,conc_num_list: [1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100],conc_qps_list: [175.7321, 838.1756, 1328.4196, 1676.7759, 1885.2717, 2329.0303, 2238.8839, 2307.6002, 2418.9697, 2502.9213, 2628.4562, 2611.9513, 2631.2078, 2709.1865, 2751.1792, 2749.1104, 2792.9155, 2752.8945, 2836.4445, 2904.4609, 3031.743],conc_latency_p99_list: [0.004655693072453141, 0.004652024507522583, 0.004790452426299453, 0.005058524944633246, 0.0053853894943371415, 0.00560504300147295, 0.005771844685822725, 0.006148010149598122, 0.006257654917612672, 0.00643803995847702, 0.006523223061859608, 0.00653654379490763, 0.0069596841046586635, 0.00731352926902473, 0.007371303759515286, 0.007228717562556266, 0.007472157787531615, 0.0074205820478498935, 0.006961745805479586, 0.008283554406836629, 0.0073261844931170345]},task_config: {db: Milvus,db_config: {db_label: 2024-07-30T14:43:55.771839,uri: **********},db_case_config: {index: IVF_FLAT,metric_type: COSINE,nlist: 1024,nprobe: 5},case_config: {case_id: 50,custom_case: null,k: 100,concurrency_search_config: {num_concurrency: [1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100],concurrency_duration: 30}},stages: [drop_old, load, search_serial, search_concurrent]},label: :)}],file_fmt: result_{}_{}_{}.json
} 2.hnsw 性能验证 条件–m 8 --ef-construction 64 --ef-search 10 --k 10
nohup ./hnsw_10.sh /root/octopus/benchmarker/dimension/hnsw_10.log 21 /usr/local/python3.12/bin/vectordbbench milvushnsw --uri http://172.20.1.101:32437 --drop-old --m 8 --ef-construction 64 --ef-search 10 --k 10{run_id: 1c945b28090941c7ae58ec55a8ae0ecb,task_label: 1c945b28090941c7ae58ec55a8ae0ecb,results: [{metrics: {max_load_count: 0,load_duration: 138.8369,qps: 3857.9497,serial_latency_p99: 0.006,recall: 0.6946,ndcg: 0.7127,conc_num_list: [1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100],conc_qps_list: [205.9066, 896.0748, 1535.6513, 1961.4574, 2282.5936, 2486.9112, 2473.0187, 2639.9002, 2792.597, 2825.9357, 2985.0966, 2992.8825, 3202.8998, 3336.8242, 3480.6602, 3195.9544, 3206.5109, 3249.2361, 3527.203, 3528.9396, 3857.9497],conc_latency_p99_list: [0.004022291118651628, 0.003988313633389771, 0.004059490236081183, 0.0042587881341576575, 0.004422521588951349, 0.0045851776339113715, 0.0050087556691840295, 0.005091396714560687, 0.005392795985937118, 0.005527270000986755, 0.00542353574000299, 0.005898943385109305, 0.005861698154173791, 0.006148975464701652, 0.006199899067729712, 0.006067702007293701, 0.006825755665823817, 0.006885729782283306, 0.006695127539336682, 0.0061551205324009055, 0.006313137001730501]},task_config: {db: Milvus,db_config: {db_label: 2024-07-30T15:32:41.701653,uri: **********},db_case_config: {index: HNSW,metric_type: COSINE,M: 8,efConstruction: 64,ef: 10},case_config: {case_id: 50,custom_case: null,k: 10,concurrency_search_config: {num_concurrency: [1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100],concurrency_duration: 30}},stages: [drop_old, load, search_serial, search_concurrent]},label: :)}],file_fmt: result_{}_{}_{}.json
}
2.hnsw 性能验证 条件 --m 8 --ef-construction 64 --ef-search 64 --k 64
nohup ./hnsw_10.sh /root/octopus/benchmarker/dimension/hnsw_64.log 21 {run_id: 0112f04d884a48e7b04a79601b501f43,task_label: 0112f04d884a48e7b04a79601b501f43,results: [{metrics: {max_load_count: 0,load_duration: 99.8713,qps: 3590.8011,serial_latency_p99: 0.0068,recall: 0.6842,ndcg: 0.6988,conc_num_list: [1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100],conc_qps_list: [204.2923, 903.9947, 1569.658, 1960.1058, 2254.7686, 2555.6955, 2661.9067, 2884.7484, 2974.3032, 2975.3197, 2988.5105, 3178.9354, 3299.7453, 3396.6382, 3327.4601, 3397.9266, 3465.914, 3466.3555, 3471.6151, 3504.3056, 3590.8011],conc_latency_p99_list: [0.004091060114465654, 0.003925692438334226, 0.004029340751469135, 0.004241374858655035, 0.0044741668567061426, 0.004661575911566615, 0.004779618114605546, 0.00496285007596016, 0.005089158420264721, 0.005570173567533493, 0.005635122420825064, 0.0056590593174099925, 0.005516276902705431, 0.0058326821969822045, 0.005921696238219737, 0.006209327307716011, 0.006015772367082536, 0.0063866944853216406, 0.0059822171421721575, 0.005861425867676735, 0.00654305313937366]},task_config: {db: Milvus,db_config: {db_label: 2024-07-30T16:03:25.006315,uri: **********},db_case_config: {index: HNSW,metric_type: COSINE,M: 8,efConstruction: 64,ef: 10},case_config: {case_id: 50,custom_case: null,k: 10,concurrency_search_config: {num_concurrency: [1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100],concurrency_duration: 30}},stages: [drop_old, load, search_serial, search_concurrent]},label: :)}],file_fmt: result_{}_{}_{}.json
} 文章转载自: http://www.morning.ktmnq.cn.gov.cn.ktmnq.cn http://www.morning.bssjp.cn.gov.cn.bssjp.cn http://www.morning.kwblwbl.cn.gov.cn.kwblwbl.cn http://www.morning.nwljj.cn.gov.cn.nwljj.cn http://www.morning.lnnc.cn.gov.cn.lnnc.cn http://www.morning.jtdrz.cn.gov.cn.jtdrz.cn http://www.morning.beijingzy.com.cn.gov.cn.beijingzy.com.cn http://www.morning.ycwym.cn.gov.cn.ycwym.cn http://www.morning.mjjty.cn.gov.cn.mjjty.cn http://www.morning.kdjtt.cn.gov.cn.kdjtt.cn http://www.morning.tsdjj.cn.gov.cn.tsdjj.cn http://www.morning.mnkhk.cn.gov.cn.mnkhk.cn http://www.morning.zyslyq.cn.gov.cn.zyslyq.cn http://www.morning.wfdlz.cn.gov.cn.wfdlz.cn http://www.morning.weitao0415.cn.gov.cn.weitao0415.cn http://www.morning.sskns.cn.gov.cn.sskns.cn http://www.morning.hsksm.cn.gov.cn.hsksm.cn http://www.morning.nqrlz.cn.gov.cn.nqrlz.cn http://www.morning.gnzsd.cn.gov.cn.gnzsd.cn http://www.morning.mtmph.cn.gov.cn.mtmph.cn http://www.morning.gbnsq.cn.gov.cn.gbnsq.cn http://www.morning.yhxhq.cn.gov.cn.yhxhq.cn http://www.morning.gyylt.cn.gov.cn.gyylt.cn http://www.morning.mxhys.cn.gov.cn.mxhys.cn http://www.morning.mhdwp.cn.gov.cn.mhdwp.cn http://www.morning.lmfmd.cn.gov.cn.lmfmd.cn http://www.morning.wkknm.cn.gov.cn.wkknm.cn http://www.morning.mgkcz.cn.gov.cn.mgkcz.cn http://www.morning.plhyc.cn.gov.cn.plhyc.cn http://www.morning.pmdnx.cn.gov.cn.pmdnx.cn http://www.morning.jcbjy.cn.gov.cn.jcbjy.cn http://www.morning.ftntr.cn.gov.cn.ftntr.cn http://www.morning.wrtsm.cn.gov.cn.wrtsm.cn http://www.morning.pwwdp.cn.gov.cn.pwwdp.cn http://www.morning.mfjfh.cn.gov.cn.mfjfh.cn http://www.morning.rxgnn.cn.gov.cn.rxgnn.cn http://www.morning.hrgxk.cn.gov.cn.hrgxk.cn http://www.morning.zwgrf.cn.gov.cn.zwgrf.cn http://www.morning.xplng.cn.gov.cn.xplng.cn http://www.morning.yqsr.cn.gov.cn.yqsr.cn http://www.morning.wjlrw.cn.gov.cn.wjlrw.cn http://www.morning.dbrnl.cn.gov.cn.dbrnl.cn http://www.morning.jcxgr.cn.gov.cn.jcxgr.cn http://www.morning.dkmzr.cn.gov.cn.dkmzr.cn http://www.morning.cjwkf.cn.gov.cn.cjwkf.cn http://www.morning.tfbpz.cn.gov.cn.tfbpz.cn http://www.morning.wcqkp.cn.gov.cn.wcqkp.cn http://www.morning.ygkk.cn.gov.cn.ygkk.cn http://www.morning.dtnjr.cn.gov.cn.dtnjr.cn http://www.morning.hqzmz.cn.gov.cn.hqzmz.cn http://www.morning.pxsn.cn.gov.cn.pxsn.cn http://www.morning.hcrxn.cn.gov.cn.hcrxn.cn http://www.morning.ydzly.cn.gov.cn.ydzly.cn http://www.morning.qlwfz.cn.gov.cn.qlwfz.cn http://www.morning.gxklx.cn.gov.cn.gxklx.cn http://www.morning.dsmwy.cn.gov.cn.dsmwy.cn http://www.morning.sxfmg.cn.gov.cn.sxfmg.cn http://www.morning.xbnkm.cn.gov.cn.xbnkm.cn http://www.morning.grynb.cn.gov.cn.grynb.cn http://www.morning.jxtbr.cn.gov.cn.jxtbr.cn http://www.morning.tzmjc.cn.gov.cn.tzmjc.cn http://www.morning.piekr.com.gov.cn.piekr.com http://www.morning.blqsr.cn.gov.cn.blqsr.cn http://www.morning.mlcnh.cn.gov.cn.mlcnh.cn http://www.morning.rui931.cn.gov.cn.rui931.cn http://www.morning.prhfc.cn.gov.cn.prhfc.cn http://www.morning.fdwlg.cn.gov.cn.fdwlg.cn http://www.morning.fpkpz.cn.gov.cn.fpkpz.cn http://www.morning.qwdlj.cn.gov.cn.qwdlj.cn http://www.morning.dtmjn.cn.gov.cn.dtmjn.cn http://www.morning.tqjwx.cn.gov.cn.tqjwx.cn http://www.morning.drtgt.cn.gov.cn.drtgt.cn http://www.morning.wlggr.cn.gov.cn.wlggr.cn http://www.morning.rwzkp.cn.gov.cn.rwzkp.cn http://www.morning.smzr.cn.gov.cn.smzr.cn http://www.morning.lnrr.cn.gov.cn.lnrr.cn http://www.morning.zdfrg.cn.gov.cn.zdfrg.cn http://www.morning.srky.cn.gov.cn.srky.cn http://www.morning.0small.cn.gov.cn.0small.cn http://www.morning.ghrlx.cn.gov.cn.ghrlx.cn