Page 1 of 1

How To Change ZRAM on BookWormPup64_10.0.6?

Posted: Wed Jun 19, 2024 4:16 pm
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


Re: How To Change ZRAM on BookWormPup64_10.0.6

Posted: Wed Jun 19, 2024 4:42 pm
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.


Re: How To Change ZRAM on BookWormPup64_10.0.6

Posted: Wed Jun 19, 2024 4:53 pm
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.


Re: How To Change ZRAM on BookWormPup64_10.0.6

Posted: Wed Jun 19, 2024 6:27 pm
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.


Re: How To Change ZRAM on BookWormPup64_10.0.6?

Posted: Mon Jul 01, 2024 11:08 am
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


Re: How To Change ZRAM on BookWormPup64_10.0.6?

Posted: Mon Jul 01, 2024 1:22 pm
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
.
.


Re: How To Change ZRAM on BookWormPup64_10.0.6?

Posted: Mon Jul 01, 2024 1:36 pm
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


Re: How To Change ZRAM on BookWormPup64_10.0.6?

Posted: Tue Jul 02, 2024 1:34 pm
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.