mirror of
git://slackware.nl/current.git
synced 2024-12-31 10:28:29 +01:00
27 lines
915 B
Text
27 lines
915 B
Text
|
# Should we use swap on ZRAM?
|
||
|
ZRAM_ENABLE=1
|
||
|
|
||
|
# Total system RAM, in KB:
|
||
|
MEMTOTAL=$(echo $(cat /proc/meminfo | grep ^MemTotal:) | cut -f 2 -d ' ')
|
||
|
|
||
|
# ZRAM device size. We'll make this the same size as the system RAM.
|
||
|
# Assuming 1:4 compression, this would (if filled) occupy 1/4 of the system
|
||
|
# RAM. Until pages are swapped to ZRAM, the device occupies almost no RAM.
|
||
|
# As far as what's optimal here, I've heard all kinds of theories. So maybe
|
||
|
# you want to set this to twice the system RAM. Or half. Or something else
|
||
|
# entirely.
|
||
|
ZRAMSIZE=$MEMTOTAL
|
||
|
|
||
|
# Number of ZRAM devices. We are only going to use one of them, so there's no
|
||
|
# need to increase this unless you'll be needing additional ZRAM devices for
|
||
|
# other purposes.
|
||
|
ZRAMNUMBER=1
|
||
|
|
||
|
# Set the compression algorithm.
|
||
|
# Use zstd for best results.
|
||
|
# Nothing else makes any sense.
|
||
|
ZRAMCOMPRESSION=zstd
|
||
|
|
||
|
# Set the swap priority for the ZRAM device:
|
||
|
ZRAMPRIORITY=100
|