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

create investigation test of max dim for NGT #1633

Merged
merged 6 commits into from
May 12, 2022

Conversation

vankichi
Copy link
Contributor

@vankichi vankichi commented Apr 25, 2022

Signed-off-by: vankichi kyukawa315@gmail.com

Description:

I implemented the test for investigating the max dimension limit of vald-agent-ngt in any environment.
NGT can handle up to the 1 << 32 -1 dimension, but the real max dimension may not be the same depending on the environment.
This test can get the real max dimension for any environment.
For the time being, I set the limit of remaining free memory as 500MB to avoid such OOM kill or memory leak.
When the remaining free memory becomes 500MB or less, the test will finish and we can get the max bit in the environment.
In my environment (32GB Mem and free memory at the beginning is about 24GB), both results (max bit) are29 bit.

Related Issue:

How Has This Been Tested?:

Environment:

  • Go Version: 1.18.1
  • Docker Version: 20.10.8
  • Kubernetes Version: 1.22.0
  • NGT Version: 1.14.3

Types of changes:

  • Bug fix [type/bug]
  • New feature [type/feature]
  • Add tests [type/test]
  • Security related changes [type/security]
  • Add documents [type/documentation]
  • Refactoring [type/refactoring]
  • Update dependencies [type/dependency]
  • Update benchmarks and performances [type/bench]
  • Update CI [type/ci]

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Checklist:

  • I have read the CONTRIBUTING document.
  • I have checked open Pull Requests for the similar feature or fixes?
  • I have added tests and benchmarks to cover my changes.
  • I have ensured all new and existing tests passed.
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly.

@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - replace the PR body by changelog details
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase master
  • 🔚 2️⃣ 🔚 /label actions/e2e-deploy - run E2E deploy & integration test

@codecov
Copy link

codecov bot commented Apr 25, 2022

Codecov Report

Merging #1633 (e0fd7ff) into master (87679e9) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1633      +/-   ##
==========================================
+ Coverage   30.67%   30.73%   +0.05%     
==========================================
  Files         372      372              
  Lines       32234    32234              
==========================================
+ Hits         9889     9907      +18     
+ Misses      21975    21962      -13     
+ Partials      370      365       -5     
Impacted Files Coverage Δ
internal/core/algorithm/ngt/ngt.go 64.70% <100.00%> (ø)
internal/core/algorithm/ngt/option.go 67.22% <100.00%> (ø)
internal/worker/worker.go 82.81% <0.00%> (-0.79%) ⬇️
internal/worker/queue.go 100.00% <0.00%> (+1.26%) ⬆️
pkg/agent/core/ngt/service/option.go 91.41% <0.00%> (+1.84%) ⬆️
...ent/core/ngt/service/vqueue/undeleted_index_map.go 71.11% <0.00%> (+2.77%) ⬆️
...nt/core/ngt/service/vqueue/uninserted_index_map.go 78.68% <0.00%> (+5.46%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 87679e9...e0fd7ff. Read the comment docs.

@vankichi vankichi force-pushed the test/tests/impl-investigate-max-bit-for-ngt branch from caa9cb9 to f8b030b Compare April 25, 2022 07:39
@vankichi vankichi force-pushed the test/tests/impl-investigate-max-bit-for-ngt branch 9 times, most recently from db3ed2b to 299a5a8 Compare April 28, 2022 13:56
@kpango kpango requested review from kevindiu, kmrmt and kpango May 9, 2022 04:53
@vankichi vankichi marked this pull request as ready for review May 9, 2022 05:56
@vankichi vankichi changed the title [WIP] create investigation test of max dim for NGT create investigation test of max dim for NGT May 9, 2022
@vankichi vankichi force-pushed the test/tests/impl-investigate-max-bit-for-ngt branch 2 times, most recently from 557f625 to 83431d4 Compare May 9, 2022 07:03
Signed-off-by: vankichi <kyukawa315@gmail.com>
@vankichi vankichi force-pushed the test/tests/impl-investigate-max-bit-for-ngt branch from 83431d4 to c03cce6 Compare May 9, 2022 07:08
internal/core/algorithm/ngt/option_test.go Outdated Show resolved Hide resolved
internal/core/algorithm/ngt/option_test.go Outdated Show resolved Hide resolved
Co-authored-by: Kosuke Morimoto <ksk@vdaas.org>
kevindiu
kevindiu previously approved these changes May 10, 2022
@vankichi vankichi requested a review from kmrmt May 11, 2022 02:45
kmrmt
kmrmt previously approved these changes May 11, 2022
@vankichi
Copy link
Contributor Author

@kpango
Since I got the approval from CRE members, please review this PR?

Signed-off-by: vankichi <kyukawa315@gmail.com>
@vankichi vankichi dismissed stale reviews from kmrmt and kevindiu via a41087c May 12, 2022 05:42
Signed-off-by: vankichi <kyukawa315@gmail.com>
kpango
kpango previously approved these changes May 12, 2022
Signed-off-by: vankichi <kyukawa315@gmail.com>
@kpango
Copy link
Collaborator

kpango commented May 12, 2022

/format

@vdaas-ci
Copy link
Collaborator

[FORMAT] Updating license headers and formatting go codes triggered by kpango.

Signed-off-by: Vdaas CI <vald@vdaas.org>
@vankichi vankichi requested review from kevindiu and kpango May 12, 2022 07:06
@github-actions
Copy link
Contributor

@kpango kpango merged commit c10358f into master May 12, 2022
@kpango kpango deleted the test/tests/impl-investigate-max-bit-for-ngt branch May 12, 2022 07:26
@vankichi vankichi mentioned this pull request May 17, 2022
18 tasks
This was referenced May 24, 2022
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.

5 participants