mirror of
https://github.com/foundObjects/zram-swap.git
synced 2026-08-13 12:33:17 +02:00
rewrite config
improved documentation, moved most common config options up front
This commit is contained in:
parent
3b958f366f
commit
8db82aac4d
1 changed files with 22 additions and 15 deletions
|
|
@ -1,22 +1,29 @@
|
|||
# override fractional calculations and specify a fixed swap size
|
||||
# don't shoot yourself in the foot with this, or do 🤷
|
||||
#_zram_fixedsize="2G"
|
||||
|
||||
# portion of real ram to use as zram swap (expression: "1/2", "0.5", etc)
|
||||
_zram_fraction="1/2"
|
||||
|
||||
# compression algorithm to employ (lzo, lz4, zstd, lzo-rle)
|
||||
# default: lz4
|
||||
_zram_algorithm="lz4"
|
||||
|
||||
# expected compression ratio; this is a rough estimate
|
||||
#_comp_factor="2.5"
|
||||
# portion of system ram to use as zram swap (expression: "1/2", "2/3", "0.5", etc)
|
||||
# default: "1/2"
|
||||
_zram_fraction="1/2"
|
||||
|
||||
# Note:
|
||||
# set _comp_factor by hand if you use an algorithm other than lzo/lz4/zstd or if your
|
||||
# use case produces drastically different compression results than my estimates
|
||||
# expected compression factor; set this by hand if your compression results are
|
||||
# drastically different from the estimates below
|
||||
#
|
||||
# Note: These are the defaults coded into /usr/local/sbin/zram-swap.sh; don't alter
|
||||
# these values, use the override variable '_comp_factor' below.
|
||||
#
|
||||
# defaults if otherwise unset:
|
||||
# lzo*|zstd) _comp_factor="3" ;;
|
||||
# lz4) _comp_factor="2.5" ;;
|
||||
# *) _comp_factor="2" ;;
|
||||
# lzo*|zstd) _comp_factor="3" ;; # expect 3:1 compression from lzo*, zstd
|
||||
# lz4) _comp_factor="2.5" ;; # expect 2.5:1 compression from lz4
|
||||
# *) _comp_factor="2" ;; # default to 2:1 for everything else
|
||||
#
|
||||
#_comp_factor="2.5"
|
||||
|
||||
# if set skip device size calculation and create a fixed-size swap device
|
||||
# (size, in MiB/GiB, eg: "250M" "500M" "1.5G" "2G" "6G" etc.)
|
||||
#
|
||||
# Note: this is the swap device size before compression, real memory use will
|
||||
# depend on compression results, a 2-3x reduction is typical
|
||||
#
|
||||
#_zram_fixedsize="2G"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue