[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: kernel configs in Debian



Hi,

This is a followup for my previous post of impact on kernel performance
by kernel comile options:

Summary:
* CONFIG_PARAVIRT=n has probably no positive impact on either
  linux-image-arm64 or linux-image-rt-arm64.

* CONFIG_DEBUG_PREEMPT=n much improves performance of linux-image-rt-arm64,
  while it is unselectabe with linux-image-arm64 as CONFIG_DEBUG_PREEMPT
  depends on CONFIG_PREEMPTION.

* linux-image-rt-arm64 is much slower than the standard linux-image-arm64,
  but its performance probably becomes comparable by omitting unnecessary
  compile options for a given hardware.

* All kernel versions are 5.10.28.

Experiments:
Compile options are adjusted as follows:

apt-get source linux
cd linux-5.10.28
fakeroot make -f debian/rules.gen setup_arm64_none_arm64
cat >>debian/build/build_arm64_none_arm64/.config <<'EOF'
CONFIG_XEN=n
CONFIG_PARAVIRT=n
CONFIG_DEBUG_INFO_BTF=n
EOF
fakeroot debian/rules source
fakeroot make -j 4 -f debian/rules.gen binary-arch_arm64_none_arm64

CONFIG_XEN selects CONFIG_PARAVIRT, so it must be disabled when CONFIG_PARAVIRT=n.
CONFIG_DEBUG_INFO_BTF=y causes build error with linux-image-arm64.

The job of RPi4B is taking IPv4 packets, applying NAPT, encapslating them in IPv6,
and vice versa. Almost no user process is involved. CPU is mainly in the kernel
mode or interrupt. The cpu consumption of hard irq + softirq of single cpu core
spikes to 85 to 100% during the speedtest.

CPU frequency of RPi4 is set to the lowest (600 MHz) by
cpupower frequency-set -g powersave

IPv6 packets can travel at around 600-800Mbps. All IPv4 packets are
converted to IPv6 by RPi4, and no IPv4 packets are exchanged with the ISP.
ISP's network is essentially IPv6 single stack.
All devices are wired to a single Ethernet switch.

On another amd64 fast laptop, I do
speedtest -v --selection-details -a  -i 192.168.1.72 -s 28910

The observed speeds are shown below:

linux-image-arm64 with no change:
   Download:   577.23 Mbps (data used: 370.7 MB)                               
     Upload:   386.99 Mbps (data used: 353.0 MB)                               
   Download:   592.79 Mbps (data used: 1.1 GB)                               
     Upload:   380.41 Mbps (data used: 171.0 MB)                               


linux-image-arm64 with CONFIG_PARAVIRT=n
   Download:   485.35 Mbps (data used: 406.0 MB)                               
     Upload:   380.57 Mbps (data used: 171.5 MB)                               
   Download:   514.57 Mbps (data used: 256.8 MB)                               
     Upload:   376.92 Mbps (data used: 169.2 MB)                               

linux-image-rt-arm64 with no change:
   Download:   380.85 Mbps (data used: 422.2 MB)                               
     Upload:   283.87 Mbps (data used: 127.8 MB)                               

linux-image-rt-arm64 with CONFIG_PARAVIRT=n
   Download:   332.95 Mbps (data used: 265.4 MB)                               
     Upload:   310.06 Mbps (data used: 273.7 MB)                               
   Download:   385.97 Mbps (data used: 400.1 MB)                               
     Upload:   295.57 Mbps (data used: 133.2 MB)                               
   Download:   379.69 Mbps (data used: 394.0 MB)                               
     Upload:   293.07 Mbps (data used: 139.4 MB)                               

linux-image-rt-arm64 with CONFIG_PARAVIRT=n & CONFIG_DEBUG_PREEMPT=n
   Download:   425.95 Mbps (data used: 753.7 MB)                               
     Upload:   347.50 Mbps (data used: 382.8 MB)                               
   Download:   423.05 Mbps (data used: 499.4 MB)                               
     Upload:   332.48 Mbps (data used: 149.4 MB)                               

RT kernel specialized for RPi:
https://github.com/emojifreak/debian-rpi-image-script/blob/main/build-debian-raspi-kernel.sh

   Download:   488.33 Mbps (data used: 514.6 MB)                               
     Upload:   416.72 Mbps (data used: 330.8 MB)                               
   Download:   504.79 Mbps (data used: 633.5 MB)                               
     Upload:   404.07 Mbps (data used: 258.5 MB)                               

Best regards, Ryutaroh


Reply to: