Zvec Logo

性能指标

Zvec 专为速度、规模和效率而设计 — 并已在阿里巴巴集团严苛的生产工作负载中经受了充分验证。

以下是在各种工作负载和配置下的性能指标结果。

所有测试均在受控环境中使用标准化数据集和业界公认的方法进行,以确保公平性、透明性和可复现性。

性能评估

我们使用 VectorDBBench 对 Zvec 进行评估,这是向量数据库社区广泛采用的开源基准测试框架。

我们的评估聚焦于两个标准数据集:

  • Cohere 1M:100 万条 768 维向量
  • Cohere 10M:1000 万条 768 维向量

对于每个数据集,我们测量以下关键性能指标:

  • 每秒查询数(QPS):持续负载下的吞吐量。
  • Recall:最近邻检索的准确度,反映搜索质量。
  • 索引构建时间(加载时长):摄取并索引完整数据集所需的时间,反映数据导入效率。

Cohere 10M 基准测试结果

QPS Cohere 10M

Recall Cohere 10M

Load Duration Cohere 10M

Cohere 1M 基准测试结果

QPS Cohere 1M

Recall Cohere 1M

Load Duration Cohere 1M

复现基准测试

按照以下步骤在你自己的环境中复现我们的基准测试结果。

  1. 启动 ECS 实例

    我们推荐使用 Ubuntu 24.04 作为操作系统。其他操作系统可能需要调整本指南中的命令。

    • 创建一个 g9i.4xlarge 实例(16 vCPU,64 GiB 内存),参考此指南
  2. 安装系统依赖

    • 如尚未安装 git,请先安装

      apt-get update
      apt install git
    • 安装 Python3.11 或更高版本

      apt-get update
      apt install python3-full python3-venv python3-dev
      
      cd /opt
      python3 -m venv venv
      source venv/bin/activate
  3. 安装 VectorDBBench

    # Clone VectorDBBench
    git clone https://github.com/zilliztech/VectorDBBench.git
    cd VectorDBBench
    
    # Install deps
    pip install -U pip
    pip install -e .
    
    # 如遇下载缓慢或连接问题,可尝试使用阿里云 PyPI 镜像
    # pip install -U pip -i https://mirrors.aliyun.com/pypi/simple
    # pip install -e . -i https://mirrors.aliyun.com/pypi/simple
  4. 安装 zvec

    pip install zvec==v0.1.1

Cohere 10M

  1. 构建索引

    vectordbbench zvec --path Performance768D10M --db-label 16c64g-v0.1 --case-type Performance768D10M --num-concurrency 12,14,16,18,20 --quantize-type int8 --m 50 --ef-search 118 --is-using-refiner
  2. 运行测试

    vectordbbench zvec --path Performance768D10M --db-label 16c64g-v0.1 --case-type Performance768D10M --num-concurrency 12,14,16,18,20 --quantize-type int8 --m 50 --ef-search 118 --is-using-refiner --skip-drop-old --skip-load

Cohere 1M

  1. 构建索引

    vectordbbench zvec --path Performance768D1M --db-label 16c64g-v0.1 --case-type Performance768D1M --num-concurrency 12,14,16,18,20 --quantize-type int8 --m 15 --ef-search 180
  2. 运行测试

    vectordbbench zvec --path Performance768D1M --db-label 16c64g-v0.1 --case-type Performance768D1M --num-concurrency 12,14,16,18,20 --quantize-type int8 --m 15 --ef-search 180 --skip-drop-old --skip-load

目录