1zswap-cli(1)                General Commands Manual               zswap-cli(1)
2
3
4

NAME

6       zswap-cli - command-line tool to control ZSwap Linux kernel module
7

SYNOPSIS

9       zswap-cli [OPTION...]
10

DESCRIPTION

12       zswap-cli is a command-line tool to control ZSwap Linux kernel module.
13

COMMAND-LINE OPTIONS

15   --help
16       Print help message and exit.
17
18   --version
19       Print version information and exit.
20
21   --config
22       Get options from the configuration file instead of the cmdline.
23
24   --env
25       Get options from the environment variables instead of the cmdline.
26
27   --stats
28       Get statistics and current settings of ZSwap kernel module.
29
30       Supported values:
31
32       • 0  (default)  - print both ZSwap kernel module settings and debug in‐
33         formation;
34
35       • 1 - print ZSwap kernel module settings;
36
37       • 2 - print ZSwap kernel module usage summary;
38
39       • 3 - print ZSwap kernel module debug information.
40
41   -e, --enabled
42       Enable or disable ZSwap kernel module.
43
44   -s, --same_filled_pages_enabled
45       Enable or disable memory pages deduplication.
46
47   -p, --max_pool_percent
48       The maximum percentage of memory that the compressed pool can occupy.
49
50   -c, --compressor
51       The default compression algorithm.
52
53   -z, --zpool
54       The kernel’s zpool type.
55
56   -a, --accept_threshold_percent
57       The threshold at which ZSwap would start accepting pages again after it
58       became full.
59

ENVIRONMENT OPTIONS

61       zswap-cli support of getting options from environment variables.
62
63   Supported options
64ZSWAP_ENABLED_VALUE - enable (Y) or disable (N) ZSwap kernel module.
65
66ZSWAP_SAME_FILLED_PAGES_ENABLED_VALUE  -  enable  (Y)  or disable (N)
67         memory pages deduplication.
68
69ZSWAP_MAX_POOL_PERCENT_VALUE - the maximum percentage of memory  that
70         the compressed pool can occupy (integer from 1 to 100).
71
72ZSWAP_COMPRESSOR_VALUE - the default compression algorithm.
73
74ZSWAP_ZPOOL_VALUE - the kernel’s zpool type.
75
76ZSWAP_ACCEPT_THRESHOLD_PERCENT_VALUE  -  the threshold at which ZSwap
77         would start accepting pages again after it became full (integer  from
78         1 to 100).
79
80   Forwarding options
81       Export environment options using export command:
82
83              export ZSWAP_ENABLED_VALUE=Y
84              export ZSWAP_SAME_FILLED_PAGES_ENABLED_VALUE=Y
85              export ZSWAP_MAX_POOL_PERCENT_VALUE=60
86              export ZSWAP_COMPRESSOR_VALUE=zstd
87              export ZSWAP_ZPOOL_VALUE=z3fold
88              export ZSWAP_ACCEPT_THRESHOLD_PERCENT_VALUE=40
89
90       Start application with --env command-line argument:
91
92              sudo zswap-cli --env
93

CONFIGURATION FILES

95       zswap-cli support of getting options from the configuration files.
96
97   Supported options
98       • enabled - enable (Y) or disable (N) ZSwap kernel module.
99
100       • same_filled_pages_enabled  -  enable  (Y) or disable (N) memory pages
101         deduplication.
102
103       • max_pool_percent - the maximum percentage of  memory  that  the  com‐
104         pressed pool can occupy (integer from 1 to 100).
105
106       • compressor - the default compression algorithm.
107
108       • zpool - the kernel’s zpool type.
109
110       • accept_threshold_percent  -  the threshold at which ZSwap would start
111         accepting pages again after it became full (integer from 1 to 100).
112
113   Forwarding options
114       Start application with --config command-line argument:
115
116              sudo zswap-cli --config /path/to/zswap-cli.conf
117

EXIT STATUS

119       0: Successful exit.
120
121       1: Insuffient access rights.
122

SYSTEMD UNIT

124       After installation, the systemd-unit zswap-cli.service will be added.
125
126   Changing settings
127       All settings are stored in the /etc/zswap-cli/zswap-cli.conf configura‐
128       tion file.  It uses standard key-value systax.
129
130   Enabling unit
131       Enable systemd-unit and run it on system startup:
132
133              sudo systemctl enable --now zswap-cli.service
134
135   Disabling unit
136       Disable systemd-unit and stop runing it on system startup:
137
138              sudo systemctl disable zswap-cli.service
139
140   Running unit
141       You can also run systemd-unit without adding it to startup.
142
143       Start unit and enable ZSwap:
144
145              sudo systemctl start zswap-cli.service
146
147       Stop unit and disable ZSwap:
148
149              sudo systemctl stop zswap-cli.service
150

AUTHORS

152       Copyright (c) 2020-2022 EasyCoding Team and contributors.
153
154
155
156                                                                  zswap-cli(1)
Impressum