Is it possible to enable ZRam? (SOLVED)

Moderators: 666philb, Forum moderators

Post Reply
User avatar
Jasper
Posts: 1833
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 775 times
Been thanked: 428 times

Is it possible to enable ZRam? (SOLVED)

Post 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.

Last edited by Jasper on Thu Mar 30, 2023 1:40 pm, edited 1 time in total.
ozsouth
Posts: 1493
Joined: Sun Jul 12, 2020 2:38 am
Location: S.E. Australia
Has thanked: 228 times
Been thanked: 669 times

Re: Is it possible to enable ZRam?

Post 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.

User avatar
Jasper
Posts: 1833
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 775 times
Been thanked: 428 times

Re: Is it possible to enable ZRam?

Post 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:

User avatar
pp4mnklinux
Posts: 1008
Joined: Wed Aug 19, 2020 5:43 pm
Location: Edinburgh
Has thanked: 596 times
Been thanked: 262 times
Contact:

Re: Is it possible to enable ZRam?

Post 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 😉

:arrow:

XFCE_FUSILLI . ===> https://puppyxfcefusilli.wordpress.com/

YouTube How_To . ==> https://bit.ly/f96ce_xfce_fusilli_HOWTO

Learning EASY OS . => https://easyos.org/

dancytron
Posts: 698
Joined: Fri Dec 13, 2019 6:26 pm
Has thanked: 487 times
Been thanked: 204 times

Re: Is it possible to enable ZRam?

Post 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

User avatar
Jasper
Posts: 1833
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 775 times
Been thanked: 428 times

Re: Is it possible to enable ZRam?

Post 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.

dimkr
Posts: 2329
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 49 times
Been thanked: 1133 times

Re: Is it possible to enable ZRam?

Post by dimkr »

@Jasper Which kernel is it?

User avatar
Jasper
Posts: 1833
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 775 times
Been thanked: 428 times

Re: Is it possible to enable ZRam?

Post by Jasper »

@dimkr I was referring to ozsouth's 6.1.14.

Apologises for the mistake.

The implementation in Jammypup-D3 works perfectly :thumbup:

User avatar
Jasper
Posts: 1833
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 775 times
Been thanked: 428 times

Re: Is it possible to enable ZRam?

Post by Jasper »

@ozsouth && @dancytron

Had some success I believe here:

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

ozsouth
Posts: 1493
Joined: Sun Jul 12, 2020 2:38 am
Location: S.E. Australia
Has thanked: 228 times
Been thanked: 669 times

Re: Is it possible to enable ZRam?

Post by ozsouth »

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

User avatar
gychang
Posts: 572
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 201 times
Been thanked: 57 times

Re: Is it possible to enable ZRam in BP64?

Post 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.

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

Geek3579
Posts: 266
Joined: Sat Jul 18, 2020 1:07 pm
Has thanked: 79 times
Been thanked: 66 times

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

Post 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

User avatar
Jasper
Posts: 1833
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 775 times
Been thanked: 428 times

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

Post by Jasper »

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

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

Post Reply

Return to “Fossapup64”