Page 6 of 6

Re: What's your swappiness set to, eh?

Posted: Wed May 02, 2018 7:39 am
by stsoh
u can change zswap compression/pool.

Code: Select all

user@mx:~/Desktop
$ dmesg|grep zswap
[    0.601029] zswap: loaded using pool lz4/z3fold
user@mx:~/Desktop
$ dmesg|grep zram
[    2.501444] zram: Added device: zram0
[    2.501508] zram: Added device: zram1
[    2.509363] zram0: detected capacity change from 0 to 2082590720
[    2.518401] Adding 2033776k swap on /dev/zram0.  Priority:100 extents:1 across:2033776k SSFS
[    2.522757] zram1: detected capacity change from 0 to 2082590720
[    2.527645] Adding 2033776k swap on /dev/zram1.  Priority:100 extents:1 across:2033776k SSFS

Re: What's your swappiness set to, eh?

Posted: Wed May 02, 2018 8:40 am
by cyrilus31
@stsoh : is there any reason I should tinker with zram if I never use swap (2Go of ram, no VM, very basic needs with this rig) ?

Re: What's your swappiness set to, eh?

Posted: Wed May 02, 2018 8:53 am
by Protokol
@stsoh
thanks! I've activated zram with the help of your technical link

Code: Select all

  dmesg|grep zswap                   
[    3.863758] zswap: loaded using pool lzo/zbud
  dmesg|grep zram     
[   13.242095] zram: Added device: zram0
[   13.244130] zram: Added device: zram1
[   13.271715] zram1: detected capacity change from 0 to 263331840
[   13.311881] Adding 257156k swap on /dev/zram1.  Priority:100 extents:1 across:257156k SSFS
  dmesg|grep swap
[    3.863758] zswap: loaded using pool lzo/zbud
[    9.084972] Adding 4527744k swap on /dev/sda2.  Priority:-2 extents:1 across:4527744k SSFS
[   13.311881] Adding 257156k swap on /dev/zram1.  Priority:100 extents:1 across:257156k SSFS
  cat /proc/sys/vm/swappiness             
100
Now on, I can watch a tv program through a firefox app and at the same time 15 tabs open on palemoon browser, with no lag at all. Just the fan remember me to calm down a litle bit... but that's normal !
Will test a further bit to see ;) :number1:

Re: What's your swappiness set to, eh?

Posted: Wed May 02, 2018 9:10 am
by stsoh
cyrilus31 wrote:@stsoh : is there any reason I should tinker with zram if I never use swap (2Go of ram, no VM, very basic needs with this rig) ?
processes a lot faster on ram, without a doubt, even it doesn't swap. i set 4gb zram, doesn't swap but run smoother n faster than without. with 8gb physical ram plus 4gb zram = 12gb (well, system shows 11gb). :eek:

Code: Select all

$ free -ht
              total        used        free      shared  buff/cache   available
Mem:           7.8G        1.6G        4.6G        111M        1.5G        5.8G
Swap:          3.9G          0B        3.9G
Total:          11G        1.6G        8.5G

Re: What's your swappiness set to, eh?

Posted: Wed May 02, 2018 9:31 am
by stsoh
u can set zram size larger by editing /etc/init.d/zram file.
use thunar to open n edit zram, change fraction=25 to 50.
gives better performance.

Re: What's your swappiness set to, eh?

Posted: Wed May 02, 2018 11:14 am
by stsoh
another tip for those installed mx on ssd, activate tmpfs for tmp folder on memory.
on document, tmpfs for run, lock and shm are set 'ON' by default but not tmp (default is 'OFF').
tmp is on ssd/hdd, in case of outage can be recover otherwise will be gone.
only for those interested (like me), do not want to wear down ssd n have running tmp on memory.
open thunar, edit /etc/fstab file, copy n paste below to eol (end-of-line) n save.

Code: Select all

tmpfs	/var/tmp	tmpfs	rw,nodev,nosuid,mode=1777	0	0

Re: What's your swappiness set to, eh?

Posted: Fri May 04, 2018 4:29 am
by Protokol
hello @stsoh
I followed all your tips and I'm very pleased with it, all is working great,
Big thanks for your help ! :number1:

Re: What's your swappiness set to, eh?

Posted: Fri May 04, 2018 4:44 am
by grelos
I do not use any swap partition. No need.

Re: What's your swappiness set to, eh?

Posted: Fri May 04, 2018 5:59 am
by stsoh
i got no swap partition too, my e5400 can't compare to your i7.
i run zswap n zram plus tmpfs for tmp, performance r smoother n faster when it is processed on memory.
write lesser on ssd. :happy: