: Enable ZRAM on the VM-Series Firewall
Focus

Enable ZRAM on the VM-Series Firewall

Table of Contents

Enable ZRAM on the VM-Series Firewall

If your VM-Series firewall experiences low or out-of memory conditions, you can enable ZRAM to improve memory usage. ZRAM, also called compcache (compressed cache), is a Linux kernel module for creating a compressed block device in RAM. When enabled, ZRAM is used as a swap disk and allows for faster I/O of swap because it resides in the RAM.
Complete the following steps to enable ZRAM.
  1. Log in to the VM-Series CLI.
  2. Find the total memory on the VM by using the following CLI command.
    grep pattern "MiB Mem :" mp-log mp-monitor.log
    admin@Lab41-39-PA-VM> grep pattern "MiB Mem :" mp-log mp-monitor.log
    MiB Mem :  16030.6 total,    346.3 free,   4712.8 used,  10971.5 buff/cache
    MiB Mem :  16030.6 total,    354.3 free,   4704.8 used,  10971.6 buff/cache
    MiB Mem :  16030.6 total,    347.8 free,   4711.0 used,  10971.8 buff/cache
    MiB Mem :  16030.6 total,    290.0 free,   4768.8 used,  10971.8 buff/cache
    MiB Mem :  16030.6 total,    353.9 free,   4704.6 used,  10972.1 buff/cache
    MiB Mem :  16030.6 total,    347.2 free,   4711.1 used,  10972.3 buff/cache
    MiB Mem :  16030.6 total,    353.8 free,   4704.4 used,  10972.4 buff/cache
    MiB Mem :  16030.6 total,    346.9 free,   4710.9 used,  10972.8 buff/cache
    MiB Mem :  16030.6 total,    353.1 free,   4704.5 used,  10973.0 buff/cache
    MiB Mem :  16030.6 total,    346.8 free,   4710.7 used,  10973.2 buff/cache
  3. Enable ZRAM using the following two CLI commands.
    debug software kernelcfg zram-swap enable
    debug software kernelcfg zram-swap modify host-mem-threshold <total-memory-in-MB>
  4. Reboot the VM-Series firewall.
  5. Verify that ZRAM is enabled.
    debug software kernelcfg zram-swap show run-time
    debug software kernelcfg zram-swap show run-time ZRAM MODULE: LOADED ZRAM SWAP: ON ZRAM DEVICE NUM: 1 ZRAM MEM_LIMIT(MB): 1350 ZRAM DISK_SIZE(MB): 4000 ZRAM ORI_DATA_SIZE(B): 22163456 ZRAM COMP_DATA_SIZE(B): 1957437 ZRAM MEM_USED_TOTAL(B): 2465792
    You can verify ZRAM status in the pan_kernelcfg.log.
    INFO: Zram swap is turned on now INFO: Done with ZRAM mem_limit configuration