How To: using swap on zram.

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

How To: using swap on zram.

Postby JY » Feb 13th, '21, 17:39

Hello!
Do you know an easy way to use zram as swap in Mageia?
I guess one of these packages?:
https://madb.mageia.org/package/list/t_ ... rch/x86_64

Thanks for the help!)
JY
 
Posts: 29
Joined: May 9th, '20, 12:49

Re: How To: using swap on zram.

Postby doktor5000 » Feb 13th, '21, 19:33

Hi there, what amount of RAM do you currently have, and why do you think zram would help, and with what in particular ?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How To: using swap on zram.

Postby JY » Feb 13th, '21, 23:03

Hi! I have a few machines, having from 1.5 to 2 GB of ram...
Swapping is constant and slows everything as soon as browser is used...
So swapping on zram instead of hard disk may be of some help...
JY
 
Posts: 29
Joined: May 9th, '20, 12:49

Re: How To: using swap on zram.

Postby doktor5000 » Feb 14th, '21, 12:18

From a quick look, seems you could try it by installing zramstart package and manually running zramstart as root.
If you want it permanently you should enable mkzram.service which should activate automatically after swap.target and run zramstart.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How To: using swap on zram.

Postby morgano » Feb 15th, '21, 17:29

You could also try if a lighter browser suit your needs, like otter-browser, Falkon, and Midori which we have packaged, plus a few more alternatives.
And a light desktop.
Mandriva since 2006, Mageia 2011 at home & work. Thinkpad T40, T43, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1306
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: How To: using swap on zram.

Postby JY » Feb 16th, '21, 18:57

Thanks to take the time to answer... i'll test zramstart and mkzram.service....
Yes i know other browsers are lighter... but you know, protected contents (more and more commonly used, following Netfilxe's path...) are only in firefox or widevine-enabled browsers, not the light ones...
JY
 
Posts: 29
Joined: May 9th, '20, 12:49

Re: How To: using swap on zram.

Postby farnas » Nov 21st, '23, 06:45

Hello!

I decided to wrap up a small instruction based on the info found on this chat regarding zram in Mageia. Unfortunately, I didn't find any official wiki about it! Also I used this instruction written for Rosa Linux: https://dzen.ru/a/YjBO2NuThU5uCfr2

dnf in zramstart ### install the app first
zramstart ### just start it
nano /etc/sysconfig/zram ### by default the FACTOR=33 but I prefer 100 or more
systemctl enable mkzram.service ### enable the service permanently

swapon ## to check that it works.
farnas
 
Posts: 16
Joined: Nov 13th, '23, 07:54

Re: How To: using swap on zram.

Postby morgano » Nov 21st, '23, 11:36

Thank you farnas for the contribution - helpful for people needing it.

If you like to contribute this way, maybe you are interested in helping writing in our wiki?
Mandriva since 2006, Mageia 2011 at home & work. Thinkpad T40, T43, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1306
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: How To: using swap on zram.

Postby farnas » Dec 2nd, '23, 07:32

Yes, I'm interested in helping and updating your wiki. But I need a little time to learn more about Mageia. Honestly to say, English is not my mother tongue, but I'll try anyway because I also would like to contribute back in the community that is growing around such a wonderful Linux Distribution! :)
Last edited by doktor5000 on Dec 2nd, '23, 15:38, edited 1 time in total.
Reason: removed fullquote
farnas
 
Posts: 16
Joined: Nov 13th, '23, 07:54

Re: How To: using swap on zram.

Postby morgano » Dec 2nd, '23, 13:15

Dont worry about English, i see you do good here :)
Other writers will check and correct language, typos. Happens to me. English is not my mother tongue either.
Of course you can also ask for writing help, i.e on the doc-discuss mail list. Ask for technical knowledge here en forum, I often ask in QA mail list as I am frequently there.
The aim is to write originally in English and keep them updated, then some pages are translated to other pages.

https://wiki.mageia.org/en/How_to_write_a_wiki_page

Start trying on your own page, example: mine is https://wiki.mageia.org/en/User:Morgano
It is a good place to start prototype writing, then copy paste to a new page.
Mandriva since 2006, Mageia 2011 at home & work. Thinkpad T40, T43, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1306
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest

cron