Zram, how to enable? (in Manjaro/Arch-Porteus)

Arch based Porteus community project
Post Reply
ElectriQT
Samurai
Samurai
Posts: 116
Joined: 10 Nov 2013, 12:02
Distribution: LXDE3.5Manjaro, LXDE3.01-32bit
Location: Sweden

Zram, how to enable? (in Manjaro/Arch-Porteus)

Post#1 by ElectriQT » 25 Jan 2017, 12:03

Hi, long time since I was here, and the main reason for that:
The Porteus 3.5 Nemesis works so nice for me! With the frequent updates and all. :- )

(I have seen some small bugs since I started, had to change upower / pm-util,
needed to remove a symlink libcadec to be able to update,
but I did figure how to solve this problems by my self)

I am glad to see that the Arch-Manjaro-Porteus project still going on / restarted,
In my opinion this is the best one so far, almost bug free
I really like LXDE, and the automatic security updates in Manjaro-linux, and so on,
however.. there is some memory leak, probably in the html5 player or in Firefox.
Sometimes I have no HDD, but now it is installed on a very small HDD
I don't use any swap-partition, so then suddenly it can freeze the
system ..really hard.., Sometimes even the sysRq "R E I S U B" will not work,
A hard power off seems to be the only way if it really freezes everything before I can "killall firefox" :- /

Q. What is the correct method to enable Z-ram in this version?

I am almost new to Linux, so I am not 100% sure about how to do this,
I found some scripts here:
https://github.com/vaeth/zram-init

.
Last edited by ElectriQT on 26 Jan 2017, 12:12, edited 2 times in total.

User avatar
Blaze
DEV Team
DEV Team
Posts: 1555
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus 3.2 Cinnamon x86_64
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Re: Zram,how to enable?

Post#2 by Blaze » 25 Jan 2017, 16:39

Try zram=25% in /mnt/sdb1/boot/syslinux/porteus.cfg

For example

LABEL GRAPHICAL section
....
APPEND initrd=initrd.xz changes=/porteus zram=25%

Cheers
Linux porteus 4.13.3-porteus #1 SMP PREEMPT Sat Sep 23 18:22:13 x86_64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Tobago PRO [Radeon R7 360 / R9 360 OEM] (rev 81) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

ElectriQT
Samurai
Samurai
Posts: 116
Joined: 10 Nov 2013, 12:02
Distribution: LXDE3.5Manjaro, LXDE3.01-32bit
Location: Sweden

Re: Zram,how to enable? (in Manjaro/Arch-Porteus)

Post#3 by ElectriQT » 26 Jan 2017, 00:46

Blaze wrote: boot/syslinux/porteus.cfg
APPEND initrd=initrd.xz changes=/porteus zram=25%
-Nope,that did not work :- (

top (Htop) tells me: "Swp 0k/0k"

Maybe I need to shut of any running normal Harddrive-swap first?
[Edit: No, no difference. I tried swapon / swapoff -a ]



EDIT, I have the LXDE-version of Manjaro/Arch based PorteusNemesis3.5,
(I had no issues with Zram in the Slackwarebased Porteus)
All the latest updates from Manjaro installed with pacman update manager.)
EDIT, I Removed some redundant text. Moved a part of it to a second question about the Firewall.

User avatar
normalGuy
Black ninja
Black ninja
Posts: 50
Joined: 06 Nov 2015, 23:36
Distribution: porteus 3.2 xfce archBang
Location: uk & portugal

Re: Zram, how to enable? (in Manjaro/Arch-Porteus)

Post#4 by normalGuy » 26 Jan 2017, 21:13

Maybe cheatcode:
noswap

... Prevents the automatic use of an existing swap partition.
By default, Porteus searches your attached drives for
partitions that are formatted as swap, and will mount them
for use within Porteus. The 'noswap' cheatcode disables
this behaviour.
Works with me with arch in HD and porteus Usb.

ElectriQT
Samurai
Samurai
Posts: 116
Joined: 10 Nov 2013, 12:02
Distribution: LXDE3.5Manjaro, LXDE3.01-32bit
Location: Sweden

Zram, how to enable? (in Manjaro/Arch-Porteus)

Post#5 by ElectriQT » 02 Sep 2017, 23:59

http://www.techrapid.co.uk/2017/04/crea ... linux.html

works, (without sudo, I did it as root)

"zRam is a virtual memory compression using block devices named /dev/zram using a fast compression algorithm that compress the least recently used (LRU) or inactive space in the memory allows the GNU/Linux kernel to free up more memory with less performance hit.

zRam is greatly increasing the available amount of memory without swap disks/partition. It is recommended for user to use zRam instead of not use swap or swap on slow disks.
Create a zRam block devices
Load the zRam modules to the kernel using modprobe:

sudo modprobe zram

Set the zRam extremely fast compression algorithm using lz4:

sudo sh -c "echo 'lz4' > /sys/block/zram0/comp_algorithm"

Set 2 Gigabyte available zRam disk space for swap:

sudo sh -c "echo '2G' > /sys/block/zram0/disksize"

Create a swap on zRam block devices:

sudo mkswap --label zram0 /dev/zram0

Enable the zRam block devices for swapping with high priority:

sudo swapon --priority 100 /dev/zram0 "

User avatar
francois
Contributor
Contributor
Posts: 5136
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus artix
Location: C'est l'hiver: la neige soudainement est là à Montréal.

Zram, how to enable? (in Manjaro/Arch-Porteus)

Post#6 by francois » 07 Sep 2017, 16:03

So still using nemesis. :D Did you update to the most recent base modules updates by ncmprhnsbl, or are your running on your january installation? Are you using brokenman lxde modules or did you built your own on top of xorg from scratch.
Carpe diem.

Post Reply