Skip to content

Memory Tuning in Practice: zram, Swap and OOM Protection

Embedded RAM is soldered and unupgradable. zram compressed swap relieves pressure without changing hardware.

Compressed memory beats bigger memory

  • zram sizing: allocate 25-50% of physical RAM, with zstd for compression ratio or lz4 for speed;
  • swappiness: set 100 so the kernel happily uses zram, but disable or minimize real disk swap;
  • OOM protection: give critical processes negative oom_score_adj so the kernel kills the right victim, and monitor memory alarms.

zram isn’t a cure: if the application leaks, zram only delays the crash — it buys time, it doesn’t solve anything.

Related products: RK3588 Mini PC, NAS-RK3588 storage board. Datasheets, firmware and SDKs are free at the Hugsun Documentation Center; for selection advice or volume pricing, talk to us.

Talk to an engineer

Need selection advice, samples or a volume quote?

Tell us your scenario and target volume — you will get selection advice, lead time and pricing within one business day.

  • Free selection & feasibility review
  • Sample / evaluation board support
  • ODM / OEM customization