Bug 32415 - increase default max open files limit (default: 1024)
increase default max open files limit (default: 1024)
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Samba
UCS 3.1
Other Linux
: P5 normal (vote)
: UCS 3.2-0-errata
Assigned To: Arvid Requate
Stefan Gohmann
:
: 29620 33031 (view as bug list)
Depends on:
Blocks: 35362
  Show dependency treegraph
 
Reported: 2013-08-28 15:46 CEST by Ingo Steuwer
Modified: 2014-07-15 12:35 CEST (History)
5 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
default.patch (1.48 KB, patch)
2014-01-14 19:41 CET, Arvid Requate
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ingo Steuwer univentionstaff 2013-08-28 15:46:27 CEST
Reported by a customer (2013082821004831)

In several environments he saw Samba4 opened about 6 files per client-connection, where the default limit (ulimit) is always set to 1024. He had to increase the ulimits on most servers.
Comment 1 Arvid Requate univentionstaff 2013-08-28 17:37:06 CEST
Related: Bug 32221
Comment 2 Arvid Requate univentionstaff 2013-11-04 13:13:47 CET
*** Bug 33031 has been marked as a duplicate of this bug. ***
Comment 3 Tim Petersen univentionstaff 2013-12-13 09:40:28 CET
Reported again. 2013121321001433
Comment 4 Stefan Gohmann univentionstaff 2013-12-13 17:02:54 CET
Should be fixed with the next erratum.
Comment 5 Felix Botner univentionstaff 2014-01-08 17:17:57 CET
added  

univention-config-registry set \
        "security/limits/user/*/hard/nofile"?"32828" \
        "security/limits/user/*/soft/nofile"?"32828"

to univention-samba4.postinst and univention-samba.postinst

this increases the "Max open files" limit for the smbd process

YAML: 2013-12-18-univention-samba.yaml
      2014-01-08-univention-samba4.yaml
Comment 6 Stefan Gohmann univentionstaff 2014-01-10 07:36:10 CET
A UCR jenkins test fails:

----------------------------------------------------------------------------
Standard Ausgabe (STDOUT)

Checking dump...
Checking dump --shell...
Checking quoting...
Test failed. Output of --shell dump contains non-quoted values.
Bug exists as expected: Bug #16637

Standard Fehler (STDERR)

WARNING: univention-baseconfig is deprecated by univention-config-registry.
WARNING: univention-baseconfig is deprecated by univention-config-registry.
security/limits/user/*/hard/nofile=
----------------------------------------------------------------------------

For more information:
http://jenkins.knut.univention.de:8080/view/Autotest/job/UCS%203.2%20Autotest%20MultiEnv/234/SambaVersion=s4,Systemrolle=member/testReport/%28root%29/03_ucr_60ucr_dump/Test_Univention_Config_Registry_dump/

(In reply to Felix Botner from comment #5)
> univention-config-registry set \
>         "security/limits/user/*/hard/nofile"?"32828" \
>         "security/limits/user/*/soft/nofile"?"32828"
> 
> to univention-samba4.postinst and univention-samba.postinst
> 
> this increases the "Max open files" limit for the smbd process

Does this effect all other processes as well? I think in this case it should not be set in the samba packages.
Comment 7 Felix Botner univentionstaff 2014-01-10 11:02:44 CET
*** Bug 29620 has been marked as a duplicate of this bug. ***
Comment 8 Felix Botner univentionstaff 2014-01-10 12:05:53 CET
removed ulimit nofile stuff from univention-samba and univention-samba4, instead we set the limit always in univention-pam.

YAML: 2013-12-09-univention-pam.yaml

Added

        security/limits/user/default/soft/nofile?'8192' \
        security/limits/user/default/hard/nofile?'8192' \

to univention-pam. The template converts "default" to "*" because ucs-test complains about the "*" in the name of ucr variables.

These "default" settings are always at the beginning of /etc/security/limits.conf before other settings to allow other settings to overwrite these values (especially security/limits/user/*/..., which is used by customers). So if both are defined 

security/limits/user/default/soft/nofile

and

security/limits/user/*/soft/nofile

"security/limits/user/*/soft/nofile" should win.

For now we use 8192 as default. QA please verify that copying 10.000 1kB files from samba to a win7 client works, see http://forum.univention.de/viewtopic.php?t=2100&p=7369.
Comment 9 Arvid Requate univentionstaff 2014-01-14 19:41:18 CET
Created attachment 5735 [details]
default.patch

I think occupying the string "default" is no optimal design, so I propose using

  security/limits/user//hard/nofile"?"32828"

to set the factory default. The attached patch would adjust this.
Comment 10 Arvid Requate univentionstaff 2014-01-15 16:23:06 CET
Ok, after discussing this with our support we agreed upon using this for the factory default:

 security/limits/user/.*/hard/nofile"?"32828"

I adjusted the package and the advisory accordingly. Bug reassigned.
Comment 11 Arvid Requate univentionstaff 2014-01-22 16:11:42 CET
Now it's

 security/limits/deafult/user/soft/nofile"?"8192"
 security/limits/deafult/user/hard/nofile"?"8192"

Advisory adjusted.
Comment 12 Stefan Gohmann univentionstaff 2014-01-24 08:58:28 CET
Now it is set to 8192 instead of 32828. Any particular reason?
Comment 13 Arvid Requate univentionstaff 2014-01-24 16:31:19 CET
As discussed, I adjusted the limit to 32768. Package is rebuilt and advisory adjusted.
Comment 14 Stefan Gohmann univentionstaff 2014-01-28 07:42:25 CET
YAML: OK (I've adjusted the default value)
Code: OK
Tests: OK
Comment 15 Moritz Muehlenhoff univentionstaff 2014-01-29 11:16:59 CET
http://errata.univention.de/ucs/3.2/30.html