Bug 1045351

Summary: default sysctl kernel parameters shmmax and shmall should default to the theoretical limit of the architecture
Product: [Fedora] Fedora Reporter: Sandro Bonazzola <sbonazzo>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: urgent    
Version: 19CC: eedri, gansalmon, itamar, johannbg, jonathan, kernel-maint, lnykryn, madhu.chinakonda, msekleta, notting, plautrba, systemd-maint, vpavlin, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-23 14:53:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1039616    

Description Sandro Bonazzola 2013-12-20 08:46:27 UTC
Description of problem:
unsetting shmmax in sysctl lead to having other programs like postgresql failing 

(see bug #1039616).

Other distributions (RHEL for example, see bug #660036) set shmmax and shmall to the theoretical limit of the architecture as default.

Fedora should do the same.

Comment 1 Lukáš Nykrýn 2014-01-06 16:09:31 UTC
In ideal case defaults should be set directly in kernel. Otherwise /lib/sysctl.d/50-default.conf is own by systemd. So lets try kernel first.

Comment 2 Josh Boyer 2014-01-06 18:47:40 UTC
(In reply to Lukáš Nykrýn from comment #1)
> In ideal case defaults should be set directly in kernel. Otherwise
> /lib/sysctl.d/50-default.conf is own by systemd. So lets try kernel first.

The problem with ideal cases is it depends on whose ideals you're talking about.  The default can depend on various things, so we're left with setting it via sysctl.

Comment 3 Sandro Bonazzola 2014-01-20 08:20:01 UTC
Any progress here?

Comment 4 Kay Sievers 2014-01-20 10:18:10 UTC
Either the the current default makes sense, and we leave the kernel as it is,
or it makes no sense and the kernel should change. Systemd has no business
to overwrite the kernel here.

The rules for the kernel and systmed in that regard are the same; both are
not optional packages and should carry sensible defaults that make sense. For
kernel defaults the default needs to be set by the kernel, not by systemd.

Other optional tools can overwrite such defaults by shipping their own
config files which tweak the defaults. If postgres needs it, it should
probably set the values itself and not make any expectations from the base OS.

Systemd should never just unconditionally overwrite kernel defaults. That
makes not much sense, and will be the wrong thing to do in the long run.

Comment 5 Lennart Poettering 2014-01-23 13:44:52 UTC
Reassigning to kernel. We will not override the kernel defaults by default in systemd. It is up to the kernel guys to figure out useful defaults that work for everybody, not for us.

If the kernel guys don't agree with the requested change, they should close this bug, not us. (Though, given that RHEL supposedly defaults to the higher kernel values I don't see a reason why Fedora shouldn't. If these values work for RHEL and make people happy, then why not for Fedora?)

Comment 6 Josh Boyer 2014-01-23 13:48:16 UTC
RHEL defaults to higher values by setting it via the sysctl in the initscripts package, not by carrying a patch to the kernel.

Comment 7 Josh Boyer 2014-01-23 14:53:40 UTC
Closing this out.  We're not carrying a patch to the kernel to adjust a sysctl to a higher value.  That defeats the purpose of runtime tunable sysctls.  If postgres has problems with the default value, it can install a sysctl file in /lib/sysctl.d/ to adjust it up.

If someone really wants the kernel default changed, they should take it upstream and get it changed there.