What's your swappiness set to, eh?

For interesting topics. But remember this is a Linux Forum. Do not post offensive topics that are meant to cause trouble with other members or are derogatory towards people of different genders, race, color, minors (this includes nudity and sex), politics or religion. Let's try to keep peace among the community and for visitors.

No spam on this or any other forums please! If you post advertisements on these forums, your account may be deleted.

Do not copy and paste entire or even up to half of someone else's words or articles into posts. Post only a few sentences or a paragraph and make sure to include a link back to original words or article. Otherwise it's copyright infringement.

You can talk about other distros here, but no MX bashing. You can email the developers of MX if you just want to say you dislike or hate MX.
Message
Author
User avatar
stsoh
Posts: 183
Joined: Sun Aug 20, 2017 10:11 am

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

#51 Post 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
MX-17.1_x64 Horizon, G41M-P33 Combo (MS-7592), Pentium E5400 (2706 MHz), 8Gb RAM (984 MT/s),
Intel 4 Series Integrated Graphics, Realtek PCIe Fast RTL8101/2/6E, PCI Gigabit RTL8169 Ethernets.
Accepted Linux when i found MX-Linux in 2016.

User avatar
cyrilus31
Posts: 629
Joined: Thu Nov 03, 2016 3:24 pm

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

#52 Post 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) ?

User avatar
Protokol
Posts: 18
Joined: Fri Apr 13, 2018 10:46 am

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

#53 Post 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:
Hewlett-Packard Compaq Presario CQ71 Notebook
Kernel: 4.19.0-12-amd64 x86_64
Desktop: MX-19.2_x64 patito feo May 31 2020
Graphics: Intel Mobile 4 Series Integrated Graphics
Ram : 4GB

User avatar
stsoh
Posts: 183
Joined: Sun Aug 20, 2017 10:11 am

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

#54 Post 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
MX-17.1_x64 Horizon, G41M-P33 Combo (MS-7592), Pentium E5400 (2706 MHz), 8Gb RAM (984 MT/s),
Intel 4 Series Integrated Graphics, Realtek PCIe Fast RTL8101/2/6E, PCI Gigabit RTL8169 Ethernets.
Accepted Linux when i found MX-Linux in 2016.

User avatar
stsoh
Posts: 183
Joined: Sun Aug 20, 2017 10:11 am

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

#55 Post 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.
MX-17.1_x64 Horizon, G41M-P33 Combo (MS-7592), Pentium E5400 (2706 MHz), 8Gb RAM (984 MT/s),
Intel 4 Series Integrated Graphics, Realtek PCIe Fast RTL8101/2/6E, PCI Gigabit RTL8169 Ethernets.
Accepted Linux when i found MX-Linux in 2016.

User avatar
stsoh
Posts: 183
Joined: Sun Aug 20, 2017 10:11 am

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

#56 Post 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
MX-17.1_x64 Horizon, G41M-P33 Combo (MS-7592), Pentium E5400 (2706 MHz), 8Gb RAM (984 MT/s),
Intel 4 Series Integrated Graphics, Realtek PCIe Fast RTL8101/2/6E, PCI Gigabit RTL8169 Ethernets.
Accepted Linux when i found MX-Linux in 2016.

User avatar
Protokol
Posts: 18
Joined: Fri Apr 13, 2018 10:46 am

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

#57 Post 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:
Hewlett-Packard Compaq Presario CQ71 Notebook
Kernel: 4.19.0-12-amd64 x86_64
Desktop: MX-19.2_x64 patito feo May 31 2020
Graphics: Intel Mobile 4 Series Integrated Graphics
Ram : 4GB

grelos
Posts: 69
Joined: Wed Mar 28, 2018 3:12 pm

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

#58 Post by grelos »

I do not use any swap partition. No need.
MX-19 on Lenovo 520-15IKB

User avatar
stsoh
Posts: 183
Joined: Sun Aug 20, 2017 10:11 am

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

#59 Post 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:
MX-17.1_x64 Horizon, G41M-P33 Combo (MS-7592), Pentium E5400 (2706 MHz), 8Gb RAM (984 MT/s),
Intel 4 Series Integrated Graphics, Realtek PCIe Fast RTL8101/2/6E, PCI Gigabit RTL8169 Ethernets.
Accepted Linux when i found MX-Linux in 2016.

Post Reply

Return to “General”