all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Leo Famulari <leo@famulari.name>
Cc: 47225@debbugs.gnu.org
Subject: bug#47225: QEMU warning about performance
Date: Tue, 06 Apr 2021 17:42:15 -0400	[thread overview]
Message-ID: <87zgybnl8o.fsf@gmail.com> (raw)
In-Reply-To: <YFLyVjT+hOYHvMS2@jasmine.lan> (Leo Famulari's message of "Thu, 18 Mar 2021 02:25:26 -0400")

[-- Attachment #1: Type: text/plain, Size: 619 bytes --]

Hi Leo,

Leo Famulari <leo@famulari.name> writes:

> While using `guix system vm`, I noticed this warning. I think it's new,
> maybe from the 5.2.0 update?
>
> ------
> 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.
> ------
>
> That web page suggests that we increase the virtio packet size when
> declaring the 9p file-systems, I think in %linux-vm-file-systems of (gnu
> system vm).

The attached patch should fix it (it does for me at least!).


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-system-vm-Set-a-larger-value-for-the-msize-option-of.patch --]
[-- Type: text/x-patch, Size: 1616 bytes --]

From c720e68229322e5c38c0321b021e8d6430636111 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Tue, 6 Apr 2021 17:37:33 -0400
Subject: [PATCH] system: vm: Set a larger value for the msize option of the 9p
 file system.

Fixes <https://issues.guix.gnu.org/47225>.

* gnu/system/vm.scm (mapping->file-system): Set the msize option to a value of
100 MiB (from the default 8 KiB).

Reported-by: Leo Famulari <leo@famulari.name>
---
 gnu/system/vm.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 3d0935b3af..f9cf39ae42 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -581,7 +581,15 @@ the operating system."
        (type "9p")
        (flags (if writable? '() '(read-only)))
        (options (string-append "trans=virtio"
-                               (if writable? "" ",cache=loose")))
+                               (if writable? "" ",cache=loose")
+                               ;; By default, the msize value is 8 KiB, which
+                               ;; according to QEMU is insufficient and would
+                               ;; degrade performance.  The msize value should
+                               ;; roughly match the bandwidth of the system's
+                               ;; IO (see:
+                               ;; https://wiki.qemu.org/Documentation/9psetup#msize).
+                               ;; Use 100 MiB as a conservative default.
+                               ",msize=104857600"))
        (check? #f)
        (create-mount-point? #t)))))
 
-- 
2.31.1


[-- Attachment #3: Type: text/plain, Size: 34 bytes --]


Thank you for the report,

Maxim

  reply	other threads:[~2021-04-06 21:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18  6:25 bug#47225: QEMU warning about performance Leo Famulari
2021-04-06 21:42 ` Maxim Cournoyer [this message]
2021-04-06 22:15   ` Leo Famulari
2021-04-07  0:42     ` Maxim Cournoyer
2021-04-07 17:46       ` Leo Famulari
2021-04-08 19:17       ` Leo Famulari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zgybnl8o.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=47225@debbugs.gnu.org \
    --cc=leo@famulari.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.