lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <ZVyjZjPCXVmGGVFk@kernel.org>
Date:   Tue, 21 Nov 2023 09:32:38 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     vmolnaro@...hat.com
Cc:     linux-perf-users@...r.kernel.org, acme@...hat.com,
        mpetlan@...hat.com,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] perf test record.sh: Raise limit of open file descriptors

Em Wed, Nov 15, 2023 at 03:05:22PM +0100, vmolnaro@...hat.com escreveu:
> From: Veronika Molnarova <vmolnaro@...hat.com>
 
> Subtest for system-wide record with '--threads' option fails due to a
> limit of open file descriptors(usually set to 1024) on systems with
> 128 and more CPUs.
> 
> If the default limit is set lower than 2048 file descriptors,
> temporarily raise it to this value for the test.

Can we instead raise it to a multiple of the number of CPUs? Using:

[acme@...e ~]$ getconf _NPROCESSORS_ONLN
32
[acme@...e ~]$

If you tested 2048 is ok for a 128 CPU system, then maybe this is more
future proof:

[acme@...e ~]$ echo $(($(getconf _NPROCESSORS_ONLN) * 16))
512
[acme@...e ~]$ echo $((128 * 16))
2048
[acme@...e ~]$

- Arnaldo
 
> Signed-off-by: Veronika Molnarova <vmolnaro@...hat.com>
> ---
>  tools/perf/tests/shell/record.sh | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/tools/perf/tests/shell/record.sh b/tools/perf/tests/shell/record.sh
> index 4fbc74805d52..c6c43263809a 100755
> --- a/tools/perf/tests/shell/record.sh
> +++ b/tools/perf/tests/shell/record.sh
> @@ -11,6 +11,8 @@ err=0
>  perfdata=$(mktemp /tmp/__perf_test.perf.data.XXXXX)
>  testprog="perf test -w thloop"
>  testsym="test_loop"
> +min_fd_limit=2048
> +default_fd_limit=$(ulimit -n)
>  
>  cleanup() {
>    rm -rf "${perfdata}"
> @@ -154,10 +156,16 @@ test_workload() {
>    echo "Basic target workload test [Success]"
>  }
>  
> +if [[ $default_fd_limit -lt $min_fd_limit ]]; then
> +	ulimit -n $min_fd_limit
> +fi
> +
>  test_per_thread
>  test_register_capture
>  test_system_wide
>  test_workload
>  
> +ulimit -n $default_fd_limit
> +
>  cleanup
>  exit $err
> -- 
> 2.41.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