How To Change ZRAM on BookWormPup64_10.0.6?

Moderator: Forum moderators

Post Reply
JusGellin
Posts: 460
Joined: Fri Jan 19, 2024 11:12 pm
Has thanked: 41 times
Been thanked: 43 times

How To Change ZRAM on BookWormPup64_10.0.6?

Post by JusGellin »

I would just like to see if this improves the performance for my Lenovo Ideapad 100S-11IBY with just 2GB memory.
I wasn't sure how to enable/disable this and change the amount. I guess it automatically uses 1842 MB swap file because it's there.
lsblk gives zram0 for 1.8G disk [SWAP}
The grub.cfg has:
linux /SAV/vmlinuz pmedia=usbflash pdrive=linux psubdir=/SAV pfix=fsck,fsckp,trim TZ=MST7MDT,M3.2.0,M11.1.0

Thanks

User avatar
bigpup
Moderator
Posts: 6818
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 866 times
Been thanked: 1464 times

Re: How To Change ZRAM on BookWormPup64_10.0.6

Post by bigpup »

You do not need to change anything.

If you have a really low powered CPU and RAM, you may see a small change, turning off zram. (maybe)
Most computer CPU and RAM can work well using compression in RAM operations.

It is setup to use all available RAM.

Zram is not just a different way to have a swap and a faster swap.

it also changes how the RAM space is used.
It is used in a compressed operation.

the overall operation of RAM, is like it is more RAM available than is physically there.
Stuff is loaded into RAM in compressed state. So needs less space.

So zram will make RAM function as if there is actually about twice the amount of physical RAM.

How zram works:

zram, formerly called compcache, is a Linux kernel module for creating a compressed block device in RAM, i.e. a RAM disk with on-the-fly disk compression. The block device created with zram can then be used for swap or as general-purpose RAM disk. The two most common uses for zram are for the storage of temporary files and as a swap device.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

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

Re: How To Change ZRAM on BookWormPup64_10.0.6

Post by dimkr »

Currently it's not configurable, look for create_zram_swap() in /etc/rc.d/rc.sysinit. This function is called if no swap partition or file is found, and the size of the zram block device is hardcoded.

JusGellin
Posts: 460
Joined: Fri Jan 19, 2024 11:12 pm
Has thanked: 41 times
Been thanked: 43 times

Re: How To Change ZRAM on BookWormPup64_10.0.6

Post by JusGellin »

Ok, thanks.

I tested to see how it reacts by adding more tabs to Firefox. The memory stays the same for using all the memory of 1.7GiB.
The swap (zram) increases as more tabs added to Firefox to the max of 1.8GiB.
More than 2 tabs slows it down. But it still works amazingly.
I think you mentioned how you only ran one app at a time on one you had.

So, if the swap(zram) works this way by adding 2GiB, could more be added like 3 or 4 GiB? Or is this the ideal amount because it matches the memory.

@dimkr
I saw your response after I sent mine.

Currently it's not configurable

Thanks for the information.

james2
Posts: 9
Joined: Sat Jun 29, 2024 4:12 pm

Re: How To Change ZRAM on BookWormPup64_10.0.6?

Post by james2 »

Here's on some detailed info about zswap, ram etc from a site about increasing speed and how to do it. zswap is first page item.
https://easylinuxtipsproject.blogspot.c ... html#ID1.1

User avatar
bigpup
Moderator
Posts: 6818
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 866 times
Been thanked: 1464 times

Re: How To Change ZRAM on BookWormPup64_10.0.6?

Post by bigpup »

ZRAM is not ZSWAP.

Two completely different things.

ZRAM kind of developed from the idea of ZSWAP.

Note:

When configuring zram, the size of the zram device controls the maximum uncompressed amount of data it can store, not the maximum compressed size. You can configure the zram's size to be equal to or even greater than your system's physical RAM capacity, as long as the compressed size on physical RAM will not exceed your system's physical RAM capacity.
If the related zswap kernel feature remains enabled, it will prevent zram from being used effectively. This is because zswap functions as a swap cache in front of zram, intercepting and compressing evicted memory pages before they can reach zram. Despite the output of zramctl(8), most of zswap is unused in this circumstance. Therefore, it's recommended to permanently disable zswap using the kernel parameter or sysfs setting before starting.
Hibernating to swap on zram is not supported, even when zram is configured with a backing device on permanent storage. logind will protect against trying to hibernate to a swap space on zram.

https://wiki.archlinux.org/title/Zram
.
.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
wizard
Posts: 1835
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2503 times
Been thanked: 596 times

Re: How To Change ZRAM on BookWormPup64_10.0.6?

Post by wizard »

@JusGellin

Have a Lenovo 100s-14ibr, Intel dual core 1.6ghz n3060, 2gb ram. Running F96CE_4 and pfix=nocopy in the grub kernel line improved performance compared to BW64. Also found Chromium portable using a little less ram than Firefox, YMMV.

wizard

Big pile of OLD computers

james2
Posts: 9
Joined: Sat Jun 29, 2024 4:12 pm

Re: How To Change ZRAM on BookWormPup64_10.0.6?

Post by james2 »

@bigpup.
As the article explains of relationships and workings and why. I thought the piece was valid to workings, relationships and decisions. no offence taken if you want to take it down. I should have left a note that the way it's changed in LinuxMInt Commandline is not the same as many other OS systems.

Post Reply

Return to “BookwormPup”