aboutsummaryrefslogtreecommitdiff
path: root/hw/9pfs/9p.c
diff options
context:
space:
mode:
authorChristian Schoenebeck <qemu_oss@crudebyte.com>2020-09-03 16:20:21 +0200
committerChristian Schoenebeck <qemu_oss@crudebyte.com>2020-09-15 12:12:03 +0200
commit62777d825ba6a7f9ba749588a9e1e7b273f7e967 (patch)
treef53a453d6a853be7c543921aa3d9c53f657944a2 /hw/9pfs/9p.c
parent2d2c73d0e3d504a61f868e46e6abd5643f38091b (diff)
downloadqemu-62777d825ba6a7f9ba749588a9e1e7b273f7e967.zip
qemu-62777d825ba6a7f9ba749588a9e1e7b273f7e967.tar.gz
qemu-62777d825ba6a7f9ba749588a9e1e7b273f7e967.tar.bz2
9pfs: log warning if msize <= 8192
It is essential to choose a reasonable high value for 'msize' to avoid severely degraded file I/O performance. This parameter can only be chosen on client/guest side, and a Linux client defaults to an 'msize' of only 8192 if the user did not explicitly specify a value for 'msize', which results in very poor file I/O performance. Unfortunately many users are not aware that they should specify an appropriate value for 'msize' to avoid severe performance issues, so log a performance warning (with a QEMU wiki link explaining this issue in detail) on host side in that case to make it more clear. Currently a client cannot automatically pick a reasonable value for 'msize', because a good value for 'msize' depends on the file I/O potential of the underlying storage on host side, i.e. a feature invisible to the client, and even then a user would still need to trade off between performance profit and additional RAM costs, i.e. with growing 'msize' (RAM occupation), performance still increases, but performance delta will shrink continuously. Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com> Reviewed-by: Greg Kurz <groug@kaod.org> Message-Id: <e6fc84845c95816ad5baecb0abd6bfefdcf7ec9f.1599144062.git.qemu_oss@crudebyte.com> Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Diffstat (limited to 'hw/9pfs/9p.c')
-rw-r--r--hw/9pfs/9p.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index 7bb994b..99b6f24 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -1353,6 +1353,15 @@ static void coroutine_fn v9fs_version(void *opaque)
goto out;
}
+ /* 8192 is the default msize of Linux clients */
+ if (s->msize <= 8192) {
+ warn_report_once(
+ "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."
+ );
+ }
+
marshal:
err = pdu_marshal(pdu, offset, "ds", s->msize, &version);
if (err < 0) {