* [PATCH] test/README: Requirements for socket buffer sizes and hardware performance events
@ 2022-08-30 20:00 Stefano Brivio
2022-09-01 1:37 ` David Gibson
0 siblings, 1 reply; 2+ messages in thread
From: Stefano Brivio @ 2022-08-30 20:00 UTC (permalink / raw)
To: passt-dev
[-- Attachment #1: Type: text/plain, Size: 1599 bytes --]
Performance tests use iperf3(1) with large windows, and these sysctl
entries are needed to run them unmodified.
The passt demo uses perf(1) to report syscall overhead, and that
needs access to hardware performance counters for unprivileged
users.
Reported-by: David Gibson <david(a)gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio(a)redhat.com>
---
test/README.md | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/test/README.md b/test/README.md
index 581949a..72a4986 100644
--- a/test/README.md
+++ b/test/README.md
@@ -47,6 +47,22 @@ Virtual machine images are built during test executions using
[mbuto](https://mbuto.lameexcu.se/), the shell script is sourced via _git_
as needed, so there's no need to actually install it.
+### Kernel parameters
+
+Performance tests use iperf3 with rather large TCP receiving and sending
+windows, to decrease the likelihood of iperf3 itself becoming the bottleneck.
+These values need to be allowed by the kernel of the host running the tests.
+Example for /etc/sysctl.conf:
+
+ net.core.rmem_max = 134217728
+ net.core.wmem_max = 134217728
+
+Further, the passt demo uses perf(1), relying on hardware events for performance
+counters, to display syscall overhead. The kernel needs to allow unprivileged
+users to access these events. Suggested entry for /etc/sysctl.conf:
+
+ kernel.perf_event_paranoid = -1
+
### Special requirements for continuous integration and demo modes
Running the test suite as continuous integration or demo modes will record the
--
@@ -47,6 +47,22 @@ Virtual machine images are built during test executions using
[mbuto](https://mbuto.lameexcu.se/), the shell script is sourced via _git_
as needed, so there's no need to actually install it.
+### Kernel parameters
+
+Performance tests use iperf3 with rather large TCP receiving and sending
+windows, to decrease the likelihood of iperf3 itself becoming the bottleneck.
+These values need to be allowed by the kernel of the host running the tests.
+Example for /etc/sysctl.conf:
+
+ net.core.rmem_max = 134217728
+ net.core.wmem_max = 134217728
+
+Further, the passt demo uses perf(1), relying on hardware events for performance
+counters, to display syscall overhead. The kernel needs to allow unprivileged
+users to access these events. Suggested entry for /etc/sysctl.conf:
+
+ kernel.perf_event_paranoid = -1
+
### Special requirements for continuous integration and demo modes
Running the test suite as continuous integration or demo modes will record the
--
2.35.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] test/README: Requirements for socket buffer sizes and hardware performance events
2022-08-30 20:00 [PATCH] test/README: Requirements for socket buffer sizes and hardware performance events Stefano Brivio
@ 2022-09-01 1:37 ` David Gibson
0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2022-09-01 1:37 UTC (permalink / raw)
To: passt-dev
[-- Attachment #1: Type: text/plain, Size: 2097 bytes --]
On Tue, Aug 30, 2022 at 10:00:07PM +0200, Stefano Brivio wrote:
> Performance tests use iperf3(1) with large windows, and these sysctl
> entries are needed to run them unmodified.
>
> The passt demo uses perf(1) to report syscall overhead, and that
> needs access to hardware performance counters for unprivileged
> users.
>
> Reported-by: David Gibson <david(a)gibson.dropbear.id.au>
> Signed-off-by: Stefano Brivio <sbrivio(a)redhat.com>
Reviewed-by: David Gibson <david(a)gibson.dropbear.id.au>
If I get time, I'll try to add something to skip these tests if the
host sysctl isn't set appropriately.
> ---
> test/README.md | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/test/README.md b/test/README.md
> index 581949a..72a4986 100644
> --- a/test/README.md
> +++ b/test/README.md
> @@ -47,6 +47,22 @@ Virtual machine images are built during test executions using
> [mbuto](https://mbuto.lameexcu.se/), the shell script is sourced via _git_
> as needed, so there's no need to actually install it.
>
> +### Kernel parameters
> +
> +Performance tests use iperf3 with rather large TCP receiving and sending
> +windows, to decrease the likelihood of iperf3 itself becoming the bottleneck.
> +These values need to be allowed by the kernel of the host running the tests.
> +Example for /etc/sysctl.conf:
> +
> + net.core.rmem_max = 134217728
> + net.core.wmem_max = 134217728
> +
> +Further, the passt demo uses perf(1), relying on hardware events for performance
> +counters, to display syscall overhead. The kernel needs to allow unprivileged
> +users to access these events. Suggested entry for /etc/sysctl.conf:
> +
> + kernel.perf_event_paranoid = -1
> +
> ### Special requirements for continuous integration and demo modes
>
> Running the test suite as continuous integration or demo modes will record the
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-01 1:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-30 20:00 [PATCH] test/README: Requirements for socket buffer sizes and hardware performance events Stefano Brivio
2022-09-01 1:37 ` David Gibson
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).