From e074e3952b16198c607dc00aa8b6deae6a59ceab Mon Sep 17 00:00:00 2001 From: "dyoung@redhat.com" Date: Tue, 26 Feb 2013 16:09:11 +0800 Subject: [PATCH] tune sysconfig to save memory usage tune sysconfig to save 2nd kernel memory usage The memory in 2nd kernel is limited, we need to use as less memory as we can to ensure vmcore capturing ok. I'm doing below improvements in this patch: 1) numa support is not necessary for kdump kernel, so disable it by adding numa=off to save some kernel mm memory usage. 2) Also add udev.children-max=2 to cmdline to limit max udev chidren processes. 3) For ppc64, ehea driver will by default enable multi queue feature which will use a lot of memory. Almost each ppc machine will oom for network(ssh/nfs) kdump. The module param use_mcs=0 is used to disable multi queue feature. Tested these params on an IBM machine with 2 numa nodes which ooms even for local dump to rootfs. With this patch oom does not happen for local/ssh dump, but for nfs dump oom still happens in the middle of makedumpfile vmcore copying. So there should be other improvement yet. For ehea driver there's other params we can use, but because it's hard to measure the saved memory, I'm waiting for input from IBM people. We can add them later. Signed-off-by: Dave Young Acked-by: Vivek Goyal --- kdump.sysconfig.i386 | 2 +- kdump.sysconfig.ppc64 | 2 +- kdump.sysconfig.s390x | 2 +- kdump.sysconfig.x86_64 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kdump.sysconfig.i386 b/kdump.sysconfig.i386 index b951139..309e63f 100644 --- a/kdump.sysconfig.i386 +++ b/kdump.sysconfig.i386 @@ -16,7 +16,7 @@ KDUMP_COMMANDLINE="" # This variable lets us append arguments to the current kdump commandline # As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline -KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices" +KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices numa=off udev.children-max=2" # Any additional kexec arguments required. In most situations, this should # be left empty diff --git a/kdump.sysconfig.ppc64 b/kdump.sysconfig.ppc64 index 5f322af..17f83fb 100644 --- a/kdump.sysconfig.ppc64 +++ b/kdump.sysconfig.ppc64 @@ -16,7 +16,7 @@ KDUMP_COMMANDLINE="" # This variable lets us append arguments to the current kdump commandline # As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline -KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 noirqdistrib reset_devices cgroup_disable=memory" +KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0" # Any additional kexec arguments required. In most situations, this should # be left empty diff --git a/kdump.sysconfig.s390x b/kdump.sysconfig.s390x index 6c48a39..d7993c4 100644 --- a/kdump.sysconfig.s390x +++ b/kdump.sysconfig.s390x @@ -16,7 +16,7 @@ KDUMP_COMMANDLINE="" # This variable lets us append arguments to the current kdump commandline # As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline -KDUMP_COMMANDLINE_APPEND="maxcpus=1 cgroup_disable=memory" +KDUMP_COMMANDLINE_APPEND="maxcpus=1 cgroup_disable=memory numa=off udev.children-max=2" # Any additional /sbin/mkdumprd arguments required. MKDUMPRD_ARGS="" diff --git a/kdump.sysconfig.x86_64 b/kdump.sysconfig.x86_64 index b291b04..c11ce0b 100644 --- a/kdump.sysconfig.x86_64 +++ b/kdump.sysconfig.x86_64 @@ -16,7 +16,7 @@ KDUMP_COMMANDLINE="" # This variable lets us append arguments to the current kdump commandline # As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline -KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off" +KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off numa=off udev.children-max=2" # Any additional kexec arguments required. In most situations, this should # be left empty