Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable CONFIG_IRQSOFF_TRACER for better WireGuard performance #5799

Closed
cyyself opened this issue Dec 18, 2023 · 0 comments
Closed

Disable CONFIG_IRQSOFF_TRACER for better WireGuard performance #5799

cyyself opened this issue Dec 18, 2023 · 0 comments

Comments

@cyyself
Copy link
Contributor

cyyself commented Dec 18, 2023

Describe the bug

Recently, I found the WireGuard Performance on Respbian is much worse than OpenWRT using my wireguard benchmark script. After some investigations, I found the performance was hindered by CONFIG_PREEMPT and CONFIG_IRQSOFF_TRACER, which hindered from ~1.1Gbps to only ~400Mbps. As Raspbian may be used as Desktop OS, we can only turn off CONFIG_IRQSOFF_TRACER. I also found that Debian has not enabled this configuration by default. IMHO such configuration which hindered too much performance should be removed. If we only remove CONFIG_IRQSOFF_TRACER=y but keep CONFIG_PREEMPT=y, we can also see the performance improvements from ~390Mbps to ~680Mbps. You can also see my investigation procedures here.

Steps to reproduce the behaviour

Using my WireGuard benchmark:

sudo apt install wireguard-tools iperf3 git
git clone https://github.com/cyyself/wg-bench.git
cd wg-bench
sudo ./setup-netns.sh
sudo ./benchmark.sh
sudo ./clean-up.sh

Pi 4 should reach ~680Mbps instead of ~390Mbps.

Device (s)

Raspberry Pi 4 Mod. B

System

/etc/rpi-issue:

Raspberry Pi reference 2023-12-11
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 2acf7afcba7d11500313a7b93bb55a2aae20b2d6, stage2

vcgencmd version:

Oct 17 2023 15:39:16 
Copyright (c) 2012 Broadcom
version 30f0c5e4d076da3ab4f341d88e7d505760b93ad7 (clean) (release) (start)

uname -a (self-compiled):

Linux raspberrypi 6.1.68-v8+ #29 SMP PREEMPT Mon Dec 18 22:58:01 CST 2023 aarch64 GNU/Linux

Logs

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant