Skip to content

Optimize reading quantized vectors - #5091

Merged
generall merged 1 commit into
devfrom
optimize-ChunkedVectors-from_file-quantization
Sep 16, 2024
Merged

generall merged 1 commit into
devfrom
optimize-ChunkedVectors-from_file-quantization

Conversation

@agourlay

@agourlay agourlay commented Sep 16, 2024 •

Copy link
Copy Markdown
Member

Current approach takes 7% of CPU time in an internal flamegraph.

@timvisee timvisee left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great catch! 🙌

@timvisee

Copy link
Copy Markdown
Member

Quickly tested this in practice, I do see a small load time improvement on the sample segment I have! 🎉

It's the collection load time from the logs so this number is a bit noisy.

Before PR:

2024-09-16T15:06:58.458466Z  INFO storage::content_manager::toc: Loading collection: test
2024-09-16T15:07:01.919058Z DEBUG qdrant: Loaded collection: test
-> 3.461 s

2024-09-16T15:08:18.961131Z  INFO storage::content_manager::toc: Loading collection: test
2024-09-16T15:08:22.311960Z DEBUG qdrant: Loaded collection: test
-> 3.350 s

2024-09-16T15:09:00.184608Z  INFO storage::content_manager::toc: Loading collection: test
2024-09-16T15:09:03.374672Z DEBUG qdrant: Loaded collection: test
-> 3.190 s

After PR:

2024-09-16T15:07:52.385933Z  INFO storage::content_manager::toc: Loading collection: test
2024-09-16T15:07:55.402465Z DEBUG qdrant: Loaded collection: test
-> 3.016 s

2024-09-16T15:08:44.065017Z  INFO storage::content_manager::toc: Loading collection: test
2024-09-16T15:08:47.050622Z DEBUG qdrant: Loaded collection: test
-> 2.985 s

2024-09-16T15:09:23.007602Z  INFO storage::content_manager::toc: Loading collection: test
2024-09-16T15:09:25.963044Z DEBUG qdrant: Loaded collection: test
-> 2.956 s

@timvisee
timvisee marked this pull request as ready for review September 16, 2024 15:15
@timvisee
timvisee requested a review from generall September 16, 2024 15:15
@generall
generall merged commit a9e6849 into dev Sep 16, 2024
@generall
generall deleted the optimize-ChunkedVectors-from_file-quantization branch September 16, 2024 16:44
timvisee pushed a commit that referenced this pull request Sep 17, 2024
@timvisee timvisee mentioned this pull request Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants