Increase msize for 9p mount to 512KB (~30% read performance increase)
I have verified that this changen actually works on my sid qemu VM and that there is a measurable performance increase (124s -> 86s)
Prior to this change, the mount command would emit this warning on autopkgtest runs:
qemu-system-x86_64: warning: 9p: degraded performance: a reasonable high msize should be chosen on client/guest side (chosen msize is <= 8192). See https://wiki.qemu.org/Documentation/9psetup#msize for details.
512KB is currently the kernel limit, though the intention is to remove that. See https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg00989.html for discussion about the values, and https://lists.gnu.org/archive/html/qemu-devel/2021-02/msg07258.html for the discussion about removing the max value.
I have verified that it actually improves performance within the VM with a 10GB file "foo":
root@sid:~# mount -t 9p
autopkgtest on /run/autopkgtest/shared type 9p (rw,relatime,access=any,trans=virtio)
root@sid:~# time cat /run/autopkgtest/shared/foo > /dev/null
real 2m4.218s
user 0m0.142s
sys 0m16.212s
root@sid:~# umount /run/autopkgtest/shared/
root@sid:~# mount -t 9p -o trans=virtio,access=any,msize=512000 autopkgtest /run/autopkgtest/shared
root@sid:~# mount -t 9p
autopkgtest on /run/autopkgtest/shared type 9p (rw,relatime,access=any,msize=512000,trans=virtio)
root@sid:~# time cat /run/autopkgtest/shared/foo > /dev/null
real 1m26.010s
user 0m0.048s
sys 0m11.038s
Merge request reports
Activity
Thanks, this is a nice improvement. The CI failure is an unrelated timeout.
In terms of kernel compatibility,
msize=
was already supported in linux 3.2, and maybe even before, see:https://github.com/torvalds/linux/commit/14211d026dad4641d4dffd7a4c520bcaa8fd4a65
so there should be no problem in terms of "old testbed" compatibility.
mentioned in commit fbd7669b