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

[WIP] MTV-1699 Avoid potentially exceeding memory limit in multi-stage VDDK imports. #3559

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mrnold
Copy link
Contributor

@mrnold mrnold commented Dec 6, 2024

What this PR does / why we need it:
From this conversation, this pull request avoids storing all results from QueryChangedDiskAreas during a VDDK warm migration. A disk with a lot of small evenly-spaced changes could get the importer to create a huge list, which might exceed the pod's memory limit. This change iterates over one result from QueryChangedDiskAreas at a time, which so far seems to be limited to 2000 changed extent entries.

Which issue(s) this PR fixes:
Fixes MTV-1699

Special notes for your reviewer:
This is a draft for now while I get this tested more thoroughly.

Release note:

Reduce memory usage for multi-stage VDDK imports when the source snapshot has many changes.

Storing multiple QueryChangedDiskAreas results could potentially exceed
importer pod memory limits, so rework the code to iterate over one
result at a time.

Signed-off-by: Matthew Arnold <[email protected]>
There is no longer an easily-accessible list of changed blocks to check,
so these tests need to let TransferFile run and mock everything that
does.

Signed-off-by: Matthew Arnold <[email protected]>
MockableStat is a stronger signal for something unusual.

Signed-off-by: Matthew Arnold <[email protected]>
@kubevirt-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubevirt-bot kubevirt-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Dec 6, 2024
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign awels for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mrnold mrnold changed the title MTV-1699 Avoid potentially exceeding memory limit in multi-stage VDDK imports. [WIP] MTV-1699 Avoid potentially exceeding memory limit in multi-stage VDDK imports. Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants