Skip to main content

Vector Index Benchmark (Local File)

This is the Local File (local filesystem) variant, covering build + index search. This benchmark covers build + index search only; it does not test upserts. The MinIO (three-tier cache) variant is MinIO benchmark.

1. Summary​

The four standard ANN datasets all reach recall@100 ≥ 0.97 with RaBitQ bits=7, at the cost of a larger nprobe. The main trade-offs are: bits=7 vs bits=1, cache size (especially for exact re-rank), and interface.

DatasetConfigrecallindex single QPSindex batch QPS
SIFT-128nlist=256, bits=7, nprobe=640.970379.44128.9
GloVe-200nlist=1024, bits=7, nprobe=4480.971178.21294.3
GIST-960nlist=256, bits=7, nprobe=320.974157.71709.2
Deep-Image-96nlist=1024, bits=7, nprobe=320.97122.9121.7

2. Method​

ItemValue
Storagelocal file store (not MinIO/S3)
IndexIVF + RaBitQ, hash_bucket_num=4
top_k100
recallrecall@100 against HDF5 ground truth
RSSbuild/query process VmRSS; pgvector service RSS reported separately
Buildseparate process, excludes write-phase peak
Cleanupdrop table and delete the local index/cache after each dataset
DatasetBaseQueriesGTdimmetric
SIFT-1281,000,00010,000100-NN128L2
GloVe-2001,183,51410,000100-NN200cosine
GIST-9601,000,0001,000100-NN960L2
Deep-Image-969,990,00010,000100-NN96cosine

QPS / mean ms / RSS MB / recall is the cell format in the cache and interface tables. Single-query QPS is steady-state: the first query is timed separately; batch QPS is the average of two rounds.

What NQ means: NQ is the number of query vectors per measurement (the first NQ test queries). Recall is the top-100 average over those queries and QPS = NQ / elapsed. NQ is neither a concurrency setting nor a batch size. This run uses NQ=10 for SIFT/GIST/Deep and NQ=20 for GloVe; larger NQ is more stable but slower.

Machine and measured resources​

ItemValue
CPUIntel General Purpose Processor (KVM vCPU), 1 socket, 8 physical cores, 2 threads/core, 16 logical CPUs
ISAAVX2, AVX-512 (including AVX-512 VNNI/BF16)
Memory60 GiB, no swap
cgroup limitsno CPU/memory limit
Test storageMinIO runs as a local container; L2 cache is on local SSD
Concurrencyhash_bucket_num=4; native batch parallelism=1; pgvector --worker-threads 4
Measured buildSIFT MinIO: average 237% CPU ≈ 2.4 logical cores, peak RSS 485 MB
Measured querySIFT MinIO index-only, NQ=10: average 349% CPU ≈ 3.5 logical cores, peak RSS 397 MB

Notes:

  • Build/query processes are not pinned to fixed CPUs; the core counts above are derived from /usr/bin/time -v average CPU percentages, not a cgroup quota.
  • Build uses the hash_bucket_num=4 shard layout; CARGO_BUILD_JOBS=8 only affects compilation, not benchmark runtime CPU use.
  • Single queries use roughly 3–4 logical cores. Native batch has one thread per bucket (4), plus merge threads (min(NQ, available cores)); the short batch averages about 3.5 cores.
  • Build RSS is roughly 0.5–1.45 GB; query RSS is roughly 0.3–2.2 GB on this 60 GiB machine.

3. Build​

Datasetnlistbitsbuild sbuild RSS MBwrite s
SIFT-12825613.64813.0
SIFT-12825674.15423.0
SIFT-128102416.23253.0
SIFT-128102477.23853.0
GloVe-20025618.37037.8
GloVe-20025679.37677.8
GloVe-2001024113.66857.8
GloVe-2001024714.07637.8
GloVe-2002048724.37707.8
GIST-960256134.179130.1
GIST-960256737.1107730.1
GIST-9601024151.263830.1
GIST-9601024754.280430.1
Deep-Image-961024193.9120731.4
Deep-Image-961024797.1144231.4
Deep-Image-9640961136.4103831.4
Deep-Image-9640967138.5120731.4

Build RSS is the build process only. GloVe/Deep use row-normalized vectors; SIFT/GIST use raw L2.

What build s includes: timing starts at build_table_index and covers reading the table, KMeans/quantisation, index segment writes and the PG index commit/lease. It does not include the preceding write_arrow table write; that is the separate write s column.

