forked from ecdye/zram-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ztab
48 lines (45 loc) · 2.18 KB
/
ztab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Use '#' to comment out any line, add new drives with the first column
# providing the drive type and then drive details separated by tab characters.
#
# All algorithms in '/proc/crypto' are supported but only lzo, lzo-rle, lz4, and
# zstd have zramctl text strings; lz4 is the fastest with zstd having much
# better text compression.
#
# mem_limit is the compressed memory limit and will set a hard memory limit for
# the system admin.
#
# disk_size is the virtual uncompressed size approx. 220-450% of memory
# allocated depending on the algorithm and input file. Don't make it much higher
# than the compression algorithm is capable of as it will waste memory because
# there is a ~0.1% memory overhead when empty
#
# swap_priority will set ZRAM over alternative swap devices.
#
# page-cluster 0 means tuning to singular pages rather than the default 3 which
# caches 8 for HDD tuning, which can lower latency.
#
# swappiness 80 because the improved performance of ZRAM allows more usage
# without any adverse affects from the default of 60. It can be raised up to 100
# but that will increase process queue on intense loads such as boot time.
#
# target_dir is the directory you wish to hold in ZRAM, and the original will be
# moved to a bind mount 'bind_dir' and is synchronized on start, stop, and write
# commands.
#
# bind_dir is the directory where the original directory will be mounted for
# sync purposes. Usually in '/opt' or '/var', name optional.
#
# oldlog_dir will enable log-rotation to an off device directory while retaining
# only live logs in ZRAM. Usually in '/opt' or '/var', name optional.
#
# If you need multiple ZRAM swaps or ZRAM directories, just create another entry
# in this file.
# To do this safely, first stop ZRAM using 'systemctl stop zram-config.service',
# then edit this file.
# Once finished, restart ZRAM using 'systemctl restart zram-config.service'.
# swap alg mem_limit disk_size swap_priority page-cluster swappiness
swap lzo-rle 250M 750M 75 0 80
# dir alg mem_limit disk_size target_dir bind_dir
#dir lzo-rle 50M 150M /home/pi /pi.bind
# log alg mem_limit disk_size target_dir bind_dir oldlog_dir
log lzo-rle 50M 150M /var/log /log.bind /opt/zram/oldlog