From e2934221e80699f8e2704464733eb50f4f0acb39 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Sat, 27 Jul 2024 22:13:55 +1200 Subject: [PATCH] Use the right fd estimates --- src/util.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util.cc b/src/util.cc index ee009e9bc23..ec5294214c4 100644 --- a/src/util.cc +++ b/src/util.cc @@ -2344,10 +2344,10 @@ static struct rlimit initial_fd_limit; static struct rlimit initial_memlock_limit; void raise_resource_limits() { - // We need up to 5 perf event counters per tracee task - initial_fd_limit = raise_resource_limit(RLIMIT_NOFILE, 1024 + 5 * MAX_TRACEE_TASKS); - // We typically need one page of locked memory per tracee task - initial_memlock_limit = raise_resource_limit(RLIMIT_MEMLOCK, page_size() * 2 * MAX_TRACEE_TASKS); + // We need up to 7 perf event counters per tracee task + initial_fd_limit = raise_resource_limit(RLIMIT_NOFILE, 1024 + 7 * MAX_TRACEE_TASKS); + // We may need one page of locked memory per tracee task + initial_memlock_limit = raise_resource_limit(RLIMIT_MEMLOCK, page_size() * 1 * MAX_TRACEE_TASKS); } void restore_initial_resource_limits() {