Skip to contentSkip to conversation

Increase consistency of domain examples

PATCH New Elliott Mitchell 1 participant 11 messages Apr 20, 2022

lore
Share & tools
lore
#0 lore raw

cover Increase consistency of domain examples

The "xlexample.*" files have drifted apart rather distinctly. This may cause puzzlement at why the distinct choices were made. Worse, I have an unpleasant suspicion a naive user could benchmark with these files and not realize performance differences were due to different settings, not the domain type.

I chose 3 vCPUs and 384MB of memory. This is in-between the values currently in the examples. I wonder whether I should have used the values from pvhlinux as those may better reflect typical small VMs now.

Elliott Mitchell (10):
docs: xlexample.hvm: Mention this isn't useful for other guests
docs: xlexample.*: Use consistent vCPU count
docs: xlexample.*: Use consistent initial memory
docs: xlexample.pvhlinux: Add commented maxmem setting
docs: xlexample.hvm: Fix maxmem value
docs: xlexample.hvm: Add reference to nographic option
docs: xlexample.pvhlinux: Make disk setting consistent with other
examples
docs: xlexample.hvm: Fix grammmer
docs: xlexample.pvlinux: Add "type" setting
docs: xlexample.pvhlinux: Use similar text to other examples

 tools/examples/xlexample.hvm      | 19 ++++++++++---------
 tools/examples/xlexample.pvhlinux | 13 +++++++++----
 tools/examples/xlexample.pvlinux  |  7 +++++--
 3 files changed, 24 insertions(+), 15 deletions(-)
Signature · 1 line
2.30.2
#1 lore raw

PATCH 1/10 docs: xlexample.hvm: Mention this isn't useful for other guests

I dislike the implication this default is valuable for all guests, need some mention of trade-off.

---
 tools/examples/xlexample.hvm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/examples/xlexample.hvm +1 -1
index df9fe07653..c2db4f237a 100644
@@ -18,7 +18,7 @@ name = "example.hvm"
 
 # Enable Microsoft Hyper-V compatibile paravirtualisation /
 # enlightenment interfaces. Turning this on can improve Windows guest
-# performance and is therefore recommended
+# performance and is therefore recommended for Windows guests
 #viridian = 1
 
 # Initial memory allocation (MB)
Signature · 1 line
2.30.2
#2 lore raw

PATCH 2/10 docs: xlexample.*: Use consistent vCPU count

In reply to Elliott Mitchell

Make all examples use the same number of vCPUs. Hopefully this avoids confusing attempts at benchmarking during installation.

---
 tools/examples/xlexample.hvm      | 2 +-
 tools/examples/xlexample.pvhlinux | 2 +-
 tools/examples/xlexample.pvlinux  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
tools/examples/xlexample.hvm +1 -1
index c2db4f237a..ed821fea87 100644
@@ -30,7 +30,7 @@ memory = 128
 #maxmem = 512
 
 # Number of VCPUS
-vcpus = 2
+vcpus = 3
 
 # Network devices
 # A list of 'vifspec' entries as described in
tools/examples/xlexample.pvhlinux +1 -1
index 18305b80af..49961e4687 100644
@@ -29,7 +29,7 @@ extra = "root=/dev/xvda1"
 memory = 512
 
 # Number of VCPUS
-vcpus = 4
+vcpus = 3
 
 # Network devices
 # A list of 'vifspec' entries as described in
tools/examples/xlexample.pvlinux +1 -1
index bb5996b29f..0c7a535f39 100644
@@ -31,7 +31,7 @@ memory = 128
 #maxmem = 512
 
 # Number of VCPUS
-vcpus = 2
+vcpus = 3
 
 # Network devices
 # A list of 'vifspec' entries as described in
Signature · 1 line
2.30.2
#3 lore raw

PATCH 3/10 docs: xlexample.*: Use consistent initial memory

In reply to Elliott Mitchell

Avoid confusing benchmarking during initial installation by using consistent amounts of memory for examples.

---
 tools/examples/xlexample.hvm      | 2 +-
 tools/examples/xlexample.pvhlinux | 2 +-
 tools/examples/xlexample.pvlinux  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
tools/examples/xlexample.hvm +1 -1
index ed821fea87..26ae1c2fb4 100644
@@ -22,7 +22,7 @@ name = "example.hvm"
 #viridian = 1
 
 # Initial memory allocation (MB)
-memory = 128
+memory = 384
 
 # Maximum memory (MB)
 # If this is greater than `memory' then the slack will start ballooned
tools/examples/xlexample.pvhlinux +1 -1
index 49961e4687..1e9bcb9de5 100644
@@ -26,7 +26,7 @@ kernel = "/boot/vmlinuz"
 extra = "root=/dev/xvda1"
 
 # Initial memory allocation (MB)
-memory = 512
+memory = 384
 
 # Number of VCPUS
 vcpus = 3
tools/examples/xlexample.pvlinux +1 -1
index 0c7a535f39..be6931549a 100644
@@ -23,7 +23,7 @@ kernel = "/boot/vmlinuz"
 extra = "root=/dev/xvda1"
 
 # Initial memory allocation (MB)
-memory = 128
+memory = 384
 
 # Maximum memory (MB)
 # If this is greater than `memory' then the slack will start ballooned
Signature · 1 line
2.30.2
#4 lore raw

PATCH 4/10 docs: xlexample.pvhlinux: Add commented maxmem setting

