Sync from SUSE:SLFO:Main zram-generator revision 7117497cb21dae5207405cd45bff74c9
This commit is contained in:
parent
a02c5f0082
commit
70e86ec3d9
2
_service
2
_service
@ -3,7 +3,7 @@
|
|||||||
<param name="url">https://github.com/systemd/zram-generator.git</param>
|
<param name="url">https://github.com/systemd/zram-generator.git</param>
|
||||||
<param name="versionformat">@PARENT_TAG@</param>
|
<param name="versionformat">@PARENT_TAG@</param>
|
||||||
<param name="scm">git</param>
|
<param name="scm">git</param>
|
||||||
<param name="revision">v1.1.2</param>
|
<param name="revision">v1.2.1</param>
|
||||||
<param name="versionrewrite-pattern">v(\d+\.\d+\.\d+)</param>
|
<param name="versionrewrite-pattern">v(\d+\.\d+\.\d+)</param>
|
||||||
<param name="versionrewrite-replacement">\1</param>
|
<param name="versionrewrite-replacement">\1</param>
|
||||||
<param name="changesgenerate">enable</param>
|
<param name="changesgenerate">enable</param>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<servicedata>
|
<servicedata>
|
||||||
<service name="tar_scm">
|
<service name="tar_scm">
|
||||||
<param name="url">https://github.com/systemd/zram-generator.git</param>
|
<param name="url">https://github.com/systemd/zram-generator.git</param>
|
||||||
<param name="changesrevision">1bf6b08d8bd15624280482b1c125902f90c706aa</param></service></servicedata>
|
<param name="changesrevision">c2685d18e596c5843b7d9027f6b8379168d753dc</param></service></servicedata>
|
@ -1,5 +0,0 @@
|
|||||||
[source.crates-io]
|
|
||||||
replace-with = "vendored-sources"
|
|
||||||
|
|
||||||
[source.vendored-sources]
|
|
||||||
directory = "vendor"
|
|
BIN
vendor.tar.xz
(Stored with Git LFS)
BIN
vendor.tar.xz
(Stored with Git LFS)
Binary file not shown.
BIN
zram-generator-1.1.2.tar.xz
(Stored with Git LFS)
BIN
zram-generator-1.1.2.tar.xz
(Stored with Git LFS)
Binary file not shown.
BIN
zram-generator-1.2.1.tar.xz
(Stored with Git LFS)
Normal file
BIN
zram-generator-1.2.1.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
addFilter(".*systemd-service-without-service.*")
|
|
@ -1,89 +1,59 @@
|
|||||||
.\" generated with Ronn/v0.7.3
|
.\" generated with Ronn-NG/v0.10.1
|
||||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
||||||
.
|
.TH "ZRAM\-GENERATOR" "8" "November 2024" ""
|
||||||
.TH "ZRAM\-GENERATOR" "8" "November 2021" "zram-generator developers" ""
|
|
||||||
.
|
|
||||||
.SH "NAME"
|
.SH "NAME"
|
||||||
\fBzram\-generator\fR \- Systemd unit generator for zram swap devices
|
\fBzram\-generator\fR \- Systemd unit generator for zram swap devices
|
||||||
.
|
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
\fB/usr/lib/systemd/system\-generators/zram\-generator\fR \fBTARGET_DIR\fR [\fI2RGET_DIR\fR \fI3RGET_DIR\fR]
|
\fB/usr/lib/systemd/system\-generators/zram\-generator\fR \fBTARGET_DIR\fR [\fI2RGET_DIR\fR \fI3RGET_DIR\fR]
|
||||||
.
|
|
||||||
.br
|
.br
|
||||||
\fB/usr/lib/systemd/system\-generators/zram\-generator\fR \-\-setup\-device \fBDEVICE\fR
|
\fB/usr/lib/systemd/system\-generators/zram\-generator\fR \-\-setup\-device \fBDEVICE\fR
|
||||||
.
|
|
||||||
.br
|
.br
|
||||||
\fB/usr/lib/systemd/system\-generators/zram\-generator\fR \-\-reset\-device \fBDEVICE\fR
|
\fB/usr/lib/systemd/system\-generators/zram\-generator\fR \-\-reset\-device \fBDEVICE\fR
|
||||||
.
|
|
||||||
.SH "DESCRIPTION"
|
.SH "DESCRIPTION"
|
||||||
\fBzram\-generator\fR is a generator that creates systemd units to format and use compressed RAM devices, either as swap or a file system\.
|
\fBzram\-generator\fR is a generator that creates systemd units to format and use compressed RAM devices, either as swap or a file system\.
|
||||||
.
|
|
||||||
.P
|
.P
|
||||||
The generator will be invoked by systemd early at boot\. The generator will then:
|
The generator will be invoked by systemd early at boot\. The generator will then:
|
||||||
.
|
|
||||||
.IP "1." 4
|
.IP "1." 4
|
||||||
read configuration files from \fI{/etc,/lib}/systemd/zram\-generator\.conf[\.d]\fR (see zram\-generator\.conf(5) for details);
|
read configuration files from \fI{/etc,/lib}/systemd/zram\-generator\.conf[\.d]\fR (see zram\-generator\.conf(5) for details);
|
||||||
.
|
|
||||||
.IP "2." 4
|
.IP "2." 4
|
||||||
generate systemd\.swap(5) and/or systemd\.mount(5) units into \fBTARGET_DIR\fR and connect them to \fBswap\.target\fR or \fBlocal\-fs\.target\fR as appropriate;
|
generate systemd\.swap(5) and/or systemd\.mount(5) units into \fBTARGET_DIR\fR and connect them to \fBswap\.target\fR or \fBlocal\-fs\.target\fR as appropriate;
|
||||||
.
|
|
||||||
.IP "3." 4
|
.IP "3." 4
|
||||||
ensure the \fBzram\fR module is loaded and create the requested devices\.
|
ensure the \fBzram\fR module is loaded and create the requested devices\.
|
||||||
.
|
|
||||||
.IP "" 0
|
.IP "" 0
|
||||||
.
|
|
||||||
.P
|
.P
|
||||||
The generator does nothing if run inside a container (as determined by \fIsystemd\-detect\-virt(8) \-\-container\fR)\.
|
The generator does nothing if run inside a container (as determined by \fIsystemd\-detect\-virt(8) \-\-container\fR)\.
|
||||||
.
|
|
||||||
.P
|
.P
|
||||||
The generator also understands the kernel command\-line option \fBsystemd\.zram\fR\. See zram\-generator\.conf(5) for details\.
|
The generator also understands the kernel command\-line option \fBsystemd\.zram\fR\. See zram\-generator\.conf(5) for details\.
|
||||||
.
|
|
||||||
.P
|
.P
|
||||||
Setting the \fBZRAM_GENERATOR_ROOT\fR environment variable makes the generator run in test mode, in which case containerisation is ignored and step \fB3\fR is skipped\.
|
Setting the \fBZRAM_GENERATOR_ROOT\fR environment variable makes the generator run in test mode, in which case containerisation is ignored and step \fB3\fR is skipped\.
|
||||||
.
|
|
||||||
.br
|
.br
|
||||||
For the ramifications of \fBZRAM_GENERATOR_ROOT\fR on config handling, see zram\-generator\.conf(5)\.
|
For the ramifications of \fBZRAM_GENERATOR_ROOT\fR on config handling, see zram\-generator\.conf(5)\.
|
||||||
.
|
|
||||||
.P
|
.P
|
||||||
Generated \fIdev\-zramN\.swap\fR units depend on \fBsystemd\-zram\-setup@zramN\.service\fR, which will:
|
Generated \fIdev\-zramN\.swap\fR units depend on \fBsystemd\-zram\-setup@zramN\.service\fR, which will:
|
||||||
.
|
|
||||||
.IP "1." 4
|
.IP "1." 4
|
||||||
read configuration files from \fI{/etc,/lib}/systemd/zram\-generator\.conf[\.d]\fR (see zram\-generator\.conf(5) for details);
|
read configuration files from \fI{/etc,/lib}/systemd/zram\-generator\.conf[\.d]\fR (see zram\-generator\.conf(5) for details);
|
||||||
.
|
|
||||||
.IP "2." 4
|
.IP "2." 4
|
||||||
set the desired compression algorithm, if any; if the current kernel doesn\'t understand the specified algorithm, a warning is issued, but execution continues;
|
set the desired compression algorithm, if any; if the current kernel doesn't understand the specified algorithm, a warning is issued, but execution continues;
|
||||||
.
|
|
||||||
.IP "3." 4
|
.IP "3." 4
|
||||||
set the desired blockdev size and format it as swap with \fIsystemd\-makefs(8)\fR\.
|
set the desired blockdev size and format it as swap with \fIsystemd\-makefs(8)\fR\.
|
||||||
.
|
|
||||||
.IP "" 0
|
.IP "" 0
|
||||||
.
|
|
||||||
.P
|
.P
|
||||||
Generated \fIpath\-to\-mount\-point\.mount\fR units depend on \fBsystemd\-zram\-setup@zramN\.service\fR\. The effect is similar to what happens for swap units, but of course they are formatted with a file system\.
|
Generated \fIpath\-to\-mount\-point\.mount\fR units depend on \fBsystemd\-zram\-setup@zramN\.service\fR\. The effect is similar to what happens for swap units, but of course they are formatted with a file system\.
|
||||||
.
|
|
||||||
.P
|
.P
|
||||||
When the unit is stopped, the zram device is reset, freeing memory and allowing the device to be reused\.
|
When the unit is stopped, the zram device is reset, freeing memory and allowing the device to be reused\.
|
||||||
.
|
|
||||||
.P
|
.P
|
||||||
\fBzram\-generator\fR implements systemd\.generator(7)\.
|
\fBzram\-generator\fR implements systemd\.generator(7)\.
|
||||||
.
|
|
||||||
.SS "Applying config changes"
|
.SS "Applying config changes"
|
||||||
This generator is invoked in early boot, and the devices it configures will be created very early too, so the easiest way to apply config changes is to simply reboot the machine\.
|
This generator is invoked in early boot, and the devices it configures will be created very early too, so the easiest way to apply config changes is to simply reboot the machine\.
|
||||||
.
|
|
||||||
.P
|
.P
|
||||||
Nevertheless, sometimes it may be useful to add new devices or apply config changes at runtime\. Applying new configuration means restarting the units, and that in turn means recreating the zram devices\. This means that \fIfile systems are temporarily unmounted and their contents lost\fR, and \fIpages are moved out of the compressed swap device\fR into other memory\. If this is acceptable, \fBsystemctl restart systemd\-zram\-setup@zramN\fR or \fBsystemctl restart systemd\-zram\-setup@*\fR may be used to recreate a specific device or all configured devices\. (If the device didn\'t exist, \fBrestart\fR will create it\.) If the way the device is used (e\.g\. the mount point or file system type) is changed, \fBsystemctl daemon\-reload\fR needs to be called first to recreate systemd units\. If a device or mount point is removed from configuration, the unit should be stopped before calling \fBdaemon\-reload\fR\. Otherwise, systemd will not know how to stop the unit properly\.
|
Nevertheless, sometimes it may be useful to add new devices or apply config changes at runtime\. Applying new configuration means restarting the units, and that in turn means recreating the zram devices\. This means that \fIfile systems are temporarily unmounted and their contents lost\fR, and \fIpages are moved out of the compressed swap device\fR into other memory\. If this is acceptable, \fBsystemctl restart systemd\-zram\-setup@zramN\fR or \fBsystemctl restart systemd\-zram\-setup@*\fR may be used to recreate a specific device or all configured devices\. (If the device didn't exist, \fBrestart\fR will create it\.) If the way the device is used (e\.g\. the mount point or file system type) is changed, \fBsystemctl daemon\-reload\fR needs to be called first to recreate systemd units\. If a device or mount point is removed from configuration, the unit should be stopped before calling \fBdaemon\-reload\fR\. Otherwise, systemd will not know how to stop the unit properly\.
|
||||||
.
|
|
||||||
.SH "REPORTING BUGS"
|
.SH "REPORTING BUGS"
|
||||||
\fIhttps://github\.com/systemd/zram\-generator/issues\fR
|
\fIhttps://github\.com/systemd/zram\-generator/issues\fR
|
||||||
.
|
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
zram\-generator\.conf(5), systemd\.generator(7), systemd\.swap(5)
|
zram\-generator\.conf(5), systemd\.generator(7), systemd\.swap(5)
|
||||||
.
|
|
||||||
.P
|
.P
|
||||||
\fIhttps://github\.com/systemd/zram\-generator\fR
|
\fIhttps://github\.com/systemd/zram\-generator\fR
|
||||||
.
|
|
||||||
.P
|
.P
|
||||||
Linux documentation of zram: \fIhttps://kernel\.org/doc/html/latest/admin\-guide/blockdev/zram\.html\fR
|
Linux documentation of zram: \fIhttps://kernel\.org/doc/html/latest/admin\-guide/blockdev/zram\.html\fR
|
||||||
.
|
|
||||||
.br
|
.br
|
||||||
and the zram sysfs ABI: \fIhttps://kernel\.org/doc/Documentation/ABI/testing/sysfs\-block\-zram\fR
|
and the zram sysfs ABI: \fIhttps://kernel\.org/doc/Documentation/ABI/testing/sysfs\-block\-zram\fR
|
||||||
|
@ -1,3 +1,20 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Dec 10 16:18:41 UTC 2024 - bbrunner@suse.com
|
||||||
|
|
||||||
|
- Update to version 1.2.1:
|
||||||
|
* Fix panic in option parsing
|
||||||
|
* New option to set mem_limit for devices
|
||||||
|
* Recompression algorithms and their parameters can be configured
|
||||||
|
* External programs can be called and their return value
|
||||||
|
included in calculation of properties of zram devices
|
||||||
|
* Swap units will survive shutdown (unless they have a writeback
|
||||||
|
device configured)
|
||||||
|
* Emit nice warning if writeback-device= is configured but not supported
|
||||||
|
* Small updates to documentation
|
||||||
|
* Small updates to build system and tests
|
||||||
|
- Cleanup spec-file
|
||||||
|
- Updated vendor.tar.xz
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jun 29 07:44:43 UTC 2022 - Benjamin Brunner <bbrunner@suse.com>
|
Wed Jun 29 07:44:43 UTC 2022 - Benjamin Brunner <bbrunner@suse.com>
|
||||||
|
|
||||||
|
@ -1,146 +1,122 @@
|
|||||||
.\" generated with Ronn/v0.7.3
|
.\" generated with Ronn-NG/v0.10.1
|
||||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
||||||
.
|
.TH "ZRAM\-GENERATOR\.CONF" "5" "November 2024" ""
|
||||||
.TH "ZRAM\-GENERATOR\.CONF" "5" "November 2021" "zram-generator developers" ""
|
|
||||||
.
|
|
||||||
.SH "NAME"
|
.SH "NAME"
|
||||||
\fBzram\-generator\.conf\fR \- Systemd unit generator for zram swap devices (configuration)
|
\fBzram\-generator\.conf\fR \- Systemd unit generator for zram swap devices (configuration)
|
||||||
.
|
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
\fB/usr/lib/systemd/zram\-generator\.conf\fR
|
\fB/usr/lib/systemd/zram\-generator\.conf\fR
|
||||||
.
|
|
||||||
.br
|
.br
|
||||||
\fB/usr/local/lib/systemd/zram\-generator\.conf\fR
|
\fB/usr/local/lib/systemd/zram\-generator\.conf\fR
|
||||||
.
|
|
||||||
.br
|
.br
|
||||||
\fB/etc/systemd/zram\-generator\.conf\fR
|
\fB/etc/systemd/zram\-generator\.conf\fR
|
||||||
.
|
|
||||||
.br
|
.br
|
||||||
\fB/run/systemd/zram\-generator\.conf\fR
|
\fB/run/systemd/zram\-generator\.conf\fR
|
||||||
.
|
|
||||||
.P
|
.P
|
||||||
\fB/usr/lib/systemd/zram\-generator\.conf\.d/*\.conf\fR
|
\fB/usr/lib/systemd/zram\-generator\.conf\.d/*\.conf\fR
|
||||||
.
|
|
||||||
.br
|
.br
|
||||||
\fB/usr/local/lib/systemd/zram\-generator\.conf\.d/*\.conf\fR
|
\fB/usr/local/lib/systemd/zram\-generator\.conf\.d/*\.conf\fR
|
||||||
.
|
|
||||||
.br
|
.br
|
||||||
\fB/etc/systemd/zram\-generator\.conf\.d/*\.conf\fR
|
\fB/etc/systemd/zram\-generator\.conf\.d/*\.conf\fR
|
||||||
.
|
|
||||||
.br
|
.br
|
||||||
\fB/run/systemd/zram\-generator\.conf\.d/*\.conf\fR
|
\fB/run/systemd/zram\-generator\.conf\.d/*\.conf\fR
|
||||||
.
|
|
||||||
.SH "DESCRIPTION"
|
.SH "DESCRIPTION"
|
||||||
These files configure devices created by zram\-generator(8)\. See systemd\.syntax(5) for a general description of the syntax\.
|
These files configure devices created by zram\-generator(8)\. See systemd\.syntax(5) for a general description of the syntax\.
|
||||||
.
|
|
||||||
.SH "CONFIGURATION DIRECTORIES AND PRECEDENCE"
|
.SH "CONFIGURATION DIRECTORIES AND PRECEDENCE"
|
||||||
The default configuration doesn\'t specify any devices\. Consult \fI/usr/share/zram\-generator/zram\-generator\.conf\.example\fR for an example configuration file\.
|
The default configuration doesn't specify any devices\. Consult \fI/usr/share/zram\-generator/zram\-generator\.conf\.example\fR for an example configuration file\.
|
||||||
.
|
|
||||||
.P
|
.P
|
||||||
When packages need to customize the configuration, they can install configuration snippets in \fI/usr/lib/systemd/zram\-generator\.conf\.d/\fR\. Files in \fI/etc/\fR are reserved for the local administrator, who may use this logic to override the configuration files installed by vendor packages\. The main configuration file is read before any of the configuration directories, and has the lowest precedence; entries in a file in any configuration directory override entries in the single configuration file\. Files in the \fI*\.conf\.d/\fR configuration subdirectories are sorted by their filename in lexicographic order, regardless of which of the subdirectories they reside in\. When multiple files specify the same option, for options which accept just a single value, the entry in the file with the lexicographically latest name takes precedence\. It is recommended to prefix all filenames in those subdirectories with a two\-digit number and a dash, to simplify the ordering of the files\.
|
When packages need to customize the configuration, they can install configuration snippets in \fI/usr/lib/systemd/zram\-generator\.conf\.d/\fR\. Files in \fI/etc/\fR are reserved for the local administrator, who may use this logic to override the configuration files installed by vendor packages\. The main configuration file is read before any of the configuration directories, and has the lowest precedence; entries in a file in any configuration directory override entries in the single configuration file\. Files in the \fI*\.conf\.d/\fR configuration subdirectories are sorted by their filename in lexicographic order, regardless of which of the subdirectories they reside in\. When multiple files specify the same option, for options which accept just a single value, the entry in the file with the lexicographically latest name takes precedence\. It is recommended to prefix all filenames in those subdirectories with a two\-digit number and a dash, to simplify the ordering of the files\.
|
||||||
.
|
|
||||||
.P
|
.P
|
||||||
To disable a configuration file supplied by the vendor, the recommended way is to place a symlink to \fI/dev/null\fR in the configuration directory in \fI/etc/\fR, with the same filename as the vendor configuration file\.
|
To disable a configuration file supplied by the vendor, the recommended way is to place a symlink to \fI/dev/null\fR in the configuration directory in \fI/etc/\fR, with the same filename as the vendor configuration file\.
|
||||||
.
|
|
||||||
.P
|
.P
|
||||||
The generator understands the following option on the kernel command\-line: \fBsystemd\.zram[=0|1]\fR\. When specified with a true argument (or no argument), the \fBzram0\fR device will be created\. Default options apply, but may be overridden by configuration on disk if present\. When specified with a false argument, no zram devices will be created by the generator\. This option thus has higher priority than the configuration files\.
|
The generator understands the following option on the kernel command\-line: \fBsystemd\.zram[=0|1]\fR\. When specified with a true argument (or no argument), the \fBzram0\fR device will be created\. Default options apply, but may be overridden by configuration on disk if present\. When specified with a false argument, no zram devices will be created by the generator\. This option thus has higher priority than the configuration files\.
|
||||||
.
|
|
||||||
.SH "OPTIONS"
|
.SH "OPTIONS"
|
||||||
Each device is configured independently in its \fB[zramN]\fR section, where N is a nonnegative integer\. Other sections are ignored\.
|
Each device is configured independently in its \fB[zramN]\fR section, where N is a nonnegative integer\. The global section may contain \fIDIRECTIVES\fR\. Other sections are ignored\.
|
||||||
.
|
|
||||||
.P
|
.P
|
||||||
Devices with the final size of \fI0\fR will be discarded\.
|
Devices with the final size of \fI0\fR will be discarded\.
|
||||||
.
|
|
||||||
.IP "\(bu" 4
|
.IP "\(bu" 4
|
||||||
\fBhost\-memory\-limit\fR=
|
\fBhost\-memory\-limit\fR=
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
Sets the upper limit on the total usable RAM (as defined by \fIMemTotal\fR in \fB/proc/meminfo\fR, confer proc(5)) above which the device will \fInot\fR be created\.
|
Sets the upper limit on the total usable RAM (as defined by \fIMemTotal\fR in \fB/proc/meminfo\fR, confer proc(5)) above which the device will \fInot\fR be created\.
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
This takes a nonnegative number, representing that limit in megabytes, or the literal string \fInone\fR, which can be used to override a limit set earlier\.
|
This takes a nonnegative number, representing that limit in megabytes, or the literal string \fInone\fR, which can be used to override a limit set earlier\.
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
Defaults to \fInone\fR\.
|
Defaults to \fInone\fR\.
|
||||||
.
|
|
||||||
.IP "\(bu" 4
|
.IP "\(bu" 4
|
||||||
\fBzram\-size\fR=
|
\fBzram\-size\fR=
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
Sets the size of the zram device as a function of \fIMemTotal\fR, available as the \fBram\fR variable\.
|
Sets the size of the zram device as a function of \fIMemTotal\fR, available as the \fBram\fR variable\. Additional variables may be provided by \fIDIRECTIVES\fR\.
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
Arithmetic operators (^%/*\-+), e, π, SI suffixes, log(), int(), ceil(), floor(), round(), abs(), min(), max(), and trigonometric functions are supported\.
|
Arithmetic operators (^%/*\-+), e, π, SI suffixes, log(), int(), ceil(), floor(), round(), abs(), min(), max(), and trigonometric functions are supported\.
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
Defaults to \fImin(ram / 2, 4096)\fR\.
|
Defaults to \fImin(ram / 2, 4096)\fR\.
|
||||||
.
|
.IP "\(bu" 4
|
||||||
|
\fBzram\-resident\-limit\fR=
|
||||||
|
.IP
|
||||||
|
Sets the maximum resident memory limit of the zram device (or \fI0\fR for no limit) as a function of \fIMemTotal\fR, available as the \fBram\fR variable\.
|
||||||
|
.IP
|
||||||
|
Same format as \fBzram\-size\fR\. Defaults to \fI0\fR\.
|
||||||
.IP "\(bu" 4
|
.IP "\(bu" 4
|
||||||
\fBcompression\-algorithm\fR=
|
\fBcompression\-algorithm\fR=
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
Specifies the algorithm used to compress the zram device\.
|
Specifies the algorithm used to compress the zram device\.
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
This takes a literal string, representing the algorithm to use\.
|
This takes a whitespace\-separated list string, representing the algorithms to use, and parameters in parenteses\.
|
||||||
.
|
|
||||||
.br
|
.br
|
||||||
Consult \fI/sys/block/zram0/comp_algorithm\fR for a list of currently loaded compression algorithms, but note that additional ones may be loaded on demand\.
|
Consult \fI/sys/block/zram0/comp_algorithm\fR (and \fI\|\.\|\.\|\./recomp_algorithm\fR) for a list of currently loaded compression algorithms, but note that additional ones may be loaded on demand\.
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
If unset, none will be configured and the kernel\'s default will be used\.
|
If unset, none will be configured and the kernel's default will be used\.
|
||||||
.
|
.br
|
||||||
|
If more than one is given, and recompression is enabled in the kernel, subsequent ones will be set as the recompression algorithms, with decreasing priority\.
|
||||||
|
.IP
|
||||||
|
If a compression algorithm is suffixed with a parenthesised comma\-separated list of parameters, those are given to \fB\|\.\|\.\|\./algorithm_params\fR (and \fB\|\.\|\.\|\./recompress\fR)\. A parenthesised parameter list \fIwithout\fR a compression algorithm is set as the global recompression parameters\.
|
||||||
|
.IP "\(bu" 4
|
||||||
|
\fBwriteback\-device\fR=
|
||||||
|
.IP
|
||||||
|
Write incompressible pages, for which no gain was achieved, to the specified device under memory pressure\. This corresponds to the \fI/sys/block/zramX/backing_dev\fR parameter\.
|
||||||
|
.IP
|
||||||
|
Takes a path to a block device, like \fI/dev/disk/by\-partuuid/2d54ffa0\-01\fR or \fI/dev/zvol/tarta\-zoot/swap\-writeback\fR\.
|
||||||
|
.IP
|
||||||
|
If unset, none is used, and incompressible pages are kept in RAM\.
|
||||||
.IP "\(bu" 4
|
.IP "\(bu" 4
|
||||||
\fBswap\-priority\fR=
|
\fBswap\-priority\fR=
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
Controls the relative swap priority, a value between \-1 and 32767\. Higher numbers indicate higher priority\.
|
Controls the relative swap priority, a value between \-1 and 32767\. Higher numbers indicate higher priority\.
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
If unset, 100 is used\.
|
If unset, 100 is used\.
|
||||||
.
|
|
||||||
.IP "\(bu" 4
|
.IP "\(bu" 4
|
||||||
\fBmount\-point\fR=
|
\fBmount\-point\fR=
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
Format the device with a file system (not as swap) and mount this file system over the specified directory\. When neither this option nor \fBfs\-type\fR= is specified, the device will be formatted as swap\.
|
Format the device with a file system (not as swap) and mount this file system over the specified directory\. When neither this option nor \fBfs\-type\fR= is specified, the device will be formatted as swap\.
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
Note that the device is temporary: contents will be destroyed automatically after the file system is unmounted (to release the backing memory)\.
|
Note that the device is temporary: contents will be destroyed automatically after the file system is unmounted (to release the backing memory)\.
|
||||||
.
|
|
||||||
.IP "\(bu" 4
|
.IP "\(bu" 4
|
||||||
\fBfs\-type\fR=
|
\fBfs\-type\fR=
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
Specifies how the device shall be formatted\. The default is \fIext2\fR if \fBmount\-point\fR is specified, and \fIswap\fR otherwise\. (Effectively, the device will be formatted as swap, if neither \fBfs\-type\fR= nor \fBmount\-point\fR= are specified\.)
|
Specifies how the device shall be formatted\. The default is \fIext2\fR if \fBmount\-point\fR is specified, and \fIswap\fR otherwise\. (Effectively, the device will be formatted as swap, if neither \fBfs\-type\fR= nor \fBmount\-point\fR= are specified\.)
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
Note that the device is temporary: contents will be destroyed automatically after the file system is unmounted (to release the backing memory)\.
|
Note that the device is temporary: contents will be destroyed automatically after the file system is unmounted (to release the backing memory)\.
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
Also see systemd\-makefs(8)\.
|
Also see systemd\-makefs(8)\.
|
||||||
.
|
|
||||||
.IP "\(bu" 4
|
.IP "\(bu" 4
|
||||||
\fBoptions\fR=
|
\fBoptions\fR=
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
Sets mount or swapon options\. Availability depends on \fBfs\-type\fR\.
|
Sets mount or swapon options\. Availability depends on \fBfs\-type\fR\.
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
Defaults to \fIdiscard\fR\.
|
Defaults to \fIdiscard\fR\.
|
||||||
.
|
|
||||||
.IP "" 0
|
.IP "" 0
|
||||||
.
|
.SH "DIRECTIVES"
|
||||||
|
The global section (before any section header) may contain directives in the following form:
|
||||||
|
.IP "\(bu" 4
|
||||||
|
\fBset!\fR\fIvariable\fR=\fIprogram\fR
|
||||||
|
.IP
|
||||||
|
\fIprogram\fR is executed by the shell as\-if by system(3), its standard output stream parsed as an arithmetic expression (like \fBzram\-size\fR/\fBzram\-resident\-limit\fR), then the result is remembered into \fIvariable\fR, usable in later \fBset!\fRs and \fBzram\-size\fRs/\fBzram\-resident\-limit\fRs\.
|
||||||
|
.IP "" 0
|
||||||
.SH "ENVIRONMENT VARIABLES"
|
.SH "ENVIRONMENT VARIABLES"
|
||||||
Setting \fBZRAM_GENERATOR_ROOT\fR during parsing will cause \fI/proc/meminfo\fR to be read from \fI$ZRAM_GENERATOR_ROOT/proc/meminfo\fR instead, and \fI{/usr/lib,/usr/local/lib,/etc,/run}/systemd/zram\-generator\.conf\fR to be read from \fI$ZRAM_GENERATOR_ROOT/{/usr/lib,/usr/local/lib,/etc,/run}/systemd/zram\-generator\.conf\fR\.
|
Setting \fBZRAM_GENERATOR_ROOT\fR during parsing will cause \fI/proc/meminfo\fR to be read from \fI$ZRAM_GENERATOR_ROOT/proc/meminfo\fR instead, and \fI{/usr/lib,/usr/local/lib,/etc,/run}/systemd/zram\-generator\.conf\fR to be read from \fI$ZRAM_GENERATOR_ROOT/{/usr/lib,/usr/local/lib,/etc,/run}/systemd/zram\-generator\.conf\fR\.
|
||||||
.
|
|
||||||
.SH "EXAMPLES"
|
.SH "EXAMPLES"
|
||||||
The default configuration will yield the following:
|
The default configuration will yield the following:
|
||||||
.
|
|
||||||
.IP "" 4
|
.IP "" 4
|
||||||
.
|
|
||||||
.nf
|
.nf
|
||||||
|
|
||||||
zram device size
|
zram device size
|
||||||
^
|
^
|
||||||
│
|
│
|
||||||
@ -155,21 +131,14 @@ The default configuration will yield the following:
|
|||||||
0───────────────────────> total usable RAM
|
0───────────────────────> total usable RAM
|
||||||
^ ^ ^
|
^ ^ ^
|
||||||
1G 4G 8G
|
1G 4G 8G
|
||||||
.
|
|
||||||
.fi
|
.fi
|
||||||
.
|
|
||||||
.IP "" 0
|
.IP "" 0
|
||||||
.
|
|
||||||
.P
|
.P
|
||||||
A piecewise\-linear size 1:1 for the first 4G, then 1:2 above, up to a max of 32G:
|
A piecewise\-linear size 1:1 for the first 4G, then 1:2 above, up to a max of 32G:
|
||||||
.
|
|
||||||
.br
|
.br
|
||||||
\~\~\fBzram\-size = min(min(ram, 4096) + max(ram \- 4096, 0) / 2, 32 * 1024)\fR
|
\~\~\fBzram\-size = min(min(ram, 4096) + max(ram \- 4096, 0) / 2, 32 * 1024)\fR
|
||||||
.
|
|
||||||
.IP "" 4
|
.IP "" 4
|
||||||
.
|
|
||||||
.nf
|
.nf
|
||||||
|
|
||||||
zram device size
|
zram device size
|
||||||
^
|
^
|
||||||
32G>| oooooooooooooo
|
32G>| oooooooooooooo
|
||||||
@ -190,59 +159,39 @@ A piecewise\-linear size 1:1 for the first 4G, then 1:2 above, up to a max of 32
|
|||||||
0───────────────────────────────────||──────────────────────> total usable RAM
|
0───────────────────────────────────||──────────────────────> total usable RAM
|
||||||
^ ^ ^ ^ ^ ^ ^
|
^ ^ ^ ^ ^ ^ ^
|
||||||
1G 4G 8G 12G 56G 60G 64G
|
1G 4G 8G 12G 56G 60G 64G
|
||||||
.
|
|
||||||
.fi
|
.fi
|
||||||
.
|
|
||||||
.IP "" 0
|
.IP "" 0
|
||||||
.
|
|
||||||
.SH "OBSOLETE OPTIONS"
|
.SH "OBSOLETE OPTIONS"
|
||||||
.
|
|
||||||
.IP "\(bu" 4
|
.IP "\(bu" 4
|
||||||
\fBmemory\-limit\fR=
|
\fBmemory\-limit\fR=
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
Compatibility alias for \fBhost\-memory\-limit\fR\.
|
Compatibility alias for \fBhost\-memory\-limit\fR\.
|
||||||
.
|
|
||||||
.IP "\(bu" 4
|
.IP "\(bu" 4
|
||||||
\fBzram\-fraction\fR=
|
\fBzram\-fraction\fR=
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
Defines the scaling factor of the zram device\'s size with relation to the total usable RAM\.
|
Defines the scaling factor of the zram device's size with relation to the total usable RAM\.
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
This takes a nonnegative floating\-point number representing that factor\.
|
This takes a nonnegative floating\-point number representing that factor\.
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
Defaulted to \fI0\.5\fR\. Setting this or \fBmax\-zram\-size\fR overrides \fBzram\-size\fR\.
|
Defaulted to \fI0\.5\fR\. Setting this or \fBmax\-zram\-size\fR overrides \fBzram\-size\fR\.
|
||||||
.
|
|
||||||
.IP "\(bu" 4
|
.IP "\(bu" 4
|
||||||
\fBmax\-zram\-size\fR=
|
\fBmax\-zram\-size\fR=
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
Sets the limit on the zram device\'s size obtained by \fBzram\-fraction\fR\.
|
Sets the limit on the zram device's size obtained by \fBzram\-fraction\fR\.
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
This takes a nonnegative number, representing that limit in megabytes, or the literal string \fInone\fR, which can be used to override a limit set earlier\.
|
This takes a nonnegative number, representing that limit in megabytes, or the literal string \fInone\fR, which can be used to override a limit set earlier\.
|
||||||
.
|
|
||||||
.IP
|
.IP
|
||||||
Defaulted to \fI4096\fR\. Setting this or \fBzram\-fraction\fR overrides \fBzram\-size\fR\.
|
Defaulted to \fI4096\fR\. Setting this or \fBzram\-fraction\fR overrides \fBzram\-size\fR\.
|
||||||
.
|
|
||||||
.IP "" 0
|
.IP "" 0
|
||||||
.
|
|
||||||
.SH "REPORTING BUGS"
|
.SH "REPORTING BUGS"
|
||||||
\fIhttps://github\.com/systemd/zram\-generator/issues\fR
|
\fIhttps://github\.com/systemd/zram\-generator/issues\fR
|
||||||
.
|
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
zram\-generator(8), systemd\.syntax(5), proc(5)
|
zram\-generator(8), systemd\.syntax(5), proc(5)
|
||||||
.
|
|
||||||
.P
|
.P
|
||||||
\fIhttps://github\.com/systemd/zram\-generator\fR
|
\fIhttps://github\.com/systemd/zram\-generator\fR
|
||||||
.
|
|
||||||
.P
|
.P
|
||||||
Linux documentation of zram: \fIhttps://kernel\.org/doc/html/latest/admin\-guide/blockdev/zram\.html\fR
|
Linux documentation of zram: \fIhttps://kernel\.org/doc/html/latest/admin\-guide/blockdev/zram\.html\fR
|
||||||
.
|
|
||||||
.br
|
.br
|
||||||
and the zram sysfs ABI: \fIhttps://kernel\.org/doc/Documentation/ABI/testing/sysfs\-block\-zram\fR
|
and the zram sysfs ABI: \fIhttps://kernel\.org/doc/Documentation/ABI/testing/sysfs\-block\-zram\fR
|
||||||
.
|
|
||||||
.P
|
.P
|
||||||
\fBfasteval\fR documentation for the entire \fBzram\-size\fR arithmetic DSL: \fIhttps://docs\.rs/fasteval/0\.2\.4/fasteval/#the\-fasteval\-expression\-mini\-language\fR
|
\fBfasteval\fR documentation for the entire \fBzram\-size\fR arithmetic DSL: \fIhttps://docs\.rs/fasteval/0\.2\.4/fasteval/#the\-fasteval\-expression\-mini\-language\fR
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
name: zram-generator
|
name: zram-generator
|
||||||
version: 1.1.2
|
version: 1.2.1
|
||||||
mtime: 1648455525
|
mtime: 1732790765
|
||||||
commit: 1bf6b08d8bd15624280482b1c125902f90c706aa
|
commit: c2685d18e596c5843b7d9027f6b8379168d753dc
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package zram-generator
|
# spec file for package zram-generator
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2024 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -19,7 +19,7 @@
|
|||||||
%global _systemd_util_dir /usr/lib/systemd
|
%global _systemd_util_dir /usr/lib/systemd
|
||||||
|
|
||||||
Name: zram-generator
|
Name: zram-generator
|
||||||
Version: 1.1.2
|
Version: 1.2.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Systemd unit generator for zram swap devices
|
Summary: Systemd unit generator for zram swap devices
|
||||||
License: MIT
|
License: MIT
|
||||||
@ -29,13 +29,12 @@ Group: Development/Libraries/Rust
|
|||||||
URL: https://github.com/systemd/zram-generator
|
URL: https://github.com/systemd/zram-generator
|
||||||
Source0: %{name}-%{version}.tar.xz
|
Source0: %{name}-%{version}.tar.xz
|
||||||
Source1: vendor.tar.xz
|
Source1: vendor.tar.xz
|
||||||
Source2: cargo_config
|
|
||||||
Source3: zram-generator-rpmlintrc
|
|
||||||
|
|
||||||
# pregenerated man-pages to avoid dependency on ronn
|
# pregenerated man-pages to avoid dependency on ronn
|
||||||
Source4: zram-generator.conf.5
|
Source2: zram-generator.conf.5
|
||||||
Source5: zram-generator.8
|
Source3: zram-generator.8
|
||||||
|
|
||||||
|
BuildRequires: cargo
|
||||||
BuildRequires: cargo-packaging
|
BuildRequires: cargo-packaging
|
||||||
BuildRequires: pkgconfig(systemd)
|
BuildRequires: pkgconfig(systemd)
|
||||||
|
|
||||||
@ -48,18 +47,15 @@ To configure and activate swap and zram devices with file-systems, create a con
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -a1 -p1 -n %{name}-%{version}
|
%autosetup -a1 -p1 -n %{name}-%{version}
|
||||||
mkdir .cargo
|
cp %{SOURCE2} man/
|
||||||
cp %{SOURCE2} .cargo/config
|
cp %{SOURCE3} man/
|
||||||
cp %{SOURCE4} man/
|
|
||||||
cp %{SOURCE5} man/
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export SYSTEMD_UTIL_DIR=%{_systemd_util_dir}
|
export SYSTEMD_UTIL_DIR=%{_systemd_util_dir}
|
||||||
export LC_ALL=C.UTF-8
|
export LC_ALL=C.UTF-8
|
||||||
%{cargo_build}
|
%{cargo_build}
|
||||||
|
|
||||||
%make_build SYSTEMD_SYSTEM_UNIT_DIR=%{_unitdir} SYSTEMD_SYSTEM_GENERATOR_DIR=%{_systemdgeneratordir} \
|
%make_build SYSTEMD_SYSTEM_UNIT_DIR=%{_unitdir} SYSTEMD_SYSTEM_GENERATOR_DIR=%{_systemdgeneratordir} systemd-service
|
||||||
systemd-service
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install SYSTEMD_SYSTEM_UNIT_DIR=%{_unitdir} SYSTEMD_SYSTEM_GENERATOR_DIR=%{_systemdgeneratordir} NOBUILD=1
|
%make_install SYSTEMD_SYSTEM_UNIT_DIR=%{_unitdir} SYSTEMD_SYSTEM_GENERATOR_DIR=%{_systemdgeneratordir} NOBUILD=1
|
||||||
|
Loading…
Reference in New Issue
Block a user