-
Notifications
You must be signed in to change notification settings - Fork 3
/
zramdrive.conf
34 lines (29 loc) · 1.8 KB
/
zramdrive.conf
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
# Size for the zram memory used, it defines the mem_limit for the zram device.
# The default is 20M and is basically enough for minimal applications.
# Because aplications can vary in space requirements this may have to be tweaked to suit application .
SIZE=20M
# COMP_ALG this is any compression algorithm listed in /proc/crypto
# lz4 is fastest with lightest load but deflate (zlib) and Zstandard (zstd) give far better compression ratios
# lzo is very close to lz4 and may with some binaries have better optimisation
# COMP_ALG=lz4 for speed or deflate for compression, lzo or zlib if optimisation or availabilty is a problem
COMP_ALG=lz4
# DISK_SIZE is the uncompressed disk size. Note zram uses about 0.1% of the size of the disk when not in use
# DISK_SIZE is expected compression ratio of alg chosen multiplied by SIZE where 300% is an approx good level.
# lzo/lz4=2.1:1 compression ratio zlib=2.7:1 zstandard=2.9:1
# Really a guestimate of a bit bigger than compression ratio whilst minimising 0.1% mem usage of disk size
DISK_SIZE=60M
# mke2fs & mount drive options set for max write perf in volatile ram
# https://manpages.debian.org/jessie/e2fsprogs/mke2fs.8.en.html
# https://manpages.debian.org/stretch/mount/mount.8.en.html
#MKFS_OPTS="-O ^has_journal"
#MNT_OPTS="-o rw,noatime,async,nosuid,noexec,nodev,nobarrier,nodelalloc"
MKFS_OPTS=""
MNT_OPTS="-o defaults,noatime"
# HDD_DIR is the persistant directory that your bind will move the old directory to.
# Can be any name often and /var or /opt are valid locations but can be placed anywhere
HDD_DIR=/opt/moved
# ZRAM_DIR is the directory that will firstly moved to HDD_DIR then mounted as Zram with data copied
# ZRAM_DIR is the live zram drive of the directory you wish to use
ZRAM_DIR=/var/backups
# Zram & mount directories default can be changed if wished
ZDIR=/opt/zram