View previous topic :: View next topic |
Author |
Message |
destroyedlolo l33t
Joined: 17 Jun 2011 Posts: 846 Location: Close to Annecy (France)
|
Posted: Thu Nov 04, 2021 3:06 pm Post subject: Switching to zram swap : enable disk swap as well |
|
|
Hello,
I enabled zram swap as per the wiki, and it's working fine
But as I have already have a swap partition, how to ensure both are used if needed ?
I mean,
Code: | swapon --show
NAME TYPE SIZE USED PRIO
/dev/sda2 partition 512M 0B -2
/dev/zram0 partition 512M 0B 16383
|
but I'm very sure the sda2 is used, as in TOP, only 1Go is displayed.
Code: | top - 16:05:44 up 11 min, 1 user, load average: 1,01, 0,99, 0,66
Tâches: 200 total, 1 en cours, 199 en veille, 0 arrêté, 0 zombie
%Cpu(s): 4,8 ut, 1,4 sy, 0,0 ni, 93,8 id, 0,0 wa, 0,0 hi, 0,0 si, 0,0 st
MiB Mem : 7880,0 total, 6119,6 libr, 1025,9 util, 734,5 tamp/cache
MiB Éch : 1024,0 total, 1024,0 libr, 0,0 util. 6574,5 dispo Mem
|
If not, how to enable it as 2nd swap device ?
Thanks |
|
Back to top |
|
|
APolozov Apprentice
Joined: 28 Sep 2006 Posts: 189 Location: Voronezh, Russia
|
Posted: Thu Nov 04, 2021 4:58 pm Post subject: |
|
|
I am using "zswap" instead "zram" + using dinamic "swapspace" instead fixed swap partition, IMHO it better and clever. _________________ Excuse my bad English, I only study it. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Thu Nov 04, 2021 5:36 pm Post subject: |
|
|
destroyedlolo,
Multiple swap spaces are used in priority order.
I don't know which has the highest priority though. Highest or lowest number. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
destroyedlolo l33t
Joined: 17 Jun 2011 Posts: 846 Location: Close to Annecy (France)
|
Posted: Thu Nov 04, 2021 6:00 pm Post subject: |
|
|
Thanks for your replies
APolozov wrote: | I am using "zswap" instead "zram" + using dinamic "swapspace" instead fixed swap partition, IMHO it better and clever. |
I didn't know about zswap but seems better on my boxes where I have swap on HDD.
I'll keep zram for /tmp and /var/tmp and ... swap only on system I don't want the "disk" to be stressed as on my SBC.
NeddySeagoon wrote: |
Multiple swap spaces are used in priority order.
I don't know which has the highest priority though. Highest or lowest number. |
As per my reading, highest priority first.
So, as both are present in /proc/swaps it means both are usable.
I guess I found a good comparison here. |
|
Back to top |
|
|
mrbassie l33t
Joined: 31 May 2013 Posts: 772 Location: over here
|
Posted: Fri Nov 05, 2021 2:19 pm Post subject: |
|
|
destroyedlolo wrote: |
As per my reading, highest priority first. |
It is, e.g Code: | $ swapon -s
Filename Type Size Used Priority
/dev/zd0 partition 8388604 0 -2
/dev/zram0 partition 8388604 0 10 |
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|