https://browser.geekbench.com/v6/cpu/4184440 2.4Ghz
https://browser.geekbench.com/v6/cpu/4185322 2.8Ghz
Only HEVC/H265 8/10bit decoding supported (HDMI is HDR10 capable)
USB/SATA - VIA VL716 FW:85.43.1.8 UASP (raw read/write 578/212 MB/s)
SD Card Verbatim 64GB A1 V30 U3 (raw read/write 85/54 MB/s)
Debian 12 install
Check /etc/hosts and insert IP address for hostname!
sudo /bin/bash curl https://global.mirrors.apqa.cn/proxmox/debian/pveport.gpg -o /etc/apt/trusted.gpg.d/pveport.gpg echo "deb https://global.mirrors.apqa.cn/proxmox/debian/pve bookworm port">/etc/apt/sources.list.d/pveport.list apt update && apt full-upgrade apt install ifupdown2 apt install proxmox-ve postfix open-iscsi
Use RaspberryPI 4k pagesize kernel
add this line to /boot/config.txt
kernel=kernel8.img
Enable cgroups in /boot/cmdline.txt add kernel parameters
cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1
Edit network (add bridge and eth0 static config)
Add DNS servers → system → DNS
Finish - you may reboot node!
AES-128-CBC 2.23 GB/s @ 2.8Ghz
ChaCha20-Poly1305 821 MB/s @ 2.8Ghz
Show power stats
vcgencmd pmic_read_adc
Show temperature
vcgencmd measure_temp vcgencmd get_throttled
Show frequency
lscpu
arm_freq=2800 over_voltage_delta=2000 temp_limit=80
F2FS unsuported on 16k
kernel=kernel8.img
sudo apt install stress-ng stress-ng --cpu 4 --cpu-method fft
221 Mbits/sec
Spectre V1 & V2 and
Variant 4 Speculative Store Bypass
CVE-2018-3640 CVE-2018-3639
You may disable mitigations in /boot/cmdline.txt
mitigations=off
2x USB2.0 connected to VL805 (wire savings - USB3 wires not connected)
2x USB3.1 Gen 1 5Gbit - VL805 connected via PCIe 2.0 1x (5Gbit)
1x Gigabit Ethernet connected via PCIe 1.0 1x (2Gbit)
VideoCore VI running on ThreadX
Power approx 3-8Watts
iperf3 949Mbit/s
912 Mbit/s = 114 MB/s read and write
ASM1352R FW:B5_20_60 UASP and vl805_fw_0137ab.bin (raw read/write 358/159 MB/s)
ChaCha20-Poly1305 is fastest so it can be preferred (approx. 323 MB/s 2GHz)
AES-128-CBC max. 113 MB/s
ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305
# For more options and information see # http://rpf.io/configtxt # Some settings may impact device functionality. See link above for details arm_freq=1200 arm_freq_min=266 disable_splash=1 gpu_freq=100 gpu_freq_min=100 v3d_freq=100 gpu_mem=64 over_voltage=-1 temp_limit=80 arm_64bit=1
Add some fan!
arm_freq=1750 over_voltage=2 -- or -- arm_freq=2000 over_voltage=5
Insert empty file named “ssh” in /boot dir
Insert file named “userconf” in /boot dir with user:encryptedpass
echo 'mypassword' | openssl passwd -6 -stdin
Recommended SD card with MLC (Samsung Pro, SanDisk High Endurance, etc)
defaults,noatime,nodiratime,commit=1800
/etc/fstab (move most active locations to RAM)
tmpfs /tmp tmpfs defaults,noatime,nosuid,size=100m 0 0 tmpfs /var/tmp tmpfs defaults,noatime,nosuid,size=100m 0 0 tmpfs /var/log tmpfs defaults,noatime,nosuid,mode=0755,size=100m 0 0 tmpfs /var/cache/minidlna tmpfs defaults,noatime,nosuid,size=128m 0 0 tmpfs /var/spool/mqueue tmpfs defaults,noatime,nosuid,mode=0700,gid=12,size=30m 0 0 tmpfs /var/lib/logrotate tmpfs defaults,noatime,nosuid,mode=0755,size=10m 0 0 tmpfs /var/lib/rrdcached tmpfs defaults,noatime,nosuid,mode=0755,size=10m 0 0 tmpfs /var/lib/samba tmpfs defaults,noatime,nosuid,mode=0755,size=10m 0 0 tmpfs /var/lib/nginx tmpfs defaults,noatime,nosuid,mode=0755,size=100m 0 0 tmpfs /var/lib/php/sessions tmpfs defaults,noatime,nosuid,mode=1733,size=10m 0 0 tmpfs /var/lib/systemd/timers tmpfs defaults,noatime,nosuid,mode=0755,size=1m 0 0 tmpfs /var/lib/systemd/timesync tmpfs defaults,noatime,nosuid,mode=0755,uid=100,gid=102,size=1m 0 0
create file /usr/lib/tmpfiles.d/ramdisk.conf
d /var/log/samba 0755 - - - d /var/lib/rrdcached 0755 - - - d /var/log/pveproxy 0755 33 33 - d /var/log/exim4 0755 110 117 - d /var/lib/samba/private 0755 - - - d /var/lib/samba/usershares 1700 - - - d /var/log/nginx 0755 - - - d /var/log/mysql 0755 112 119 -
sudo apt-get remove fake-hwclock sudo rm /etc/cron.hourly/fake-hwclock sudo update-rc.d -f fake-hwclock remove sudo rm /etc/init.d/fake-hwclock sudo rm /etc/fake-hwclock.dat
sudo ionice -c 3 fstrim -v /
If installed disable smartd
sudo systemctl disable smartmontools
Info about SD card
/sys/bus/mmc/devices/mmc0:0002
vcgencmd measure_temp vcgencmd measure_temp | awk '{ print substr($1,6,length($1)-9) }'
vcgencmd get_mem gpu
vcgencmd measure_clock xxx
xxx = arm, core, h264, isp, v3d, uart, pwm, emmc, pixel, vec, hdmi, dpi
vcgencmd measure_volts xxx
xxx = core, sdram_c, sdram_i, sdram_p
vcgencmd bootloader_version
vcgencmd get_config int
timedatectl status
More on SAMBA article for CentOS / RedHat
ffmpeg -c:v h264_v4l2m2m -i input.mkv -pix_fmt yuv420p -s 1920x1080 -c:v h264_v4l2m2m -g 120 -b:v 20M output.mkv
h264 accelerated decode and encode sample
##turn on/off wifi
dtoverlay=disable-wifi
/usr/bin/tvservice -o
Status
/usr/bin/tvservice -s
fs.inotify.max_user_watches=524288
Best stable settings are
Prevent external USB from 20s sleep by adding this into /boot/cmdline.txt
usbcore.autosuspend=3600
sudo hdparm -S 241 /dev/sda
Download compiled deb package
https://janforman.org/files/Linux/hd-idle_1.05_armhf.deb
OR
sudo apt-get install build-essential fakeroot debhelper -y wget https://janforman.org/files/Linux/hd-idle-1.05.tgz tar -xvf hd-idle-1.05.tgz cd hd-idle dpkg-buildpackage -rfakeroot -uc -us sudo dpkg -i ../hd-idle_*.deb
sudo nano /etc/default/hd-idle
HD_IDLE_OPTS="-i 0 -a sda -i 3600 -a sdb -i 3600"
Insert device ids into /boot/firmware/cmdline.txt
usb-storage.quirks=152d:8561:u
Run this in background
while [ 1 ] do hdparm -C /dev/sda >/dev/null sleep 120 done
sudo apt install mc samba minidlna ffmpeg hostapd bridge-utils smartmontools
sudo nano /etc/hostapd/hostapd.conf
interface=wlan0 driver=nl80211 ssid=janforman.com hw_mode=a channel=40 wmm_enabled=0 macaddr_acl=0 auth_algs=1 ignore_broadcast_ssid=0 wpa=2 wpa_passphrase=AardvarkBadgerHedgehog wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP
sudo mount -t fs_type -o rw,lazytime,noatime,nodiratime,commit=600 device /path/to/dest/fs
sudo systemctl disable dphys-swapfile.service
mkfs.ext4 -b 4096 -i 131072 -I 128 /dev/sda1 tune2fs -i0 -c -1 /dev/sda1 tune2fs -o journal_data_writeback /dev/sda1 tune2fs -m 0 /dev/sda1
sudo apt-get update; sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel
show
rpi-eeprom-config
edit
sudo -E rpi-eeprom-config --edit
POWER_OFF_ON_HALT=1
DISABLE_HDMI=1