Skip to content

Add VecSim related metrics - [MOD-7967]#5151

Merged
GuyAv46 merged 8 commits intomasterfrom
guyav-metrics_vecsim
Nov 5, 2024
Merged

Add VecSim related metrics - [MOD-7967]#5151
GuyAv46 merged 8 commits intomasterfrom
guyav-metrics_vecsim

Conversation

@GuyAv46
Copy link
Collaborator

@GuyAv46 GuyAv46 commented Nov 4, 2024

Describe the changes in the pull request

Introducing new VecSim-related metrics to the info command under the existing fields_statistics: fields_vector dictionary sub-section

  1. used_memory - total memory consumption of all vector indexes on the shard
  2. mark_deleted_vectors - total number of marked deleted vectors on the shard

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

@codecov
Copy link

codecov bot commented Nov 4, 2024

Codecov Report

Attention: Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.

Project coverage is 86.36%. Comparing base (9ef9bd9) to head (68651aa).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/spec.c 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5151      +/-   ##
==========================================
- Coverage   86.37%   86.36%   -0.01%     
==========================================
  Files         190      190              
  Lines       34668    34688      +20     
==========================================
+ Hits        29943    29958      +15     
- Misses       4725     4730       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@GuyAv46 GuyAv46 force-pushed the guyav-metrics_vecsim branch from 38014d7 to f07f5c8 Compare November 5, 2024 08:00
@GuyAv46 GuyAv46 enabled auto-merge November 5, 2024 08:03
VecSimIndexInfo info = VecSimIndex_Info(vecsim);
stats.memory += info.commonInfo.memory;
if (fs->vectorOpts.vecSimParams.algo == VecSimAlgo_HNSWLIB) {
stats.marked_deleted += info.hnswInfo.numberOfMarkedDeletedNodes;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unreachable today, as we no longer have "plain" HNSW indexes.

@GuyAv46 GuyAv46 added this pull request to the merge queue Nov 5, 2024
@GuyAv46 GuyAv46 removed this pull request from the merge queue due to a manual request Nov 5, 2024
@GuyAv46 GuyAv46 added this pull request to the merge queue Nov 5, 2024
Merged via the queue into master with commit 388f81e Nov 5, 2024
@GuyAv46 GuyAv46 deleted the guyav-metrics_vecsim branch November 5, 2024 15:44
redisearch-backport-pull-request bot pushed a commit that referenced this pull request Nov 5, 2024
* added vector info

* added a test

* drain work queue before checking memory

* move vector metrics info field statistics section

* fix test

* fix test

* tidy up

* added a flat index to the test

(cherry picked from commit 388f81e)
@redisearch-backport-pull-request
Copy link
Contributor

Successfully created backport PR for 2.10:

@redisearch-backport-pull-request
Copy link
Contributor

Successfully created backport PR for 8.0:

redisearch-backport-pull-request bot pushed a commit that referenced this pull request Nov 5, 2024
* added vector info

* added a test

* drain work queue before checking memory

* move vector metrics info field statistics section

* fix test

* fix test

* tidy up

* added a flat index to the test

(cherry picked from commit 388f81e)
github-merge-queue bot pushed a commit that referenced this pull request Nov 5, 2024
Add VecSim related metrics - [MOD-7967] (#5151)

* added vector info

* added a test

* drain work queue before checking memory

* move vector metrics info field statistics section

* fix test

* fix test

* tidy up

* added a flat index to the test

(cherry picked from commit 388f81e)

Co-authored-by: GuyAv46 <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Nov 5, 2024
Add VecSim related metrics - [MOD-7967] (#5151)

* added vector info

* added a test

* drain work queue before checking memory

* move vector metrics info field statistics section

* fix test

* fix test

* tidy up

* added a flat index to the test

(cherry picked from commit 388f81e)

Co-authored-by: GuyAv46 <[email protected]>
alonre24 pushed a commit that referenced this pull request Dec 27, 2024
Add VecSim related metrics - [MOD-7967] (#5151)

* added vector info

* added a test

* drain work queue before checking memory

* move vector metrics info field statistics section

* fix test

* fix test

* tidy up

* added a flat index to the test

(cherry picked from commit 388f81e)

Co-authored-by: GuyAv46 <[email protected]>
(cherry picked from commit 242f314)
github-merge-queue bot pushed a commit that referenced this pull request Jan 1, 2025
* CP Count Queries - [MOD-6492]

* [2.10] Add metrics of min and max memory consumption of indexes - [MOD-7584] (#5146)

Add metrics of min and max memory consumption of indexes - [MOD-7584] (#5143)

* implement min and max memory usage metrics

* added to info module test

(cherry picked from commit b0d56ad)

Co-authored-by: GuyAv46 <[email protected]>
(cherry picked from commit 094318f)

* [2.10] Add a counter of total query execution time - [MOD-7961] (#5153)

* Add a counter of total query execution time - [MOD-7961] (#5145)

* complete CP of "Count Queries" (#5072) content

* always count query execution time (on non-internal commands)

* add test

* give more time

* review fixes

(cherry picked from commit 97f34e2)

* add missing if

(cherry picked from commit d45365d)

* CP [MOD-8034] expose indexing failures to INFO modules

* [2.10] Add VecSim related metrics - [MOD-7967] (#5169)

Add VecSim related metrics - [MOD-7967] (#5151)

* added vector info

* added a test

* drain work queue before checking memory

* move vector metrics info field statistics section

* fix test

* fix test

* tidy up

* added a flat index to the test

(cherry picked from commit 388f81e)

Co-authored-by: GuyAv46 <[email protected]>
(cherry picked from commit 242f314)

* CP Add Active Indices Metrics - [MOD-7952]

* CP Add global marked deleted to stats [MOD-6053]

* CP Fork gc code cleanup (PR #4263) to enable GC mechanism that will allow the test of marked deleted info to pass

* CP [MOD-8152] rename and move new metrics

* CP [MOD-8035] Add field index error for JSON field indexing failures

* CP [MOD-8039] Reorganize stats files

* [2.10] Improve counting active writes - [MOD-8151] (#5362)

Improve counting active writes - [MOD-8151] (#5354)

* improve counting active writes

* add a test

(cherry picked from commit 2b5182d)

Co-authored-by: GuyAv46 <[email protected]>
(cherry picked from commit a3d447d)

* Update mem usage computation to align to 2.10

* revert bad additions (CR)

* revert bad additions (CR) 2

* Better memory check in info vecsim (since mac failed)

* Fix syntax error

---------

Co-authored-by: redisearch-backport-pull-request[bot] <182669528+redisearch-backport-pull-request[bot]@users.noreply.github.com>
Co-authored-by: GuyAv46 <[email protected]>
Co-authored-by: meiravgri <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants