Add a VectorDBBench client for Infino (vector search) - #863
Open
muralikpbhat wants to merge 3 commits into
Open
Conversation
VectorDBBench feeds inserts in small batches (default 100 rows) and each append() commits a superfile, so a large load fragmented into thousands of tiny superfiles — slow to load and slow to optimize. Buffer fed rows and commit them as one combined append at 100k rows, flushing any remainder when the load's init() scope exits (the same subprocess that inserted them), so a corpus smaller than the threshold is still fully persisted. Insert speed is now independent of the harness batch size; the served index is unchanged. Also fix the ef case-config test, which called index_param() without a metric_type and raised before reaching its assertion.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: muralikpbhat The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
3 tasks
Any embedded vector engine gets loaded per search worker, so under the multi-process search runner its memory multiplies with concurrency and exhausts the host on larger datasets. Run vector search over a local loopback server instead: the client spawns one `infino-bench-serve` process bound to 127.0.0.1 and each worker is a thin TCP client, so resident memory stays flat regardless of concurrency. The server projects the dataset id column, so there is no client-side id map. The bind address is loopback-only (single host); the build (load and optimize) still runs on the embedded engine. Requires infino>=0.5.10.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a VectorDBBench client for Infino, an object-storage-native retrieval engine with a Python binding (the
infinopackage). This PR covers vector search; FTS is a planned follow-on.Search runs over a local loopback server rather than the embedded engine — see "Why a loopback server" below. Requires
infino>=0.5.10(the first published release that ships theinfino-bench-serveentry point).Why a loopback server (memory under multiprocessing)
MultiProcessingSearchRunnerforks one client per concurrency slot, and any embedded vector engine gets loaded once per worker — so its resident memory multiplies with concurrency and exhausts the host on larger datasets (this is a general property of embedded clients under the MP runner, not specific to Infino). Infino's graph + quantized planes are large enough that a high-concurrency search on a 10M-scale corpus can OOM the box.Serve mode removes the multiplication: the client spawns one
infino-bench-serveprocess (bound to127.0.0.1only) and each search worker is a thin TCP client, so resident memory stays flat regardless of concurrency. The build (load + optimize) still runs on the embedded engine; only search is served over the socket.idcolumn and returns it directly, so there is no client-side id map to build, persist, or reload.Client
InfinoConfig/InfinoIndexConfig— connection tuning (catalog path, disk-cache budget/dir, object-store options) and the vector case config (cosine / L2 / inner-product metric map).search_mode(defaulthnsw_ivf) — the serving path, bridged to the engine'svector.search_modeconfig key rather than the binding API (so nothing goes vestigial if an engine default changes).hnsw_ivfserves a resident HNSW graph over the quantized vectors (with automatic IVF fallback);ivfserves the reclaimable IVF scan.ef(default0) — a serve-time HNSW beam, bridged tovector.hnsw_ef_search.0serves each query at the graph's stamped k→ef curve; a positive value fixes the beam. See "Tracing the recall/QPS curve" below.insert_embeddingsbuffers fed rows and commits them as one large append at a threshold (flushing any remainder when the load scope exits), so a load commits a handful of files regardless of the harness batch size instead of one file per fed batch. Insert speed is independent ofNUM_PER_BATCH; the served index is unchanged.db_label— plumbed into the result series name, matching the other backends.need_normalize_cosine). Vector-only / NonFilter.Tracing the recall/QPS curve
Because
efis a serve-time beam, the recall/QPS curve is traced build once, sweep at serve — the same one-ingest / serve-many shape as an HNSW engine'sef_search, so no re-ingest per point:--drop-old).--skip-drop-old --skip-load), varying--efover e.g.112 128 192 256 384 512 768 1024 2048— a spread of operating points, densest near the top.A plain run with no
--ef(ef=0) serves at the graph's stamped k→ef curve — a single high-recall operating point (recall@100 ≈ 0.997 on Cohere-1M) — so infino produces a strong default point even without a sweep.Registration
DB.Infinoenum +init_cls/config_cls/case_config_cls; theInfinoCLI command; a leaderboard color; and aninfinooptional-dependency extra (infino>=0.5.10).Testing
search_mode/efvalidation, theconfig.yamlbridging, and insert-buffering (every fed row persisted across both the threshold flush and the final flush of a sub-threshold remainder).insert_embeddings→search_embeddinground-trip (nearest-neighbor identity), plus a full Cohere-1M (768-dim) build-onceefsweep tracing the recall/QPS curve over the loopback server.Notes
search_mode/efare bridged through the engine config file becauseconnect()currently exposes no equivalent keyword; the client writes a per-run config and pointsXDG_CONFIG_HOMEat it before connecting.search_mode/efas run-test UI inputs (frontend/config/dbCaseConfigs.py); this PR keeps the surface to the client and its registration.