Skip to content

Commit 14a0c2a

Browse files
committed
sysctl.d: set kernel.pid_max=4194304 on 64-bit systems
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 <[email protected]>
1 parent 4d0b700 commit 14a0c2a

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

Diff for: CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,8 @@ if(WITH_SYSTEMD)
589589
add_subdirectory(systemd)
590590
endif()
591591

592+
add_subdirectory(etc/sysctl)
593+
592594
include(CTags)
593595
option(CTAG_EXCLUDES "Exclude files/directories when running ctag.")
594596
add_tags(ctags

Diff for: etc/sysctl/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
90-ceph-osd.conf
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
fs.aio-max-nr = 1048576
2+
@sysctl_pid_max@

Diff for: etc/sysctl/CMakeLists.txt

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|arm|ARM")
2+
# 4194304 is the maximum limit possible on 64-bit CONFIG_BASE_FULL kernels.
3+
# Keep the default for 32-bit systems.
4+
set(sysctl_pid_max "kernel.pid_max = 4194304")
5+
endif()
6+
7+
configure_file(90-ceph-osd.conf.in
8+
${CMAKE_CURRENT_SOURCE_DIR}/90-ceph-osd.conf @ONLY)

0 commit comments

Comments
 (0)