In reply to Elliott Mitchell

Avoid confusion caused by differing example configuration files.

---
 tools/examples/xlexample.pvhlinux | 5 +++++
 1 file changed, 5 insertions(+)
tools/examples/xlexample.pvhlinux +5 -0
index 1e9bcb9de5..e1bf845093 100644
@@ -28,6 +28,11 @@ extra = "root=/dev/xvda1"
 # Initial memory allocation (MB)
 memory = 384
 
+# Maximum memory (MB)
+# If this is greater than `memory' then the slack will start ballooned
+# (this assumes guest kernel support for ballooning)
+#maxmem = 512
+
 # Number of VCPUS
 vcpus = 3
 
Signature · 1 line
2.30.2
#7 lore raw

PATCH 7/10 docs: xlexample.pvhlinux: Make disk setting consistent with other examples

In reply to Elliott Mitchell

While storing images on ZFS is now quite common, such isn't required at all. As such the example should be as generic as possible and consistent with other examples.

---
 tools/examples/xlexample.pvhlinux | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/examples/xlexample.pvhlinux +1 -1
index e1bf845093..a6a52c336c 100644
@@ -44,4 +44,4 @@ vif = [ '' ]
 # Disk Devices
 # A list of `diskspec' entries as described in
 # docs/misc/xl-disk-configuration.txt
-disk = [ '/dev/zvol/tank/guest-volume,raw,xvda,rw' ]
+disk = [ '/dev/vg/guest-volume,raw,xvda,rw' ]
Signature · 1 line
2.30.2
#8 lore raw

PATCH 8/10 docs: xlexample.hvm: Fix grammmer

In reply to Elliott Mitchell

This is correct and makes comparing the files with diff easier.

---
 tools/examples/xlexample.hvm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/examples/xlexample.hvm +2 -2
index 7afb7c731d..df82280531 100644
@@ -2,10 +2,10 @@
 # Example HVM guest configuration
 # =====================================================================
 #
-# This is a fairly minimal example of what is required for an
+# This is a fairly minimal example of what is required for a
 # HVM guest. For a more complete guide see xl.cfg(5)
 
-# This configures an HVM rather than PV guest
+# This configures a HVM guest instead of PV or PVH
 type = "hvm"
 
 # Guest name
Signature · 1 line
2.30.2
#9 lore raw

PATCH 9/10 docs: xlexample.pvlinux: Add "type" setting

In reply to Elliott Mitchell

Some environments will prefer to explicitly include this setting despite being the default. This also increases consistency with other examples.

---
 tools/examples/xlexample.pvlinux | 3 +++
 1 file changed, 3 insertions(+)
tools/examples/xlexample.pvlinux +3 -0
index be6931549a..19dac50fcd 100644
@@ -5,6 +5,9 @@
 # This is a fairly minimal example of what is required for a
 # Paravirtualised Linux guest. For a more complete guide see xl.cfg(5)
 
+# This configures a PV guest instead of HVM or PVH
+#type = "pv"	# "pv" is default
+
 # Guest name
 name = "example.pvlinux"
 
Signature · 1 line
2.30.2
#10 lore raw

PATCH 10/10 docs: xlexample.pvhlinux: Use similar text to other examples

In reply to Elliott Mitchell

Simply making the word choice match the other examples.

---
 tools/examples/xlexample.pvhlinux | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/examples/xlexample.pvhlinux +1 -1
index a6a52c336c..7685fb67b6 100644
@@ -5,7 +5,7 @@
 # This is a fairly minimal example of what is required for a
 # PVH Linux guest. For a more complete guide see xl.cfg(5)
 
-# This configures a PVH rather than PV guest
+# This configures a PVH guest instead of HVM or PV
 type = "pvh"
 
 # Guest name
Signature · 1 line
2.30.2
#5 lore raw

PATCH 5/10 docs: xlexample.hvm: Fix maxmem value

In reply to Elliott Mitchell

HVM doesn't balloon and so it makes no sense to specify maxmem.

---
 tools/examples/xlexample.hvm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/examples/xlexample.hvm +3 -3
index 26ae1c2fb4..a6cafcbf9f 100644
@@ -25,9 +25,9 @@ name = "example.hvm"
 memory = 384
 
 # Maximum memory (MB)
-# If this is greater than `memory' then the slack will start ballooned
-# (this assumes guest kernel support for ballooning)
-#maxmem = 512
+# Unlike PV or PVH, HVM cannot balloon memory and hence this should match
+# `memory' or simply be left unset.
+#maxmem =
 
 # Number of VCPUS
 vcpus = 3
Signature · 1 line
2.30.2
#6 lore raw

PATCH 6/10 docs: xlexample.hvm: Add reference to nographic option

In reply to Elliott Mitchell

Running without any display device is a completely legal configuration.

---
 tools/examples/xlexample.hvm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/examples/xlexample.hvm +2 -1
index a6cafcbf9f..7afb7c731d 100644
@@ -42,6 +42,7 @@ vif = [ '' ]
 # docs/misc/xl-disk-configuration.txt
 disk = [ '/dev/vg/guest-volume,raw,xvda,rw' ]
 
-# Guest VGA console configuration, either SDL or VNC
+# Guest VGA console configuration, SDL, VNC, or none
 sdl = 1
 #vnc = 1
+#nographic = 1
Signature · 1 line
2.30.2