]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: bump mlock ulimit to 64Mb
authorRoman Gushchin <guro@fb.com>
Thu, 23 Aug 2018 17:46:20 +0000 (10:46 -0700)
committerRoman Gushchin <guro@fb.com>
Tue, 9 Oct 2018 16:46:36 +0000 (09:46 -0700)
Bpf programs are charged against memlock ulimit, and the default value
can be too tight on machines with many cgroups and attached bpf programs.

Let's bump it to 64Mb.

src/core/main.c

index ce45f2ded234948c31564b90a7e23cf0dff62855..88656dcabf567a30f5e44c931e2041e82a679c66 100644 (file)
@@ -1201,7 +1201,7 @@ static int bump_rlimit_memlock(struct rlimit *saved_rlimit) {
         if (getrlimit(RLIMIT_MEMLOCK, saved_rlimit) < 0)
                 return log_warning_errno(errno, "Reading RLIMIT_MEMLOCK failed, ignoring: %m");
 
-        r = setrlimit_closest(RLIMIT_MEMLOCK, &RLIMIT_MAKE_CONST(1024ULL*1024ULL*16ULL));
+        r = setrlimit_closest(RLIMIT_MEMLOCK, &RLIMIT_MAKE_CONST(1024ULL*1024ULL*64ULL));
         if (r < 0)
                 return log_warning_errno(r, "Setting RLIMIT_MEMLOCK failed, ignoring: %m");