Need guidance on configuring Zram and sysctl.conf correctly.
Need guidance on configuring Zram and sysctl.conf correctly.
i encountered a problem with the RAM on my system. My desktop and laptop tend to drain quickly, especially during gaming or editing when usage hits 70-100%. On average, it pulls up to a full state, but rarely uses Zram unless I check the settings. After reviewing the Zram configuration, I suspect the values might be incorrect. This is the setup I have: screen grab, comparison, same algorithm and priority config (-1000 p) for both laptop and desktop. For the laptop, RAM is 11GB out of 16GB, and for the desktop, it's 40GB of 64GB. The -1000 p setting should be adjusted to -75 instead of -1000, and I think the sysctl.conf values need tweaking. Other parameters like swappiness, page cluster, zone reclaim mode, etc., are set to default or higher than ideal. Any advice on fine-tuning would be appreciated.
The swappiness threshold is around 100, not 200. Adjusting it to 100 would improve swapping. How much swapping occurs? Does your system have a disk swap device available?
Simplify your zram configuration with zram-generator and ensure zswap is turned off. Refer to the Arch Wiki for setup details. Using default swap settings typically works well, as many options are redundant. The vm.swappiness value should be around 200, which is the most aggressive setting possible on kernel 5.8 or newer.
your system runs kernel version 6.8.0-31-generic with ubuntu 24.04lts
The output shows system details and memory usage information. It lists disk sizes, compression settings, and available buffers. It also indicates free and shared cache space along with current memory allocation.
Your issue is clear. The zram configuration isn't being treated as swap space. If there had been available swap, the total would have shown it. This suggests your script might not be running correctly or isn't being triggered.