runInLinuxVM: set 9p msize to 128K

This fixes the following warning from QEMU, by using the value that
will be the default in newer kernels[1].

> 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.

For a runInLinuxVM derivation I have that does a large amount of
IO[2], this change results in a fairly small but repeatable speed
increase.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9c4d94dc9a64426d2fa0255097a3a84f6ff2eebe
[2]: https://spectrum-os.org/git/spectrum/tree/installer/default.nix?id=06dd70500a9e475d23e3296dddf409d84abf9b9c#n52
This commit is contained in:
Alyssa Ross 2021-12-16 17:48:51 +00:00
parent 3ba70f5910
commit 0acf53bdb1
No known key found for this signature in database
GPG key ID: F9DBED4859B271C0

View file

@ -114,7 +114,7 @@ rec {
echo "mounting Nix store..."
mkdir -p /fs${storeDir}
mount -t 9p store /fs${storeDir} -o trans=virtio,version=9p2000.L,cache=loose
mount -t 9p store /fs${storeDir} -o trans=virtio,version=9p2000.L,cache=loose,msize=131072
mkdir -p /fs/tmp /fs/run /fs/var
mount -t tmpfs -o "mode=1777" none /fs/tmp
@ -123,7 +123,7 @@ rec {
echo "mounting host's temporary directory..."
mkdir -p /fs/tmp/xchg
mount -t 9p xchg /fs/tmp/xchg -o trans=virtio,version=9p2000.L
mount -t 9p xchg /fs/tmp/xchg -o trans=virtio,version=9p2000.L,msize=131072
mkdir -p /fs/proc
mount -t proc none /fs/proc