Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulk allocate nmslib objects to reduce fragmentation #922

Closed
jmazanec15 opened this issue May 30, 2023 · 1 comment
Closed

Bulk allocate nmslib objects to reduce fragmentation #922

jmazanec15 opened this issue May 30, 2023 · 1 comment
Labels
Enhancements Increases software capabilities beyond original client specifications v2.8.0

Comments

@jmazanec15
Copy link
Member

Meta issue: #772

Creating this issue for tracking purposes.

For nmslib, we need to allocate objects that wrap vectors with metadata. This PR updates the objects to be allocated in one buffer as opposed to allocating objects individually. This was shown to prevent memory fragmentation.

For this change, I ran the same experiments as were run for #772 and they showed significant improvements in the RSS of the process after the indexing workload was run.

Configuration RSS beginning (KB) RSS after indexing (KB) Vectors Indexed (vectors)
nmslib-default (baseline) 8984748 11125772 648500
nmslib with bulk update 8972132 9439540 628000

Specifically, the change in RSS decreases by about 78% with this change in the experiment above.

In addition to this, fix bug in CMakeLists.txt file preventing unit tests from being created.

For this change, I ran the same experiments as were run for https://github.com//issues/772 and they showed significant improvements in the RSS of the process after the indexing workload was run. Configuration RSS beginning (KB) RSS after indexing (KB) Vectors Indexed (vectors) nmslib-default (baseline) 8984748 11125772 648500 nmslib with bulk update 8972132 9439540 628000

Specifically, the change in RSS decreases by about 78% with this change in the experiment above.

In addition to this, fix bug in CMakeLists.txt file preventing unit tests from being created.

Related to this PR: #773

@jmazanec15 jmazanec15 added the Enhancements Increases software capabilities beyond original client specifications label May 30, 2023
@jmazanec15
Copy link
Member Author

Addressed in #773. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancements Increases software capabilities beyond original client specifications v2.8.0
Projects
None yet
Development

No branches or pull requests

1 participant