ZRAM Proxmox on newer Mini PC's with DDR 5 memory

Anyone running ZRAM on Proxmox 8 hypervisor on a modern Mini PC with 96 GB RAM?

Given an AMD or Intel Mini PC with Crucial 96 GB DDR 5 Laptop Memory kit, i am wondering what would would be the sweet spot of ZRAM Swap amount and which compression option to use lzo, lzo-rle, lz4, lz4hc, or zstd.

  1. Running without ZRAM baseline
  2. What is the most amount of ZRAM swap we can add to a 96 GB DDR 5 mini pc with decent performance?
  3. What is the most amount of ZRAM swap we can add to a 96 GB DDR 5 mini pc with a stable system benchmark

Found some old online articles that claim a ZRAM swap of up to 8 GB can actually improve performance with the claim that the processor can decompress and compress the memory in real time. @wendell mentions this in a few YouTube Videos, but not entirely sure how to do a benchmark for this.

@wendell had a great youtube on the Bee-Link GTR7 Pro ( The GTR 7 is Amazing! But mine brokeā€¦) 11 months ago. I purchased one and upgraded to the 96 GB RAM crucial kit and also added 2 2TB 990 Samsung SSDs. I had a few bugs that were ultimately fixed in BIOS updates, in Proxmox 8.1 and also adding /etc/modprobe.d/zfs.conf. So now the system is very stable and performs well. Running Alpine Linux VMā€™s with docker that are all relatively lightweight on memory pressure. This system replaced and outperforms a Z440 HP Workstation with a Xeon 2690 CPU and Samsung 970 Pro NVME drives. This HP Workstation has 128 GB ECC DDR4 memory.

Be very cool if the GTR7 Pro could have a 32 GB ZRAM swap and see if it compares to a Xeon 2600 v4 generation server with 128 GB DDR4 memory.

1 Like

ZRAM isnā€™t magical free performance ā€“ itā€™s faster than swapping to an NVMe, SSD or spinning rust, but itā€™s still memory activity managing the workload in place of crunching through your workload.

For me, questions 2 & 3 are the same, I donā€™t see any compromise to stability from having ZRAM swap. If your workload is sensitive or jittery because of swapping, itā€™s not batched up well and is reaching outside of a working set to other resources. Optimal batching would have all the necessary data and instructions ā€˜hotā€™ in RAM.

32GB of 96GB is 1/3, thatā€™s a reasonable amount for ZRAM. Find a compute task thatā€™s occasionally bottlenecked on file access, then share your results to see if thereā€™s an impact for 16GB, 24GB, 32GB and 48GB of ZRAM. (My config file says ā€œspeed: lz4 > zstd > lzoā€ and ā€œcompression: zstd > lzo > lz4ā€ so I tend to run zstd, if you want to compare lz4 and zstd, let us know if the lower speed but better compression is worth it in your testing.)

K3n.

1 Like

How much ram are you actually using? Chances are you wonā€™t see any practical benefit to zram - you need memory pressure, have lots of compressible, inactive memory to make it worth it.

Iā€™ve got zswap on my hypervisor, and VMs are using 50% of the RAM. In the below stats, you can see Iā€™m saving ā€¦ 20 KiB of memory. Zooming!

ZSWAP KERNEL MODULE USAGE SUMMARY:
Pool: 0.03 MiB (0.0% of MemTotal).
Stored: 0.05 MiB (10.2% of SwapUsed).
Compression ratio: 1.86.

1 Like