#zram

70 messages · Page 1 of 1 (latest)

signal mural
#

I remember doing by just following the arch wiki, I am pretty sure the arch wiki should have you covered

knotty ether
#

i mean is it like just entering the commands in the terminal and thats all ?

modprobe zram

echo lz4 > /sys/block/zram0/comp_algorithm

echo 8G > /sys/block/zram0/disksize

mkswap --label zram0 /dev/zram0

swapon --priority 100 /dev/zram0

#

@signal mural

#

eh...can someone help me to set 8gb of zram guys ?

signal mural
#

If you encounter a problem or a question ask

signal mural
#

The section 5.3.1 specifically

knotty ether
signal mural
#

Sure I will try

#

I am outside right now, using my phone

knotty ether
#

so first thing
sudo nano /etc/modules-load.d/zram.conf in terminal and enter this in it right ?
zram

signal mural
#

Yes

knotty ether
#

alr gimme sec

signal mural
#

This will make it so that the zram module get automatically loaded when you turn on your computer

#

It's the equivalent of doing modprobe zram everytime you turn on your computer

knotty ether
#

then this ?
sudo nano /etc/modprobe.d/zram.conf
options zram num_devices=2
should this be 1 or 0 ? cause i just want 1 8gb of zram

signal mural
#

How much ram do you have

#

And how much of it do you want to use as zram

knotty ether
#

i have 4gb of ram...and i wanna set 8gb of zram

signal mural
#

Sorry that doesn't make sense

knotty ether
#

??

signal mural
#

If you have 4gb of ram you can for example use 2gb of it as zram and the other 2gb as normal ram

knotty ether
#

i have a friend of mine did set 8gb of zram for me once...but i reinstalled so..

signal mural
#

You or he misunderstood what's actually going on

#

Free ram on software is a myth

knotty ether
signal mural
#

That's probably swap not zram

knotty ether
knotty ether
signal mural
#

Unless this is black magic, this shouldn't be possible, you can't pull an additional free 4gb from thin air

knotty ether
#

uh well...lets set 2gb then as u said

#

but is it going to be fast as the normal ram ?

signal mural
#

Even zram is a trade off, it use your CPU for compression and decompression

knotty ether
#

uhm and whats the diffrence between zram and zswap

signal mural
#

It's right there in the arch wiki

#

Zswap is already enabled by default

knotty ether
#

which 1 do u recommend me to use in my case

signal mural
#

Zswap (already enabled) just compresses the page of that ram that would otherwise be swapped to disk immediately

knotty ether
#

so ig its better to disable zswap and set zram ? or am i wrong

signal mural
#

They don't conflict, you can keep both

#

It's up to you

knotty ether
#

alright so in this case how much of zram should i set from my 4gb

signal mural
#

But you will lose some performance because of the compression and decompression

knotty ether
#

oh i thought if i set zram ill gain more performance

#

ig nvm then

signal mural
#

No you will gain "more ram"

#

It cost some performance

#

That's why the Linux kernel only use it when it's necessary

knotty ether
#

oh...well thanks for helping...uhm can i ask some more things about arch if u dont mind ? cause im kinda new in it

signal mural
signal mural
#

Or maybe you can start a new thread for every different question you have

knotty ether
knotty ether
signal mural
#

That's a waste, having more people to answer is better, like in #tech-general

signal mural
#

If you are just talking to people and being curious then use #tech-general

#

Btw if you decide to not use zram then undo what you have just done

knotty ether
signal mural
#

Yes or delete the file entirely

knotty ether
signal mural
#

This is basic

#

rm path/to/file

knotty ether
#

rm /etc/modules-load.d/zram.conf

#

right ?

signal mural
#

Yes, remember to use sudo