4. Retrieval quality and throughput​

bits=1 is compact but cannot reach 0.97 recall at these nprobe values. bits=7 reaches 0.97 with a larger nprobe. Full sweeps are in Appendix A.

Target configurations​

DatasetConfigrecallindex singleindex batchexact singleexact batch
SIFT-128nlist=256, bits=7, nprobe=640.970379.44128.950.12307.1
GloVe-200nlist=1024, bits=7, nprobe=4480.971178.21294.323.6915.3
GIST-960nlist=256, bits=7, nprobe=320.974157.71709.213.41019.1
Deep-Image-96nlist=1024, bits=7, nprobe=320.97122.9121.78.6138.9

SIFT: nlist=256,bits=7,nprobe=64; GloVe: nlist=1024,bits=7,nprobe=448; GIST: nlist=256,bits=7,nprobe=32; Deep: nlist=1024,bits=7,nprobe=32. All configurations scan nprobe upward from 8; GloVe first reaches 0.97 at nprobe=448.

5. Cache size​

Format: single QPS / mean ms / RSS MB / recall; batch uses the same format. All four use the target config above.

SIFT-128​

cacheindex singleindex batchexact singleexact batch
512m332.1 / 3.01 / 381 / 0.9704201.3 / 0.24 / 383 / 0.97043.0 / 23.24 / 731 / 1.000148.3 / 6.74 / 1059 / 1.000
1g326.4 / 3.06 / 381 / 0.9704232.3 / 0.24 / 383 / 0.97046.4 / 21.57 / 818 / 1.000223.1 / 4.48 / 1188 / 1.000
8g379.4 / 2.64 / 380 / 0.9704128.9 / 0.24 / 382 / 0.97050.1 / 19.98 / 887 / 1.0002307.1 / 0.43 / 890 / 1.000
off5.4 / 185.91 / 381 / 0.970106.6 / 9.38 / 383 / 0.970——

GloVe-200​

cacheindex singleindex batchexact singleexact batch
512m87.5 / 11.43 / 651 / 0.9711304.9 / 0.77 / 653 / 0.97115.1 / 66.28 / 1019 / 0.98828.0 / 35.72 / 1348 / 0.988
1g156.6 / 6.39 / 558 / 0.9711276.7 / 0.78 / 559 / 0.97122.7 / 44.14 / 1100 / 0.988139.1 / 7.19 / 1429 / 0.988
8g178.2 / 5.61 / 558 / 0.9711294.3 / 0.77 / 559 / 0.97123.6 / 42.32 / 1424 / 0.988915.3 / 1.09 / 1427 / 0.988

GIST-960​

cacheindex singleindex batchexact singleexact batch
512m75.5 / 13.25 / 1117 / 0.9741732.8 / 0.58 / 1118 / 0.9745.2 / 190.49 / 1686 / 0.99013.7 / 73.12 / 1950 / 0.990
1g160.3 / 6.24 / 1115 / 0.9741762.8 / 0.57 / 1117 / 0.9746.7 / 148.45 / 1890 / 0.99058.9 / 16.97 / 2154 / 0.990
8g157.7 / 6.34 / 1113 / 0.9741709.2 / 0.59 / 1115 / 0.97413.4 / 74.68 / 1990 / 0.9901019.1 / 0.98 / 1993 / 0.990
off3.1 / 327.81 / 1128 / 0.97431.2 / 32.04 / 1132 / 0.974——

Deep-Image-96​

cacheindex singleindex batchexact singleexact batch
512m20.9 / 47.77 / 967 / 0.97122.8 / 43.85 / 1722 / 0.9718.5 / 118.06 / 1300 / 0.9897.1 / 141.38 / 1991 / 0.989
1g21.0 / 47.56 / 1064 / 0.971127.8 / 7.82 / 1095 / 0.9719.0 / 111.68 / 1556 / 0.98963.3 / 15.79 / 1858 / 0.989
8g22.9 / 43.72 / 1042 / 0.971121.7 / 8.22 / 1052 / 0.9718.6 / 115.94 / 1870 / 0.989138.9 / 7.20 / 1987 / 0.989
off21.9 / 45.57 / 540 / 0.97129.9 / 33.45 / 623 / 0.971——

