-
Notifications
You must be signed in to change notification settings - Fork 295
[WIP] VDDK: use AIO libnbd API for block status/pread. #3780
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Matthew Arnold <[email protected]>
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
|
I think you should be using the asynch API as internally it is much more efficient. The synchronous API is really only for convenience and ease of programming. I guess this is also relevant here: https://gitlab.com/nbdkit/nbdkit/-/commit/5a882e74cae3dbaa09bf3b942a02f9947b12f6e5 NB: This only works if the VDDK plugin is opened readonly (meaning you're using |
|
Sure, here is an nbdkit command line from an importer pod:
|
|
Get rid of
You might need to add Is the backing storage on VMware thin provisioned? Just because it says "Thin Provisioned" in the UI unfortunately does not mean that it is. VMware will happily let you select TP with an NFS v3 backing store that cannot possibly implement it. The only way to find out for sure is to scan the guest (eg. Try out upstream nbdkit. This has a number of enhancements, but the main highlights are: https://gitlab.com/nbdkit/nbdkit/-/commit/5a882e74cae3dbaa09bf3b942a02f9947b12f6e5 (pre-caching optimization) Upstream nbdkit-vddk-plugin is also able to multiplex VDDK disks through a single nbdkit instance, by using the NBD export to select which disk you want to read: https://gitlab.com/nbdkit/nbdkit/-/commit/18866d92d1a774f4241afc754266c734b9828180 (Whether this is beneficial to performance is questionable, it probably has no effect. But it may be more convenient and/or use less memory to use a single instance.) If after testing with the enhanced stats above, you find that the time taken opening and closing the VDDK session is a problem (you'll need to look at the https://gitlab.com/nbdkit/nbdkit/-/commit/b45b9e584687a83823f0ae6c04a1d24fb0261acb (Some of these are in RHEL 10.1's nbdkit.) Try out upstream libnbd too, as it has these enhancements that may be relevant: https://gitlab.com/nbdkit/libnbd/-/commit/84e57710d095d058ab06aea6db1c897aaccf0c02 |
|
Thanks! The readonly flag is set, and removing cacheextents didn't seem to make much of a difference. I think the VMware thin provisioning is working fine, it is definitely not on NFS and I see holes in the nbdinfo map matching what CDI gets. I had some success increasing the size of the buffer passed to AioPread, but I still needed to increase the pod CPU limit. I'm not sure if running nbdkit and the importer together is more work than the default limit, or if I have just written super inefficient code. Is that libnbd change available in a tagged golang release somewhere? The last version I can |
|
I do need to update that site. However the changes are all in the C library so I don't think the golang bindings need to be updated (as long as the resulting binary dynamically links to |
|
I believe I've updated the golang bindings website to libnbd 1.22.2 now. |
Signed-off-by: Matthew Arnold <[email protected]>
Having it global caused issues with unit tests. Signed-off-by: Matthew Arnold <[email protected]>
Signed-off-by: Matthew Arnold <[email protected]>
Signed-off-by: Matthew Arnold <[email protected]>
|
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with /lifecycle stale |
|
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with /lifecycle rotten |
What this PR does / why we need it:
This pull request changes the VDDK importer to use libnbd's asynchronous API. This should give a general performance boost, and it should produce a response to the recommended VDDK performance tuning options (referencing CNV-52722)
Which issue(s) this PR fixes:
Fixes CNV-57949
Special notes for your reviewer:
Work in progress, as I am not 100% sure I am doing this right. I get good copies, but not much improvement in transfer speed when run in a real importer pod:
Any suggestions?
CC @rwmjones @ebblake
Release note: