Raspberry Pi 4B 4GB - virtual adresses from 48-bit to 64-bit?

Hello,

I run DietPi (v8.5.1) on an RPi 4 Model B (aarch64) with docker and docker-compose.

Now, I want to run a redpanda image (vectorized/redpanda:v22.1.3-arm64) using docker-compose.
The image gets built and the container starts just to get crashed immediately after with the exit code 133.

After some discussions in the redpanda slack I was informed that there might be an issue with the 48-bit virtual address space that is used by the Linux Kernel and that redpanda expects 64-bit.

My questions would be:

  • Is that conclusion correct with the 48-bit?
  • Is it possible to configure the Kernel to 64-bit? Is that even recommended?
  • Does anyone else have experiences with running redpanda container on an RPi4?

Please let me know if you need more information from my system.
I’m really stuck here, since this Kernel stuff is way over my head. I really would like to run redpanda on my RPi4.

Thanks!
stk

  • DietPi version | cat /boot/dietpi/.version
    G_DIETPI_VERSION_CORE=8
    G_DIETPI_VERSION_SUB=5
    G_DIETPI_VERSION_RC=1
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’

  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN
    bullseye 0

  • Kernel version | uname -a
    Linux DietPi 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux

  • SBC model | echo $G_HW_MODEL_NAME
    RPi 4 Model B (aarch64)

Welcome to the community.

Just to avoid any confusion. We don’t do any kernel development nor is DietPi an onw OS. On raspberry pi we use Raspberry OS. Means the kernel is the original Raspberry OS kernel. And the kernel is fully 64bit.

Thanks for the quick response!

So I would have to install a Linux distro that is not even based on Raspberry Pi OS? Is that even possible/recommended?
Just because I’m curious, is there a Linux command that I could use to confirm the 48-bit virtual addresses on my RPi4?

Something for dark nights to read on

It seems to be a general limitation of Linux and the architecture, independant of the distro: How a 64-bit process virtual address space is divided in Linux? - Unix & Linux Stack Exchange

But redpanda generally works on Linux, did you try the DEB installer provided on their website? https://redpanda.com/

Installation is working

root@DietPi4:~# curl -1sLf 'https://packages.vectorized.io/nzc4ZYQK3WRGd9sy/redpanda/cfg/setup/bash.deb.sh' | sudo -E bash
Executing the  setup script for the 'redpanda/redpanda' repository ...

   OK: Checking for required executable 'curl' ...
   OK: Checking for required executable 'apt-get' ...
   OK: Detecting your OS distribution and release using system methods ...
 ^^^^: ... Detected/provided for your OS/distribution, version and architecture:
 >>>>:
 >>>>: ... distro=debian  version=11  codename=bullseye  arch=aarch64
 >>>>:
 NOPE: Checking for apt dependency 'apt-transport-https' ...
   OK: Updating apt repository metadata cache ...
   OK: Attempting to install 'apt-transport-https' ...
   OK: Checking for apt dependency 'ca-certificates' ...
   OK: Checking for apt dependency 'gnupg' ...
   OK: Checking for apt signed-by key support ...
   OK: Importing 'redpanda/redpanda' repository GPG key ...
   OK: Checking if upstream install config is OK ...
   OK: Installing 'redpanda/redpanda' repository via apt ...
   OK: Updating apt repository metadata cache ...
   OK: The repository has been installed successfully - You're ready to rock!
root@DietPi4:~# apt install redpanda
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  redpanda
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 33.3 MB of archives.
After this operation, 154 MB of additional disk space will be used.
Get:1 https://packages.vectorized.io/nzc4ZYQK3WRGd9sy/redpanda/deb/debian bullseye/main arm64 redpanda arm64 22.1.3-1 [33.3 MB]
Fetched 33.3 MB in 18s (1879 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package redpanda.
(Reading database ... 41090 files and directories currently installed.)
Preparing to unpack .../redpanda_22.1.3-1_arm64.deb ...
Unpacking redpanda (22.1.3-1) ...
Setting up redpanda (22.1.3-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/redpanda-status.service → /lib/systemd/system/redpanda-status.service.
Created symlink /etc/systemd/system/timers.target.wants/redpanda-status.timer → /lib/systemd/system/redpanda-status.timer.
Created symlink /etc/systemd/system/multi-user.target.wants/redpanda-tuner.service → /lib/systemd/system/redpanda-tuner.service.
Created symlink /etc/systemd/system/multi-user.target.wants/redpanda.service → /lib/systemd/system/redpanda.service.
Created symlink /etc/systemd/system/multi-user.target.wants/wasm_engine.service → /lib/systemd/system/wasm_engine.service.
sysctl: cannot stat /proc/sys/kernel/sched_tunable_scaling: No such file or directory
sysctl: cannot stat /proc/sys/kernel/sched_min_granularity_ns: No such file or directory
sysctl: cannot stat /proc/sys/kernel/sched_wakeup_granularity_ns: No such file or directory
sysctl: cannot stat /proc/sys/kernel/sched_latency_ns: No such file or directory
kernel.sched_autogroup_enabled = 0
sysctl: cannot stat /proc/sys/kernel/numa_balancing: No such file or directory
fs.aio-max-nr = 1048576

Redpanda is set to run in development mode. To get the most out of the
fastest queue in the west, enable production mode by running the following:

    sudo rpk mode production

followed by:

    sudo rpk tune all
    sudo systemctl start redpanda

This will autotune your system to give you the best performance from Redpanda.
You can get more information on the tunning parameters here:
https://docs.redpanda.com/docs/introduction/autotune/

But service is failing to start

Jun 16 22:11:19 DietPi4 rpk[3167]: Detecting the current cloud vendor and VM
Jun 16 22:11:19 DietPi4 rpk[3167]: Could not detect the current cloud vendor
Jun 16 22:11:20 DietPi4 rpk[3167]: System check 'NIC eth0 IRQ affinity set' failed with non-fatal error 'err=signal: segmentation fault, stderr='
Jun 16 22:11:20 DietPi4 rpk[3167]: System check 'Transparent huge pages active' failed with non-fatal error 'open /sys/kernel/mm/transparent_hugepage/enabled: no such file or directory'
Jun 16 22:11:20 DietPi4 rpk[3167]: System check 'Free memory per CPU [MB]' failed with non-fatal error 'unable to determine cgroup memory limit'
Jun 16 22:11:21 DietPi4 rpk[3167]: System check 'Dir '/var/lib/redpanda/data' IRQs affinity set' failed with non-fatal error 'open /proc/irq/0/smp_affinity: no such file or directory'
Jun 16 22:11:21 DietPi4 rpk[3167]: System check 'Ballast file present' failed. Required: true, Current false

Thanks Joulinar for testing! It‘s kind of the same with docker, the image is built and the container starts successfully, but then crashes immediately. Some of the error messages are when the same like:
'Dir '/var/lib/redpanda/data' IRQs affinity set' failed with non-fatal error 'open /proc/irq/0/smp_affinity: no such file or directory'

On RPi the SMP affinities indeed cannot be changed, not sure whether this is a kernel or firmware limitation.

The memory cgroup can be enabled via cmdline.txt, find automatically on our Docker installation.

Thanks for the clarification chief!