Skip to contentSkip to conversation

stable-2.02 - io: increase the default io memory from 4 to 8 MiB

PATCH David Teigland 1 participant 1 message Mar 4, 2019

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=590a1ebcf78b8aae2a1e5ebaba1ac24a54435690
Commit:        590a1ebcf78b8aae2a1e5ebaba1ac24a54435690
Parent:        863a2e693ee95b95463d60fa8b21f4c7c084292c
Author:        David Teigland <[email protected]>
AuthorDate:    Mon Mar 4 11:18:34 2019 -0600
Committer:     David Teigland <[email protected]>
CommitterDate: Mon Mar 4 11:18:34 2019 -0600

io: increase the default io memory from 4 to 8 MiB

This is the default bcache size that is created at the start of the command. It needs to be large enough to hold a single copy of metadata for a given VG, or the VG cannot be read or written (since the entire VG would not fit into available memory.)

Increasing the default reduces the chances of anyone needing to increase the default to use their VG.

The size can be set in lvm.conf global/io_memory_size; the lower limit is 4 MiB and the upper limit is 128 MiB.

---
 lib/config/defaults.h |    2 +-
 lib/label/label.c     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
lib/config/defaults.h +1 -1
index 3b4438a..9e398d7 100644
@@ -269,6 +269,6 @@
 
 #define DEFAULT_SCAN_LVS 0
 
-#define DEFAULT_IO_MEMORY_SIZE_KB 4096
+#define DEFAULT_IO_MEMORY_SIZE_KB 8192
 
 #endif				/* _LVM_DEFAULTS_H */
lib/label/label.c +1 -1
index e96a7fe..4f8e135 100644
@@ -791,7 +791,7 @@ out:
  * the metadata size.)
  */
 
-#define MIN_BCACHE_BLOCKS 32    /* 4MB, currently matches DEFAULT_IO_MEMORY_SIZE_KB */
+#define MIN_BCACHE_BLOCKS 32    /* 4MB */
 #define MAX_BCACHE_BLOCKS 1024
 
 static int _setup_bcache(int num_devs)