Skip to content

virtiofs: enable cache, inode file handles#1817

Merged
brianmcgillion merged 2 commits intotiiuae:mainfrom
kajusnau:shared-store-perf
Mar 11, 2026
Merged

virtiofs: enable cache, inode file handles#1817
brianmcgillion merged 2 commits intotiiuae:mainfrom
kajusnau:shared-store-perf

Conversation

@kajusnau
Copy link
Copy Markdown
Collaborator

@kajusnau kajusnau commented Mar 10, 2026

Description of Changes

Upstream microvm recently made a change that sets virtiofs to prefer inode file handles by default.

Here we bump microvm.nix to include this change.
In addition, we explicitly change the virtiofs cache setting from the default auto to always.

Reference manual for these options can be found here
https://gitlab.com/virtio-fs/virtiofsd

These options should hopefully improve the load times for various apps, tools, and libraries, especially on subsequent launches.

Other changes:

  • Disabled s76 scheduler by default, as it seems to offer no real performance improvements at this time
  • Enabled transparent_hugepages for the host for balanced and performance profiles

Type of Change

  • New Feature
  • Bug Fix
  • Improvement / Refactor

Related Issues / Tickets

Checklist

  • Clear summary in PR description
  • Detailed and meaningful commit message(s)
  • Commits are logically organized and squashed if appropriate
  • Contribution guidelines followed
  • Ghaf documentation updated with the commit - https://tiiuae.github.io/ghaf/
  • Author has run make-checks and it passes
  • All automatic GitHub Action checks pass - see actions
  • Author has added reviewers and removed PR draft status

Testing Instructions

Applicable Targets

  • Orin AGX aarch64
  • Orin NX aarch64
  • Lenovo X1 x86_64
  • Dell Latitude x86_64
  • System 76 x86_64

Installation Method

  • Requires full re-installation
  • Can be updated with nixos-rebuild ... switch
  • Other:

Test Steps To Verify:

  1. ...

@milva-unikie
Copy link
Copy Markdown

I measured the launch time of Cosmic Settings on Lenovo X1 with mainline and this PR. There is a clear improvement.

image

Attempt to improve load times for shared store access by enabling
virtiofs cache
Bump microvm.nix to include upstream inodeFileHandles change

Signed-off-by: Kajus Naujokaitis <kajus.naujokaitis@unikie.com>
Disabled s76 scheduler by default, as there seems to be no clear
performance improvement.
Adjusted TuneD config for the host to use transparent_hugepages
when not on powersave profile, reduced vm.swappiness

Signed-off-by: Kajus Naujokaitis <kajus.naujokaitis@unikie.com>
@brianmcgillion brianmcgillion merged commit 3a7476e into tiiuae:main Mar 11, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants