cyyself / wg-bench

WireGuard Benchmark using netns and iperf3
83 stars 31 forks source link

Update README.md: add Xeon and M2 Max #14

Closed alvarogonzalez-packlink closed 9 months ago

alvarogonzalez-packlink commented 9 months ago

The Xeon result is pretty normal stuff The Mac stuff is virtualized inside a Lima VZ VM with 4 cores assigned.

The performance in the Mac benchmark can vary A LOT between VM restarts, although it keeps stable if you don't restart it. It can vary a lot also depending on the cores you assign, not necesarilly for the better with more cores.

Performance increase from 1 to 4 cores, but it can lower when you raise up to the 12 cores of this CPU. I think it's related to the cores you're assigned when starting the VM, knowing that it has 8 "performance" and 4 "efficiency" cores. There's some magic going on. It can go from 2GB/sec when you're assigned the bad cores, up to 10GB/sec when you get the good ones.

So the Xeon: Screenshot 2024-02-26 at 16 02 50

And the Mac: Screenshot 2024-02-26 at 15 56 22

cyyself commented 9 months ago

Thanks a lot. I don't know why M2 Max on VM can be so fast compared to M1 on native Asahilinux. I will try to test it when I'm free on my M1 Pro Macbook with this to investigate the performance.

cyyself commented 9 months ago

Hey, Can you provide where your kernel comes from? I checked Debian package and found that even sid still uses kernel v6.6. Can you provide your kernel config from /boot/config-6.7* and paste it here?

alvarogonzalez-packlink commented 9 months ago

It's from the experimental Debian repository taken from Debian 12.

I'm using Lima to start the VMs with these parameters:

./limactl create --name=debarm --arch=aarch64 --containerd=none --cpus=4 --disk=8 --memory=16 --vm-type vz template://debian-12

I've added this line to /etc/apt/sources.list:

deb https://deb.debian.org/debian experimental main

Then I installed like this:

sudo apt -t experimental install linux-image-arm64

And rebooted.

alvarogonzalez-packlink commented 9 months ago

If I start with the latest real time (rt) backports kernel, it does around 7GB/s:

Screenshot 2024-02-26 at 18 19 19

and if I restart just with the latest Debian 12 kernel, I get 8.5GB/s (I think it's just variability restart after restart):

Screenshot 2024-02-26 at 18 24 40

alvarogonzalez-packlink commented 9 months ago

The bad part is I can't test Asahi here, as this is a company managed laptop with MDM and all that stuff, and I think it doesn't allow me to boot "weird" stuff.

cyyself commented 9 months ago

OK. Thanks for the details. And I'm happy to share that @saffahyjp also told me he has an M2 Mac Mini and also got 8.8 Gbis/sec on M2 on VM. And on my (6P+2E) M1 Pro Macbook Pro with VMware fusion configured with 4C to VM + Debian 6.5.0-4-arm64 kernel, it will get 6.90 Gbits/sec. I may be able to debug the performance issues with Asahilinux by myself.