You are not logged in.
Pages: 1
I installed zramswap in AUR and then activate with
# systemctl enable zramswap
I restart and not works:
● zramswap.service - Zram-based swap (compressed RAM block devices)
Loaded: loaded (/usr/lib/systemd/system/zramswap.service; disabled)
Active: failed (Result: exit-code) since lun 2014-04-21 23:10:39 CLST; 1min 4s ago
Process: 7078 ExecStart=/usr/lib/systemd/scripts/zramctrl start (code=exited, status=2)
Main PID: 7078 (code=exited, status=2)
abr 21 23:10:39 tarro systemd[1]: Starting Zram-based swap (compressed RAM block devices)...
abr 21 23:10:39 tarro zramctrl[7078]: Setting up swapspace version 1, size = 195804 KiB
abr 21 23:10:39 tarro zramctrl[7078]: LABEL=zram0, UUID=c7b28bdd-39d9-402d-b782-98deafda976b
abr 21 23:10:39 tarro systemd[1]: zramswap.service: main process exited, code=exited, status=2/INVALIDARGUMENT
abr 21 23:10:39 tarro systemd[1]: Failed to start Zram-based swap (compressed RAM block devices).
abr 21 23:10:39 tarro systemd[1]: Unit zramswap.service entered failed state.
abr 21 23:10:39 tarro zramctrl[7078]: awk: línea ord.:21: (FILENAME=/proc/meminfo FNR=43) fatal: no se puede redirigir a `/sys/block/zram1/disksize' (No existe el fichero o el directorio)Somebody help me?
Last edited by dunkles (2014-04-23 02:31:35)
Offline
Offline
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE=C
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"but the message is the same, half english and half spanish
● zramswap.service - Zram-based swap (compressed RAM block devices)
Loaded: loaded (/usr/lib/systemd/system/zramswap.service; disabled)
Active: failed (Result: exit-code) since Tue 2014-04-22 09:47:29 CLST; 10s ago
Process: 16797 ExecStart=/usr/lib/systemd/scripts/zramctrl start (code=exited, status=2)
Main PID: 16797 (code=exited, status=2)
Apr 22 09:47:29 tarro zramctrl[16797]: awk: línea ord.:22: (FILENAME=/proc/meminfo FNR=43) aviso: falló la limpieza del fichero de `/sys/block/zram0/disksize' (Dispositivo o recurso ocupado).
Apr 22 09:47:29 tarro zramctrl[16797]: mkswap: /dev/zram0: warning: wiping old swap signature.
Apr 22 09:47:29 tarro zramctrl[16797]: Setting up swapspace version 1, size = 195804 KiB
Apr 22 09:47:29 tarro zramctrl[16797]: LABEL=zram0, UUID=acd4a3a8-c309-4525-b402-379c2f556b5b
Apr 22 09:47:29 tarro zramctrl[16797]: awk: línea ord.:21: (FILENAME=/proc/meminfo FNR=43) fatal: no se puede redirigir a `/sys/block/zram1/disksize' (No existe el fichero o el directorio)
Apr 22 09:47:29 tarro systemd[1]: zramswap.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 22 09:47:29 tarro systemd[1]: Failed to start Zram-based swap (compressed RAM block devices).
Apr 22 09:47:29 tarro systemd[1]: Unit zramswap.service entered failed state.Last edited by dunkles (2014-04-22 20:56:31)
Offline
I don't think that zramswap is needed, zswap is supported by kernel - To enabled zswap, the "enabled" attribute must be set to 1 at boot time. e.g. zswap.enabled=1
Last edited by Perfect Gentleman (2014-04-22 13:04:47)
Offline
I don't think that zramswap is needed, zswap is supported by kernel - To enabled zswap, the "enabled" attribute must be set to 1 at boot time. e.g. zswap.enabled=1
zswap is not the same as zram
Offline
zswap is not the same as zram
yep, but if you have a swap device, it'll be the same
Offline
dunkles, use code tags when posting snippets. You have been here long enough to know the forum etiquette.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
dunkles, use code tags when posting snippets. You have been here long enough to know the forum etiquette.
sorry i forget it
Offline
I'll state the obvious: a.) zram is a module anf b.) it needs to be loaded *early* in the boot process.
Add it to the MODULES section in /etc/mkinitcpio.conf, regenerate the initramfs files and try again. Don't forget to enable zram in the boot parameters line of your boot loader (that would be GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub if you use grub and use grub-mkconfig or editing /boot/grub/grub.cfg and adding the correct parameters if you are maintaining your configuration files by hand.)
Last edited by vorbote (2014-04-22 23:06:02)
I break things and put them back together for fun and sometimes profit, because it is the only way to learn.
Offline
I'll state the obvious: a.) zram is a module anf b.) it needs to be loaded *early* in the boot process.
Add it to the MODULES section in /etc/mkinitcpio.conf, regenerate the initramfs files and try again. Don't forget to enable zram in the boot parameters line of your boot loader (that would be GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub if you use grub and use grub-mkconfig or editing /boot/grub/grub.cfg and adding the correct parameters if you are maintaining your configuration files by hand.)
not work
i solved with this page : http://geekland.hol.es/optimizar-el-ren … -con-zram/
thanks anyway ![]()
[root@tarro ~]# swapon -s
Filename Type Size Used Priority
/dev/zram0 partition 102396 0 50
/dev/zram1 partition 102396 0 50
/dev/zram2 partition 102396 0 50
/dev/zram3 partition 102396 0 50Last edited by dunkles (2014-04-23 02:31:11)
Offline
according to documetaion and if i understood it properly, zswap creates zram devices and real swap device is need for it, zram can work without real swap device.
Offline
i solved with this page : http://geekland.hol.es/optimizar-el-ren … -con-zram/
thanks anyway
Good! But that blog entry doesn't conflict what I said. I'll bet that zramswap-enabler is a script that loads up the zram module and defines the swap disks. Frankly, I don't see a real advantage using zram unless you have 16GB RAM or more and some sort of battery backed memory, as you would find in a "real" server. Us mortals are better off with zwap. (Aquí habla la voz de la experiencia, saludos de tres paises arriba. ;-P).
I break things and put them back together for fun and sometimes profit, because it is the only way to learn.
Offline
Perfect Gentleman wrote:dunkles wrote:zswap is not the same as zram
yep, but if you have a swap device, it'll be the same
Can you explain why?
The major difference is that all RAM assigned to zram is lost for application and kernel use. It is permanently assigned as swapping space. On the other hand zswap is an overlay that compresses memory pages moved to swap. Insofar as the compressed swapped pages fit in RAM, they will not be sent to disk. Once they are sent to disk you'll get the same performance hit as if you were not using zwap. Depending on how much physical swap you have available zswap is more convenient than zram, based in my experience the sweet spot is 12 to 16 GB RAM.
Last edited by vorbote (2014-04-23 11:46:09)
I break things and put them back together for fun and sometimes profit, because it is the only way to learn.
Offline
The major difference is that all RAM assigned to zram is lost for application and kernel use. It is permanently assigned as swapping space.
i think, you are wrong. I got 16GB RAM and 12GB ZRAM. And RAM is not lost.
Offline
dunkles, if you are intersted, i can post here systemd service and script for activationg ZRAM that i wrote yesterday.
Offline
dunkles wrote:i solved with this page : http://geekland.hol.es/optimizar-el-ren … -con-zram/
thanks anyway
Good! But that blog entry doesn't conflict what I said. I'll bet that zramswap-enabler is a script that loads up the zram module and defines the swap disks. Frankly, I don't see a real advantage using zram unless you have 16GB RAM or more and some sort of battery backed memory, as you would find in a "real" server. Us mortals are better off with zwap. (Aquí habla la voz de la experiencia, saludos de tres paises arriba. ;-P).
I have only 4 GB of ram
(pero me a funcionado bastante bien zram
)
Offline
dunkles, if you are intersted, i can post here systemd service and script for activationg ZRAM that i wrote yesterday.
that would be great ![]()
Offline
The major difference is that all RAM assigned to zram is lost for application and kernel use. It is permanently assigned as swapping space.
i think, you are wrong. I got 16GB RAM and 12GB ZRAM. And RAM is not lost.
http://ipic.su/img/img7/fs/ZRAM.1398257488.png
It could be. There was a major rewrite last year and I haven't used it since before then. But your report tells me nothing. Out of curiosity, what do free and top say? Top will give you a good idea of how RAM usage is allocated and "free -tk" should report similar quantities.
I break things and put them back together for fun and sometimes profit, because it is the only way to learn.
Offline
It is still not clear to me. If I use zswap by zswap.enabled=1 zswap.compressor=lz4 as kernel boot parameters, and I only have 8GB RAM, then the use of zram is obsolete because my entire RAM is assigned to be swapping space?
Last edited by orschiro (2014-04-24 04:59:47)
Offline
zram (executable)
#!/bin/bash
start() {
for i in {0..7}; do /usr/bin/echo 1610612736 > /sys/block/zram${i}/disksize; /usr/bin/mkswap /dev/zram${i}; /usr/bin/swapon -p100 /dev/zram${i}; done
}
stop() {
for i in {0..7}; do /usr/bin/swapoff /dev/zram${i}; /usr/bin/echo 1 > /sys/block/zram${i}/reset; done
}
case $1 in
start|stop) "$1" ;;
esaczram.service
[Unit]
Description=Zram-based swap (compressed RAM block devices)
[Service]
Type=oneshot
ExecStart=/etc/systemd/system/zram start
ExecStop=/etc/systemd/system/zram stop
RemainAfterExit=yes
[Install]
WantedBy=multi-user.targetsome explanation: 16 GiB, 4 cores, 8 threads, 1.5 GiB ZRAM for each thread
Offline
-
Last edited by Perfect Gentleman (2014-04-24 07:50:52)
Offline
Thanks you ![]()
Offline
you're welcome
Offline
Pages: 1