Device: Add thread pool option for VM filesystem disk shares using virtiofsd#15792
Merged
tomponline merged 13 commits intocanonical:mainfrom Jun 16, 2025
Merged
Device: Add thread pool option for VM filesystem disk shares using virtiofsd#15792tomponline merged 13 commits intocanonical:mainfrom
disk shares using virtiofsd#15792tomponline merged 13 commits intocanonical:mainfrom
Conversation
1600298 to
1e125ac
Compare
35c05cc to
8e835dd
Compare
1 task
simondeziel
reviewed
Jun 13, 2025
simondeziel
reviewed
Jun 13, 2025
simondeziel
reviewed
Jun 13, 2025
simondeziel
reviewed
Jun 13, 2025
simondeziel
reviewed
Jun 13, 2025
simondeziel
previously approved these changes
Jun 13, 2025
Member
simondeziel
left a comment
There was a problem hiding this comment.
LGTM with the caveat that I think it breaks compat with the bundled version of virtiofsd in Jammy's QEMU.
Member
Author
Indeed, unfortunately only the rust version has the direct io option so think we will be forced to support only that. We wont backport anyhow to 5.0. |
minaelee
previously requested changes
Jun 15, 2025
… flag to avoid path parsing bug in rust implementation Fixes canonical#15248 Inspired-by: hamistao <pedro.ribeiro@canonical.com> Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
Although it is the default behaviour, make this explicit to indicate why we use it
and not the other modes ("never" and "metadata" don't allow execution).
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
Allow directs I/O from guests. Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
ec9fdb8 to
8ec06d7
Compare
…ead pool size This option can increase performance of virtiofsd based filesystem VM shares. Defaults to 0 (no thread pool) - which is the existing behaviour. Fixes canonical#15742 Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
00b5b3f to
943fb3a
Compare
… in checkInstanceRestrictions Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
…in restricted project without restricted.virtual-machines.lowlevel allowed This is to prevent restricted projects from configuring disks with a large virtiofsd thread pool size and consuming extra resources. Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
simondeziel
approved these changes
Jun 16, 2025
mihalicyn
approved these changes
Jun 16, 2025
This was referenced Jun 17, 2025
Merged
simondeziel
added a commit
to canonical/lxd-ci
that referenced
this pull request
Jun 17, 2025
…ads (#505) Adds tests for `disk` `io.threads` option from canonical/lxd#15792
Merged
tomponline
added a commit
to tomponline/lxd-pkg-snap
that referenced
this pull request
Jun 19, 2025
From PR canonical/lxd#15792 Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
tomponline
added a commit
to canonical/lxd-pkg-snap
that referenced
this pull request
Jun 19, 2025
…(latest-candidate) (#840) Cherry-picks virtiofsd io.threads option and direct I/O support into LXD 6.4. From PR canonical/lxd#15792 Fixes canonical/lxd#15248 Fixes canonical/lxd#15742
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
virtiofsd, in the process fixes VM: Invalid compat argument from virtiofsd for paths containing=#15248io.threadsoption for filesystemdiskdevices when being passed to the VM asvirtiofsdbased shares - this can improve performance. Fixes Poor write performance of LXD storage volume with cephfs driver on VM #15742io.threadsoption in restricted projects unlessrestricted.virtual-machines.lowlevelis set toallowto prevent restricted VMs from setting a high thread pool count and consuming extra host resources.disk_io_threads_virtiofsdAPI extension.