3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos
danbst 8d8a7210e4 zramSwap: allow configure compression algorithm + cleanups
- add `zramSwap.algorithm` option, which allows to change compressor
declaratively. zstd as default
- add `zramSwap.swapDevices` option, which allows to define how many zram
devices will be used as swap. Rest devices can be managed freely
- simpler floating calculations
- fix udev race condition
- some documentation changes
- replaced `/sys/block/zram*` handling with `zramctl`, because I had occasional
"Device is busy" error (looks like zram has to be configured in predefined order)
- added `memoryPercent` and `algorithm` as restart triggers. I think, it was
a bug that changing `memoryPercent` in configuration wasn't applied immediately.
- removed a bind to .swap device. While it looks natural (when swap device goes
off, so should zram device), it wasn't implemented properly. This caused problems
with swapon/swapoff:
```
$ cat /proc/swaps
Filename                                Type            Size    Used    Priority
/dev/zram0                              partition       8166024 0       -2
/var/swapfile                           file            5119996 5120    1

$ sudo swapoff -a

$ sudo swapon -a
swapon: /dev/zram0: read swap header failed

$ cat /proc/swaps
Filename                                Type            Size    Used    Priority
/var/swapfile                           file            5119996 0       1
```
2019-01-17 15:58:53 +02:00
..
doc zramSwap: allow configure compression algorithm + cleanups 2019-01-17 15:58:53 +02:00
lib Merge pull request #51661 from eonpatapon/testing-hosts 2019-01-12 20:41:13 +01:00
maintainers google-compute-image: make it a module and the size tuneable (#49854) 2018-11-26 14:51:00 +00:00
modules zramSwap: allow configure compression algorithm + cleanups 2019-01-17 15:58:53 +02:00
tests Merge pull request #53952 from Ma27/improve-gitea-module 2019-01-15 23:55:16 +02:00
COPYING
default.nix nixos: export packages of the current configuration (its pkgs argument) 2018-02-09 19:35:27 +00:00
README
release-combined.nix nixos/release-combined.nix: makes aarch64-linux limited support 2018-12-21 20:43:23 -05:00
release-small.nix Add the boot test to release-small.nix 2018-02-27 20:09:07 +01:00
release.nix nixos/sd-image-aarch64-new-kernel: Added to release 2018-12-26 11:03:32 +00:00

*** NixOS ***

NixOS is a Linux distribution based on the purely functional package
management system Nix.  More information can be found at
http://nixos.org/nixos and in the manual in doc/manual.