sudo cat /sys/kernel/debug/zswap/stored_pages
sudo cat /sys/kernel/debug/zswap/pool_total_size
getconf PAGESIZE
ratio = (stored pages * PAGESIZE) / pool total size
I have 3.6 right now
I was talking about zram and I didn't mean the compression ratio but the compression level used by the algorithm (2 in my example).
Sorry for the confusion.
Unfortunately AFAIK there is no way to query the current settings. You just write zstd(level=2) into some config file and hope for the best …