rlimit_max is set but not used
Mikhail Novosyolov
m.novosyolov at rosalinux.ru
Thu Feb 7 14:59:00 UTC 2019
Hello everyone!
ulimit 'open files' was 1024 on my system, and Samba 4.9.4 printed:
"rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)"
I've grepped Samba's code for 'rlimit_max' and found that the only code
with it is
https://gitlab.com/samba-team/samba/blob/master/source3/param/loadparm.c#L310
if (sysctl_max < MIN_OPEN_FILES_WINDOWS) {
DEBUG(2,("max_open_files: increasing sysctl_max (%d) to "
"minimum Windows limit (%d)\n",
sysctl_max,
MIN_OPEN_FILES_WINDOWS));
sysctl_max = MIN_OPEN_FILES_WINDOWS;
}
if (rlimit_max < MIN_OPEN_FILES_WINDOWS) {
DEBUG(2,("rlimit_max: increasing rlimit_max (%d) to "
"minimum Windows limit (%d)\n",
rlimit_max,
MIN_OPEN_FILES_WINDOWS));
rlimit_max = MIN_OPEN_FILES_WINDOWS;
}
return MIN(sysctl_max, rlimit_max);
----------------------------------------------------------------------------------
Both rlimit_max and MIN_OPEN_FILES_WINDOWS are set as variables but are
never actually used anywhere else in the code.
Also, the message "increasing rlimit_max" seems to be confusing: is it
really increasing the limit? I see that only variable rlimit_max changes
its value and nothing else happens.
More information about the samba-technical
mailing list