foundObjects / zram-swap

A simple zram swap service for modern systemd Linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Passing options to compression algorithms

mortezae opened this issue · comments

Is it possible to use e.g. 3 cores for zstd? I tried "zstd -12 -T3" but it considered as invalid argument.
And what is the default compression level?
Thanks a lot

I don't believe the zram module allows you to configure compression level, it just picks the default level for each algorithm.

re: threads, by default the zram module will use as many threads as you have available processors, you don't need to specify a number of threads unless you want to restrict how many you're using. In an effort to keep configuration simple I never added a num. threads configuration item, I never ran into a situation where I needed it.

You're probably best off not restricting the number of threads zram is using anyway as any program waiting on a page from compressed memory is going to block until that request is fulfilled so you want decompression to be as available as possible, ie: you want it to have a thread on every core so requests can be handled as quickly as possible.