Observations:

  • Index-only is not very sensitive to cache size, except that 512 MiB can add latency.
  • Exact re-rank is dominated by the block cache: 512 MiB -> 1 GiB -> 8 GiB gives large batch gains (SIFT 148 -> 223 -> 2307 QPS; GIST 14 -> 59 -> 1019; Deep 7.1 -> 63 -> 139).
  • Without any cache, index-only still works and exact single-query falls back. Native exact batch also falls back to the normal reader now: SIFT nprobe=64, NQ=5 gives about 15.7 QPS at recall 1.0 (temporary key-index path in pk_locator).

6. Interfaces​

Target configuration, cache 8 GiB; format single QPS / mean ms / RSS MB / recall. DataFusion batch means a loop of SQL queries; Python batch is the native batch entry.

SIFT-128​

Interfacereranksinglebatchserver RSS MB
pythonindex379.4 / 2.64 / 380 / 0.9704128.9 / 0.24 / 382 / 0.970—
pythonexact50.1 / 19.98 / 887 / 1.0002307.1 / 0.43 / 890 / 1.000—
datafusionindex450.7 / 2.22 / 381 / 0.970478.6 / 2.09 / 381 / 0.970—
datafusionexact49.9 / 20.06 / 874 / 1.000396.8 / 2.52 / 874 / 1.000—
pgvectorindex390.6 / 2.56 / 64 / 0.970440.2 / 2.27 / 65 / 0.970304
pgvectorexact100.0 / 10.00 / 64 / 1.000189.6 / 5.27 / 65 / 1.000853

GloVe-200​

Interfacereranksinglebatchserver RSS MB
pythonindex178.2 / 5.61 / 558 / 0.9711294.3 / 0.77 / 559 / 0.971—
pythonexact23.6 / 42.32 / 1424 / 0.988915.3 / 1.09 / 1427 / 0.988—
datafusionindex187.8 / 5.32 / 557 / 0.971214.3 / 4.67 / 557 / 0.971—
datafusionexact24.9 / 40.14 / 1416 / 0.988203.2 / 4.92 / 1416 / 0.988—
pgvectorindex196.0 / 5.10 / 68 / 0.971220.1 / 4.54 / 68 / 0.971476
pgvectorexact44.0 / 22.74 / 68 / 0.98899.7 / 10.03 / 68 / 0.9881463

GIST-960​

Interfacereranksinglebatchserver RSS MB
pythonindex157.7 / 6.34 / 1113 / 0.9741709.2 / 0.59 / 1115 / 0.974—
pythonexact13.4 / 74.68 / 1990 / 0.9901019.1 / 0.98 / 1993 / 0.990—
datafusionindex170.9 / 5.85 / 1114 / 0.974182.8 / 5.47 / 1115 / 0.974—
datafusionexact13.6 / 73.80 / 1990 / 0.990159.9 / 6.26 / 1992 / 0.990—
pgvectorindex190.5 / 5.25 / 60 / 0.974217.6 / 4.60 / 60 / 0.9741046
pgvectorexact4.1 / 243.59 / 60 / 0.99033.6 / 29.73 / 60 / 0.9903949

Deep-Image-96​

Interfacereranksinglebatchserver RSS MB
pythonindex22.9 / 43.72 / 1042 / 0.971121.7 / 8.22 / 1052 / 0.971—
pythonexact8.6 / 115.94 / 1870 / 0.989138.9 / 7.20 / 1987 / 0.989—
datafusionindex21.7 / 46.04 / 1053 / 0.97196.6 / 10.36 / 1125 / 0.971—
datafusionexact8.4 / 119.75 / 1890 / 0.98988.8 / 11.26 / 2200 / 0.989—
pgvectorindex22.3 / 44.81 / 63 / 0.97194.0 / 10.64 / 63 / 0.971902
pgvectorexact4.2 / 238.81 / 63 / 0.98911.9 / 84.30 / 63 / 0.9893825

pgvector is a separate service process (postgres-lakesoul, 4 worker threads). Python and DataFusion are in-process. pgvector exact re-rank needs much more service RSS, reaching about 3.9 GB for GIST and 3.8 GB for Deep.

7. Parallelism and bucket count​

SIFT, target config, Python native, cache 8 GiB, NQ=20:

parallelismindex single QPSindex batch QPS
1378.64301.7
2325.42643.1
4379.43190.7

The native batch path already probes buckets in parallel; extra parallelism oversubscribes the short batch. Keep hash_bucket_num × vector_search.parallelism near the CPU count.

