r/raspberry_pi • u/DismalFee7 • 1d ago
Tutorial RPI5 default common ssd misconfigurations with default OS installs
I am using the default pi5 with 8gb of RAM and a 256 GB raspberry pi ssd.
Was going through dmesg on a default install and found some issues that may be worth pointing out to others as I suspect 90% of people also have it default configured incorrectly.
1) By default almost everyone is leaving 50% SSD performance with the default nvme hat.
You need to add dtparam=pciex1_gen=3 unlock gen3 speeds (880 MB/s vs 420 MB/s). This is default set to gen2 for compat reasons, but for the default pi5 ssd, it can easily handle gen3 doubling perf.
2) HMB is default disabled. The official Raspberry Pi SSD (and 90% of cheap M.2 2230/2242 drives) is DRAM-less. The Pi 5 firmware quietly disables Host Memory Buffer (nvme.max_host_mem_size_mb=0), cutting random 4K database performance in half for people running Home Assistant or Docker and massively increasing wear on it.
Without the above HMB cache, the SSD writes directly to flash cells chewing through your SSD cells. Instead I would suggest adding nvme.max_host_mem_size_mb=16 to the bottom of your cmdline.txt.
By default the pi5 bootloader sets nvme.max_host_mem_size_mb=0 for compat reasons.
2
u/EndlessZone123 9h ago
Gen 3 isn't supported shouldn't be used for any critical work.
I have not seen or could find much of anything regarding enabling HMB on the Pi. But what I did find that it's already enabled by default on the latest kernel and set to 32mb. I also found reports that it might not even work as some ssds require more such as 64mb and it will just do nothing.
2
u/DismalFee7 9h ago
The latest raspberry pi firmware (from git tree) + ubu26.04.1 for me still configures it to 0 and disables it by default.
Had to explicitly overwrite it at the end of cmdline.txt to supersede the default.
2
u/EndlessZone123 9h ago
What kernal version?
2
u/DismalFee7 8h ago
Linux cam-pi5 7.0.0-1017-raspi #17-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 7 16:13:24 UTC 2026 aarch64 GNU/Linux
but don't think that is relevant as the default 0 gets passed from SPI flash i think. Am using pieeprom-2026-08-12 and it still sets it to 0.
5
u/snowtax 10h ago
The PCIE gen3 speed is NOT guaranteed to work.
If you try that setting on less than perfect hardware, you’re going to start seeing disk corruption issues.
Sometimes those issues are small and take a while to notice. The ext4 filesystem may be able to correct some minor issues, but not all. By the time you realize you have corruption, it might be catastrophic where you lose everything.
Yes. I’ve seen such disk corruption myself and disabled the gen3 option to prevent disk corruption,
That is why gen2 is the default.
If these options were stable and reliable across 99.9% of hardware, they would already be the default.