[lxc-devel] [lxd/master] doc/instances: Typo fix
stgraber on Github
lxc-bot at linuxcontainers.org
Thu Nov 5 18:22:38 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20201105/ac3df69a/attachment.bin>
-------------- next part --------------
From 631c3a5c5c50d88b8bbe96fdd7de927b5ddf95ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Thu, 5 Nov 2020 13:21:54 -0500
Subject: [PATCH] doc/instances: Typo fix
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
doc/instances.md | 2 +-
lxd/storage_pools_config.go | 15 ++++++++-------
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/doc/instances.md b/doc/instances.md
index 19af14dfda..d6809ff115 100644
--- a/doc/instances.md
+++ b/doc/instances.md
@@ -54,7 +54,7 @@ limits.kernel.\* | string | - | no
limits.memory | string | - (all) | yes | - | Percentage of the host's memory or fixed value in bytes (various suffixes supported, see below)
limits.memory.enforce | string | hard | yes | container | If hard, instance can't exceed its memory limit. If soft, the instance can exceed its memory limit when extra host memory is available
limits.memory.hugepages | boolean | false | no | virtual-machine | Controls whether to back the instance using hugepages rather than regular system memory
-limits.memory.swap | boolean | true | yes | container | Controlers whether to encourage/discourage swapping less used pages for this instance
+limits.memory.swap | boolean | true | yes | container | Controls whether to encourage/discourage swapping less used pages for this instance
limits.memory.swap.priority | integer | 10 (maximum) | yes | container | The higher this is set, the least likely the instance is to be swapped to disk (integer between 0 and 10)
limits.network.priority | integer | 0 (minimum) | yes | - | When under load, how much priority to give to the instance's network requests (integer between 0 and 10)
limits.processes | integer | - (max) | yes | container | Maximum number of processes that can run in the instance
diff --git a/lxd/storage_pools_config.go b/lxd/storage_pools_config.go
index d593655bfd..09916394bf 100644
--- a/lxd/storage_pools_config.go
+++ b/lxd/storage_pools_config.go
@@ -175,15 +175,16 @@ func storagePoolFillDefault(name string, driver string, config map[string]string
return fmt.Errorf("Couldn't statfs %s: %s", shared.VarPath(), err)
}
- /* choose 15 GB < x < 100GB, where x is 20% of the disk size */
- size := uint64(st.Frsize) * st.Blocks / (1024 * 1024 * 1024) / 5
- if size > 100 {
- size = 100
+ /* choose 5 GB < x < 30GB, where x is 20% of the disk size */
+ defaultSize := uint64(st.Frsize) * st.Blocks / (1024 * 1024 * 1024) / 5
+ if defaultSize > 30 {
+ defaultSize = 30
}
- if size < 15 {
- size = 15
+ if defaultSize < 5 {
+ defaultSize = 5
}
- config["size"] = strconv.FormatUint(uint64(size), 10) + "GB"
+
+ config["size"] = strconv.FormatUint(uint64(defaultSize), 10) + "GB"
} else {
_, err := units.ParseByteSizeString(config["size"])
if err != nil {
More information about the lxc-devel
mailing list