# zram-generator

#### 介绍
This is a systemd unit generator that enables swap on zram.
(With zram, there is no physical swap device. Part of the available RAM
is used to store compressed pages, essentially trading CPU cycles for memory.)
To activate, install zram-generator-defaults subpackage.


#### 安装教程

Install zram-generator rpm package:

yum install zram-generator

To install directly from sources, execute make build && sudo make install NOBUILD=true:

-zram-generator binary is installed in the systemd system generator directory (usually /usr/lib/systemd/system-generators/)
-zram-generator(8) and zram-generator.conf(5) manpages are installed into /usr/share/man/manN/, this requires ronn.
-units/systemd-zram-setup@.service is copied into the systemd system unit directory (usually /usr/lib/systemd/system/)
-zram-generator.conf.example is copied into /usr/share/doc/zram-generator/ You need though create your own config file at one of the locations listed above.

#### 使用说明

A default config file may be located in /usr. This generator checks the following locations:

-/run/systemd/zram-generator.conf
-/etc/systemd/zram-generator.conf
-/usr/local/lib/systemd/zram-generator.conf
-/usr/lib/systemd/zram-generator.conf
… and the first file found in that list wins.

In addition, "drop-ins" will be loaded from .conf files in /etc/systemd/zram-generator.conf.d/, /usr/lib/systemd/zram-generator.conf.d/, etc.

The main configuration file is read before any of the drop-ins and has the lowest precedence; entries in the drop-in files override entries in the main configuration file.

See systemd.unit(5) for a detailed description of this logic.

See zram-generator.conf.example for a list of available settings.

#### 参与贡献

master分支使用最新的上游版本，如果检测到上游有最新版本发布，先形成issue后再提交对应PR更新，流程如下。
1.  提交issue
2.  Fork 本仓库
3.  新建 Feat_xxx 分支
4.  提交代码
5.  新建 Pull Request


#### 特技

1.  使用 Readme\_XXX.md 来支持不同的语言，例如 Readme\_en.md, Readme\_zh.md
2.  Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
3.  你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
4.  [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目，是综合评定出的优秀开源项目
5.  Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6.  Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
