]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
sysctl.d: set kernel.pid_max=4194304 on 64-bit systems 18544/head
authorDavid Disseldorp <ddiss@suse.de>
Tue, 14 Nov 2017 15:32:39 +0000 (16:32 +0100)
committerDavid Disseldorp <ddiss@suse.de>
Fri, 17 Nov 2017 13:40:23 +0000 (14:40 +0100)
For CONFIG_BASE_FULL Linux kernels, the maximum number of proc/thread
IDs is set to 32768 by default. This default limit can be quite easily
hit during recovery on nodes with high OSD counts.
To avoid hitting the pid_max default limit, attempt to configure it to
4194304, which corresponds to the maximum limit possible on 64-bit
CONFIG_BASE_FULL kernels.

Fixes: http://tracker.ceph.com/issues/21929
Signed-off-by: David Disseldorp <ddiss@suse.de>
CMakeLists.txt
etc/sysctl/.gitignore [new file with mode: 0644]
etc/sysctl/90-ceph-osd.conf [deleted file]
etc/sysctl/90-ceph-osd.conf.in [new file with mode: 0644]
etc/sysctl/CMakeLists.txt [new file with mode: 0644]

index 5a9360b604c55d2163a819ccd2bd0245a6b81e70..52e80d7031878a2f1857c85e1fad796e8eecd3b2 100644 (file)
@@ -589,6 +589,8 @@ if(WITH_SYSTEMD)
   add_subdirectory(systemd)
 endif()
 
+add_subdirectory(etc/sysctl)
+
 include(CTags)
 option(CTAG_EXCLUDES "Exclude files/directories when running ctag.")
 add_tags(ctags
diff --git a/etc/sysctl/.gitignore b/etc/sysctl/.gitignore
new file mode 100644 (file)
index 0000000..5529d37
--- /dev/null
@@ -0,0 +1 @@
+90-ceph-osd.conf
diff --git a/etc/sysctl/90-ceph-osd.conf b/etc/sysctl/90-ceph-osd.conf
deleted file mode 100644 (file)
index c5c64bb..0000000
+++ /dev/null
@@ -1 +0,0 @@
-fs.aio-max-nr = 1048576
diff --git a/etc/sysctl/90-ceph-osd.conf.in b/etc/sysctl/90-ceph-osd.conf.in
new file mode 100644 (file)
index 0000000..96bd40a
--- /dev/null
@@ -0,0 +1,2 @@
+fs.aio-max-nr = 1048576
+@sysctl_pid_max@
diff --git a/etc/sysctl/CMakeLists.txt b/etc/sysctl/CMakeLists.txt
new file mode 100644 (file)
index 0000000..93cd777
--- /dev/null
@@ -0,0 +1,8 @@
+if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|arm|ARM")
+  # 4194304 is the maximum limit possible on 64-bit CONFIG_BASE_FULL kernels.
+  # Keep the default for 32-bit systems.
+  set(sysctl_pid_max "kernel.pid_max = 4194304")
+endif()
+
+configure_file(90-ceph-osd.conf.in
+               ${CMAKE_CURRENT_SOURCE_DIR}/90-ceph-osd.conf @ONLY)