Page 1 of 1

Is it possible to enable ZRam? (SOLVED)

Posted: Tue Mar 28, 2023 8:29 am
by Jasper

Hi all

I am using kernel 6.1.14 and was wondering if it is possible to enable ZRam to be used instead of a Swap File?

From a little digging I saw a solution but it uses systemd which is not available in FP64-95.

I have seen this option only recently when testing @jrb Jammypup.


Re: Is it possible to enable ZRam?

Posted: Tue Mar 28, 2023 9:01 am
by ozsouth

@Jasper - I'm guessing it's my 6.1.14 kernel you're using. If so, zram basic is enabled as a module - but may need to be builtin. Also, several compression options, including the popular zstd isn't enabled - would need recompiling to include that & any others wanted.


Re: Is it possible to enable ZRam?

Posted: Tue Mar 28, 2023 9:18 am
by Jasper

@ozsouth hope all is well.

Yes, I am using your kernel and I poking around I did see that it was listed which prompted me to ask my question.

Also, "Yes, please" if and only when you have time to compile a new kernel :thumbup:


Re: Is it possible to enable ZRam?

Posted: Tue Mar 28, 2023 9:26 am
by pp4mnklinux

It could be not related with your question, if this happens and an admin want to delete it or move to another part of the forum, do it and excuseme.

Just to know:

Both zram and swap file can provide additional virtual memory to Puppy Linux, but the better option for you may depend on your specific needs and hardware configuration so this is the first you need to know.

Zram compresses and stores data in RAM, allowing for faster read and write operations.

It can be a good option if you have limited RAM and need to optimize your system's performance.

However, if you have sufficient RAM, zram may not provide significant performance gains and s much better use the physical ram, not this "virtual one".

On the other hand, a swap file is a dedicated space on your hard drive that is reserved for virtual memory.

The same as zram, It can be useful if you have limited RAM and need to extend your system's memory capacity.

However, a swap file may have slower read and write operations compared to zram, and it can be affected by the speed of your hard drive (I'm using a 10000 rpm disk).

Ultimately, the best option for you may depend on your specific use necessities and hardware configuration.

You may want to try both options and see which one provides better performance for your needs.

So... TRY 😉


Re: Is it possible to enable ZRam?

Posted: Wed Mar 29, 2023 12:16 pm
by dancytron

You can see if the Debian Dog solution works for you.

It's worked on systemd and non-systemd systems.

https://www.forum.puppylinux.com/viewto ... d1c#p78549


Re: Is it possible to enable ZRam?

Posted: Wed Mar 29, 2023 1:53 pm
by Jasper

@dancytron

Thanks for the suggestion, I will look at this and see if works for me.

I believe that dimkr did not activate the module in my particular kernel and would have to compile future builds with this enabled.


Re: Is it possible to enable ZRam?

Posted: Wed Mar 29, 2023 3:05 pm
by dimkr

@Jasper Which kernel is it?


Re: Is it possible to enable ZRam?

Posted: Wed Mar 29, 2023 4:18 pm
by Jasper

@dimkr I was referring to ozsouth's 6.1.14.

Apologises for the mistake.

The implementation in Jammypup-D3 works perfectly :thumbup:


Re: Is it possible to enable ZRam?

Posted: Wed Mar 29, 2023 8:33 pm
by Jasper

@ozsouth && @dancytron

Had some success I believe here:

https://www.forum.puppylinux.com/viewto ... 502#p85502


Re: Is it possible to enable ZRam?

Posted: Thu Mar 30, 2023 12:19 am
by ozsouth

@Jasper - good! Upon further research, I don't think it's a kernel issue.


Re: Is it possible to enable ZRam in BP64?

Posted: Fri Jun 16, 2023 2:07 pm
by gychang

I have a fanless old miniPC with 4G of RAM with internal SSD. Am running pups, bionicpup64 / F96-CE4 primarliy. Is there a how to setup zram in pups somewhere? thanks.


Re: Is it possible to enable ZRam? (SOLVED)

Posted: Sat Jun 17, 2023 6:30 am
by Geek3579
Jasper wrote: ↑Tue Mar 28, 2023 8:29 am

Hi all

I am using kernel 6.1.14 and was wondering if it is possible to enable ZRam to be used instead of a Swap File?

From a little digging I saw a solution but it uses systemd which is not available in FP64-95.

I have seen this option only recently when testing @jrb Jammypup.

For interest sake, use of ZRAM has been covered in the forums: viewtopic.php?p=25141&hilit=zram#p25141
and other places with info include: https://www.maketecheasier.com/configure-zram-ubuntu/

Its use is as follows in a terminal with only one core in use:
modprobe zram
echo 1G > /sys/block/zram0/disksize # for core 0
mkswap --label zram0 /dev/zram0
swapon --priority 100 /dev/zram0
For more cores see: https://oldforum.puppylinux.com/viewtop ... 877272&i=1

To check check operation run: cat /proc/swaps
To turn off, run: swapoff


Re: Is it possible to enable ZRam? (SOLVED)

Posted: Sat Jun 17, 2023 6:39 am
by Jasper

@dancytron solution worked for me ...... don't forget the conf file

https://www.forum.puppylinux.com/viewto ... d1c#p78549