Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

zRam for Debian Stretch compress ram

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
dirkme
Posts: 43
Joined: 2016-10-16 03:15

zRam for Debian Stretch compress ram

#1 Post by dirkme »

Hi there,

when I google around I find a lot about zram and swap, but I do have a laptop with shared graphic card and only 3 GB Ram.

I would like to have zram compressing my ram for more space.

Update:

I used the Debian Wikki and tested with dmesg and found: [ 0.711681] zswap: loaded using pool lzo/zbud

Does it mean it is working?

dirkme
Posts: 43
Joined: 2016-10-16 03:15

Re: zRam for Debian Stretch compress ram

#2 Post by dirkme »

So, I guess no one at Debian is using zram anymore or would know about it.

Sad, I do believe zram is still justified for older laptops, PCs and mini server.

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: zRam for Debian Stretch compress ram

#3 Post by Dai_trying »

I believe it is incorporated into the kernel, but that's just from a little googling after I got curious. =)

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: zRam for Debian Stretch compress ram

#4 Post by dasein »

dirkme wrote:I would like to have zram compressing my ram for more space.
Unless you are using RAM in lieu of disk for swap, zram will give you less available RAM, not more. And if you're short on RAM, it's not clear why you'd be using it for swap.

https://wiki.archlinux.org/index.php/Im ... m_or_zswap

dirkme
Posts: 43
Joined: 2016-10-16 03:15

Re: zRam for Debian Stretch compress ram

#5 Post by dirkme »

dasein wrote:
dirkme wrote:I would like to have zram compressing my ram for more space.
Unless you are using RAM in lieu of disk for swap, zram will give you less available RAM, not more. And if you're short on RAM, it's not clear why you'd be using it for swap.

https://wiki.archlinux.org/index.php/Im ... m_or_zswap
I didn't want to use it as swap, but can't find anymore how to use it to compress your available RAM :-(

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: zRam for Debian Stretch compress ram

#6 Post by dasein »

dirkme wrote:I didn't want to use it as swap...
Then you don't want zram.

dirkme
Posts: 43
Joined: 2016-10-16 03:15

Re: zRam for Debian Stretch compress ram

#7 Post by dirkme »

dasein wrote:
dirkme wrote:I didn't want to use it as swap...
Then you don't want zram.
I did it with zram before, just can't find out anymore how to, there is no other ram compressor than zram.

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: zRam for Debian Stretch compress ram

#8 Post by dasein »

Allocating a portion of RAM to swap (even "compressed" swap) decreases available RAM. It's simple subtraction

I'm done defending arithmetic.

dirkme
Posts: 43
Joined: 2016-10-16 03:15

Re: zRam for Debian Stretch compress ram

#9 Post by dirkme »

dasein wrote:Allocating a portion of RAM to swap (even "compressed" swap) decreases available RAM. It's simple subtraction

I'm done defending arithmetic.
Well, when Linux puts stuff in the swap space and that woudl be compressed RAM I do believe performance increases ;-)

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: zRam for Debian Stretch compress ram

#10 Post by Dai_trying »

I can't say I have ever (knowingly) used zRam, but I wouldn't have thought it could ever offer performance increase as there must be some overhead for compression. but if your idea is to use zRam as a replacement for swap then surely it would be better to have more ram available and set swap to be used only if critical (system resources have been diminished). And I have to add that I have noticed on my system that swap is already configure quite well and only usually gets used if I am doing some pretty intensive work (or play :D ) but it is usually mostly cleared when resources become available, and if I used zRam I would have less ram available due to zRam using a portion and therefore more need for swap to be used, so zRam actually might decrease performance...

I am not experienced with zRam so my understanding could possibly be flawed, but this is how I imagine the scenario (using zRam) playing out.

Post Reply