Proxmox on SD card

I found a relatively easy way around this to reduce writes and increase performance overall using https://github.com/ecdye/zram-config package, which combines the functionality from zram-tools' zramswap service as well as log2ram's service, making configuration much simpler overall.

Unfortunately there is no pre-packaged deb, and the source package uses lzip which isn't by default included in proxmox, but the main downside is that the install process requires compiling, which adds many more packages to an otherwise lean system, just to build the overlayfs tools.

Code:
The following NEW packages will be installed:
  build-essential cpp cpp-12 dpkg-dev fakeroot g++ g++-12 gcc gcc-12 libabsl20220623 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libaom3 libasan8 libatomic1 libavif15 libc-dev-bin libc-devtools libc6-dev libcc1-0 libcrypt-dev libdav1d6 libde265-0 libdeflate0 libfakeroot libgav1-1
  libgcc-12-dev libgd3 libgomp1 libheif1 libisl23 libitm1 libjbig0 liblerc4 liblsan0 libmpc3 libmpfr6 libnsl-dev libquadmath0 librav1e0 libstdc++-12-dev libsvtav1enc1 libtiff6 libtirpc-dev libtsan2 libubsan1 libwebp7 libx265-199 libxpm4 libyuv0 linux-libc-dev make manpages-dev meson ninja-build patch rpcsvc-proto

The install itself is relatively straightforward, with all the customization within /etc/ztab which is by default setup for a raspberry pi:
Code:
apt -y install lzip
wget https://github.com/ecdye/zram-config/releases/download/v1.7.0/zram-config-v1.7.0.tar.lz
tar xvf zram*
cd zram-config-v1.7.0
bash install.bash
sed -i "s|^swap.*|swap    lzo-rle         0M              1T              32767           0               100|g" /etc/ztab
sed -i "s|^log.*|log     zstd            16G             32G             /var/log        /log.bind       /opt/zram/oldlog|g" /etc/ztab
echo "dir     zstd            50M             150M            /var/lib/pve-cluster    /pve-cluster.bind" >> /etc/ztab

Afterwards, with this config, writes are substantially minimized:
Code:
2025-02-21 14:27:21 root@c13:~# cat /etc/ztab |grepconf
swap    lzo-rle         0M              128G            32767           0               100
log     zstd            16G             32G             /var/log        /log.bind       /opt/zram/oldlog
dir     zstd            50M             150M            /var/lib/pve-cluster    /pve-cluster.bind
2025-02-21 14:27:28 root@c13:~# zramctl
NAME       ALGORITHM DISKSIZE   DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram0 lzo-rle         1T     4K   88B   12K      48 [SWAP]
/dev/zram1 zstd           32G 638.8M 97.3M  102M      48 /opt/zram/zram1
/dev/zram2 zstd          150M  15.8M  3.5M  4.1M      48 /opt/zram/zram2
2025-02-21 14:38:22 root@c13:~#
 
Last edited:
The RRD graphs are still written to the disk.

A sudden reboot or power loss can and will criple your PVE system if changes have been applied. How do you take care of this situtation?
 
  • Like
Reactions: Johannes S
I found a relatively easy way around this to reduce writes and increase performance overall using https://github.com/ecdye/zram-config package, which combines the functionality from zram-tools' zramswap service as well as log2ram's service, making configuration much simpler overall.
don't do that on a cluster, or you could have /etc/pve totally broken in case of powerloss.
 
  • Like
Reactions: Johannes S
Would Proxmox VE 5 work reliably on an SD card considering write endurance and performance limitations?

Might frequent writes shorten its lifespan, or would enabling ZRAM or logging tweaks help?
 
Would Proxmox VE 5 work reliably on an SD card considering write endurance and performance limitations?
No, just use a "real" disk.

Might frequent writes shorten its lifespan, or would enabling ZRAM or logging tweaks help?
If you don't care about your data, you can use the aforementioned zram-config, yet I would not use it.
 
  • Like
Reactions: Johannes S
Would Proxmox VE 5 work reliably on an SD card considering write endurance and performance limitations?

Propably not but why would you use version 5 which doesn't get any updates for years? Current version is 8.3

You can use a HDD for the Proxmox VE operating system, since the operating system itself doesn't need the IOPS of a ssd.
A SSD is needed for good performance with vms and lxcs though.
 
Last edited:
It is rather a controversial question.
For me : do not do that. Data and disk integrity will be involved in mid term. In order to avoid this, you will have to tune the installation and the swap and it
will lead to a custom system to maintain.
As an intermediate solution you can look at SATA DOM modules, and look at those with high write endurance.
 
  • Like
Reactions: Johannes S