8. Recommendations​

GoalRecommendation
best recall / QPS balancebits=7, nprobe at the 0.97 knee; see target table
minimum memory512 MiB cache: index-only works, exact is slow
exact re-rank8 GiB L1/L2 cache; 512 MiB is not enough for batch
Python nativeuse batch_search; set parallelism=1 for short batches
SQLDataFusion single-query is close to native; batch through SQL is slower than native batch
pgvectorconvenient service interface, but exact is expensive and needs several GB RSS

9. Limitations​

  • Local file store, not S3/MinIO; absolute QPS differs from remote-storage runs.
  • NQ is 10 for most result tables (SIFT parameter sweep uses 20); QPS is steady-state.
  • The GloVe target config is nlist=1024,bits=7,nprobe=448; scanning nprobe upward from 8, nprobe=448 is the first value reaching recall>=0.97 (NQ=20, recall 0.9715).
  • pgvector cache sizes were measured only on the GloVe target config (512 MiB/1 GiB/8 GiB); other pgvector interface rows use 8 GiB.
  • Reported index_bytes is omitted because old index generations were still on disk while building multiple configurations; build time/RSS are not affected.
  • The English and Chinese pages share this data set; re-run the benchmark to refresh both.

10. Raw results​

Raw JSONL files are not published with the repository.

Appendix A: full index-only parameter sweep​

Cache 8 GiB, Python native, nprobe sweep. Values are QPS / recall.

SIFT-128​

nlistbitsnproberecallsingle QPSbatch QPS
256180.517506.87999.1
2561160.531488.07457.1
2561320.524475.86616.4
2561640.524445.35573.8
25611280.524434.64498.9
256780.862457.26445.2
2567160.949409.85508.6
2567320.967395.14849.1
2567640.970391.14214.7
25671280.970359.93308.2
1024180.495508.07490.5
10241160.529509.07217.4
10241320.553438.65931.0
10241640.551437.15993.7
102411280.549441.85520.5
1024780.675467.96185.5
10247160.826430.16102.4
10247320.932430.25361.2
10247640.964379.34702.7
102471280.972355.74203.0

GloVe-200​

nlistbitsnproberecallsingle QPSbatch QPS
256180.404411.46585.8
2561160.442389.85870.8
2561320.451375.85000.8
2561640.455335.93908.0
25611280.452292.52868.2
25612560.448245.11995.2
256780.691343.04220.1
2567160.799316.33258.1
2567320.878267.22478.8
2567640.940229.51827.7
25671280.969185.31337.1
25672560.975146.21016.5
1024180.425391.35869.6
10241160.444389.45658.9
10241320.461380.35164.5
10241640.468371.34678.9
102411280.466334.53903.0
102412560.463311.63022.2
1024780.634334.15011.2
10247160.709338.54309.6
10247320.802290.72586.0
10247640.876283.62760.0
102471280.926239.82142.5
102472560.957192.21550.4
204872560.927228.81868.7
204875120.959187.51358.0
2048710240.973152.91049.6

GIST-960​

nlistbitsnproberecallsingle QPSbatch QPS
10247640.966146.41747.5
102471280.980144.31475.1
102472560.981120.81095.8
102475120.981108.2801.3
1024710240.98191.2587.9
256180.681225.33055.8
2561160.721213.52729.8
2561320.740192.82170.9
2561640.742176.01604.4
25611280.744141.31137.9
256780.827184.32511.4
2567160.932169.92039.0
2567320.974163.51788.7
2567640.980136.31342.3
25671280.981122.61007.9
1024180.588210.32688.7
10241160.681188.82583.1
10241320.735193.92434.3
10241640.758188.52096.3
102411280.764168.31692.0
1024780.635164.02354.8
10247160.790166.62236.9
10247320.905152.61493.4

Deep-Image-96​

nlistbitsnproberecallsingle QPSbatch QPS
1024180.522113.31104.6
10241160.52767.3587.4
10241320.53036.7303.2
10241640.52921.6179.3
1024780.90466.8437.3
10247160.94334.9225.3
10247320.97121.4115.8
10247640.97513.265.3
4096180.51472.01669.1
40961160.53840.11268.6
40961320.55023.2860.0
40961640.55212.5534.7
4096780.80965.51041.4
40967160.89836.3682.9
40967320.95220.3347.3
40967640.96711.2190.1