Package Details: zramswap 5-1

Git Clone URL: https://aur.archlinux.org/zramswap.git (read-only, click to copy)
Package Base: zramswap
Description: Sets up zram-based swap devices on boot
Upstream URL: http://en.wikipedia.org/wiki/ZRam
Licenses: GPL
Submitter: Svenstaro
Maintainer: rpodgorny
Last Packager: rpodgorny
Votes: 230
Popularity: 1.55
First Submitted: 2011-10-05 23:35
Last Updated: 2019-12-20 16:58

Required by (0)

Sources (3)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 ... Next › Last »

bluerider commented on 2015-04-05 20:36

# Contributor: ifaigios <ifaigios_at_gmail_dot_com>
# Contributor: Alyssa Hung <deciare@isisiew.org>
# Contributor: Matt Brennan
# Contributor: falconindy
# Contributor: adee
# Contributor: mystilleef
# Contributor: Mark Lee <mark@markelee.com>

pkgname=zramswap
pkgver=2
pkgrel=1
pkgdesc="Sets up zram-based swap devices on boot"
arch=('any')
url="https://github.com/bluerider/zramswap.git"
license=('MIT')
depends=('bash' 'util-linux')
makedepends=('git')
source=("git+$url")
sha256sums=('SKIP')

package() {
install -Dm755 "${srcdir}/${pkgname}/zramswap.sh" "${pkgdir}/usr/lib/systemd/scripts/zramswap.sh"
install -Dm644 "${srcdir}/${pkgname}/zramswap.service" "${pkgdir}/usr/lib/systemd/system/zramswap.service"
}

bluerider commented on 2015-04-05 20:33

I made my own version using zramctl. I think it's significantly more robust this script. You want to use mine instead? It's MIT licensed.

The needed files are at : <https://github.com/bluerider/zramswap/tree/master>

In addition, I have a working PKGBUILD :

# Contributor: ifaigios <ifaigios_at_gmail_dot_com>
# Contributor: Alyssa Hung <deciare@isisiew.org>
# Contributor: Matt Brennan
# Contributor: falconindy
# Contributor: adee
# Contributor: mystilleef
# Contributor: Mark Lee <mark@markelee.com>

pkgname=zramswap
pkgver=2
pkgrel=1
pkgdesc="Sets up zram-based swap devices on boot"
arch=('any')
url="https://github.com/bluerider/zramswap.git"
license=('GPL')
depends=('bash' 'util-linux')
makedepends=('git')
source=("git+$url")
sha256sums=('SKIP')

package() {
install -Dm755 "${srcdir}/${pkgname}/zramswap.sh" "${pkgdir}/usr/lib/systemd/scripts/zramswap.sh"
install -Dm644 "${srcdir}/${pkgname}/zramswap.service" "${pkgdir}/usr/lib/systemd/system/zramswap.service"
}

rpodgorny commented on 2015-03-05 11:38

probably because zramctl was non-existent at the time this package got created...

still, peeking quicky at the current solution, there doesn't seem to be much more than modprobe+mkswap+swapon which is the same as systemd-swap uses for zram.

zramctl is used there only at the "stop" phase (why not in the "start"?):
https://github.com/Nefelim4ag/systemd-swap/blob/master/systemd-swap.sh

...but i might be mistaken - feel free to correct me. patches are welcome and i'll be happy to merge them.

AJSlye commented on 2015-03-01 12:04

I agree with bluerider, zramctl is already in the Community repository as is systemd-swap. Why not just make a pkgbuild script to install, setup and use these two already existing packages.

bluerider commented on 2014-09-29 20:29

Is there a reason why this script doesn't just use zramctl?

Nefelim4ag commented on 2014-08-19 21:17

Change type unit to simple, improve system start time, and not break zramswap script.

[Unit]
Description=Zram-based swap (compressed RAM block devices)

[Service]
ExecStart=/usr/lib/systemd/scripts/zramctrl start
ExecStop=/usr/lib/systemd/scripts/zramctrl stop
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

Nefelim4ag commented on 2014-07-30 17:10

@beta990: only for swapping
You can use it for tmp by aur/zram or by handwork script.

francoism commented on 2014-07-30 15:45

@nariox: Thanks for your information. :)
About this package: can I use it for creating a custom location for storing (tmp) files into the memory? Or is this only for swapping?

nariox commented on 2014-07-30 15:12

@beta990: zram is a kernel module, you don't neet this package to use it. This package (zramswap) includes scripts to automatically enable zram on boot. To enable/use it you should do:
# systemctl enable zramswap
# systemctl start zramswap

francoism commented on 2014-07-30 15:00

Hello,

I'm not exactly know how to use this tool (correctly).

dmesg:
zram: Created 2 device(s) ...
zram0: detected capacity change from 0 to 832368640
zram1: detected capacity change from 0 to 832368640
Adding 812856k swap on /dev/zram0. Priority:100 extents:1 across:812856k SSFS
Adding 812856k swap on /dev/zram1. Priority:100 extents:1 across:812856k SSFS

Can I now mount /dev/zram0? Do I need to format it first?
I'm looking here: https://www.kernel.org/doc/Documentation/blockdev/zram.txt
But I don't know if they are the same.

Thanks! :)