Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

Swapping issue

Help for Current Versions of MX
Message
Author
User avatar
nomko
Forum Novice
Forum  Novice
Posts: 20
Joined: Mon Oct 29, 2018 3:00 pm

Re: Swapping issue

#11 Post by nomko » Thu Nov 01, 2018 3:54 am

@ bushyiii:

Can you keep your laptop running for a whole day and do the things you normally would doe? And make sure you have a terminal open and have TOP running in the terminal. This terminal command line tool will show which application is responsible for the assumed memory leak.

Changing swappiness will not fix the memory leak, the only thing what will happen when reducing the swappiness is how many times and how much the Linux kernel is swapping memory pages from RAM to the swap file/partition. See here as well: http://linuxtips.simpsite.nl/reduce-swappiness.
Acer TravelMate-5742Z : running MX-17.1 / BIOS date: 18-11-2010

In 2007 my Windows XP based system informed me to update the system. So, i installed Linux

User avatar
nomko
Forum Novice
Forum  Novice
Posts: 20
Joined: Mon Oct 29, 2018 3:00 pm

Re: Swapping issue

#12 Post by nomko » Thu Nov 01, 2018 3:59 am

nomko wrote:
Thu Nov 01, 2018 3:54 am
@ bushyiii:

Can you keep your laptop running for a whole day and do the things you normally would doe? And make sure you have a terminal open and have TOP running in the terminal. This terminal command line tool will show which application is responsible for the assumed memory leak.

Changing swappiness will not fix the memory leak, the only thing what will happen when reducing the swappiness is how many times and how much the Linux kernel is swapping memory pages from RAM to the swap file/partition. See here as well: http://linuxtips.simpsite.nl/reduce-swappiness.


However, you mentioned this is your first post;
I will not power down for a day and the next day I have excessive memory swaps to disk. I'm guessing there's a big memory leak somewhere, may be Firefox or something within MX.
To me this indicates that your system memory (RAM) will be filled up by Firefox or any other application, but as you state only by Firefox. But like i said, keep your system up and running with firefox fr a whole day with TOP running in a terminal on the background. Can you make snapshots of it with a camera/mobile phone every couple of hours to monitor the status of TOP?
Acer TravelMate-5742Z : running MX-17.1 / BIOS date: 18-11-2010

In 2007 my Windows XP based system informed me to update the system. So, i installed Linux

User avatar
stsoh
Forum Regular
Forum Regular
Posts: 415
Joined: Sun Aug 20, 2017 10:11 am

Re: Swapping issue

#13 Post by stsoh » Thu Nov 01, 2018 5:47 am

MX-17.1_x64 Horizon, G41M-P33 Combo(MS-7592), Pentium E5400 (min/max: 1203/2700 MHz), 8Gb RAM (800 MT/s),
Intel 4 Series Integrated Graphics, Realtek PCIe Fast RTL8101/2/6E, PCI Gigabit RTL8169 Ethernets.

User avatar
nomko
Forum Novice
Forum  Novice
Posts: 20
Joined: Mon Oct 29, 2018 3:00 pm

Re: Swapping issue

#14 Post by nomko » Thu Nov 01, 2018 5:12 pm

stsoh wrote:
Thu Nov 01, 2018 5:47 am
try using zram, https://mxlinux.org/wiki/other/zram
Zram has its limitations/disadvantages:

1)
Higher CPU load because Zram is constantly busy compressing amd decompressing the swapfile

2)
At the moment Zram has filled up the system RAM your system will be forced to use the swapfile on the hard drive anyways while Zram is still using the system RAM

3)
Most important, Zram is an experimental kernel module. So when usimg Zram, it could crash your system.
Acer TravelMate-5742Z : running MX-17.1 / BIOS date: 18-11-2010

In 2007 my Windows XP based system informed me to update the system. So, i installed Linux

bushyiii
Forum Novice
Forum  Novice
Posts: 14
Joined: Wed Mar 21, 2018 2:46 pm

Re: Swapping issue

#15 Post by bushyiii » Fri Nov 02, 2018 7:27 pm

I modified my post as suggested, the output of LSHW is now within the code brackets.

User avatar
v3g4n
Forum Guide
Forum Guide
Posts: 1791
Joined: Sat Jan 16, 2016 8:20 pm

Re: Swapping issue

#16 Post by v3g4n » Fri Nov 02, 2018 9:21 pm

My guess its that the swappiness is occuring because when I start MX in a VM, with just Firefox and only 3 tabs open, it is already using 850+ mb of ram so when you suspend to ram that is requiring over your 1.5GB of ram so it is using swap to compensate. In my experience, once you enter swap there is no getting out. I would recommend closing Firefox in the future before suspending to ram.

User avatar
Jerry3904
Forum Veteran
Forum Veteran
Posts: 22697
Joined: Wed Jul 19, 2006 6:13 am

Re: Swapping issue

#17 Post by Jerry3904 » Sat Nov 03, 2018 1:48 am

Hey, hi.
Production: 4.15.0-1-amd64, MX-17.1, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 8 GB, Kingston SSD 120 GB and WesternDigital 1TB
Testing: AAO 722: 4.15.0-1-386. MX-17.1, AMD C-60 APU, 4 GB

User avatar
stsoh
Forum Regular
Forum Regular
Posts: 415
Joined: Sun Aug 20, 2017 10:11 am

Re: Swapping issue

#18 Post by stsoh » Sat Nov 03, 2018 6:17 am

nomko wrote:
Thu Nov 01, 2018 5:12 pm
stsoh wrote:
Thu Nov 01, 2018 5:47 am
try using zram, https://mxlinux.org/wiki/other/zram
Zram has its limitations/disadvantages:

1)
Higher CPU load because Zram is constantly busy compressing amd decompressing the swapfile

2)
At the moment Zram has filled up the system RAM your system will be forced to use the swapfile on the hard drive anyways while Zram is still using the system RAM

3)
Most important, Zram is an experimental kernel module. So when usimg Zram, it could crash your system.
are these your assumptions? have you try it?
your assumptions are wrong, pls do test it before putting above nonsense.
zram and zswap reduce hd swapping and improve performance for old/low power cpu/ram, data flows in memory is 10x faster than hd swap.
for best performance, change FACTOR=25 to 50. u can use root thunar and double click on /etc/init.d/zram file to edit.
Last edited by stsoh on Sat Nov 03, 2018 6:39 am, edited 1 time in total.
MX-17.1_x64 Horizon, G41M-P33 Combo(MS-7592), Pentium E5400 (min/max: 1203/2700 MHz), 8Gb RAM (800 MT/s),
Intel 4 Series Integrated Graphics, Realtek PCIe Fast RTL8101/2/6E, PCI Gigabit RTL8169 Ethernets.

User avatar
stsoh
Forum Regular
Forum Regular
Posts: 415
Joined: Sun Aug 20, 2017 10:11 am

Re: Swapping issue

#19 Post by stsoh » Sat Nov 03, 2018 6:27 am

ps:
zram installation/removal is simple.
open terminal,

install zram:
copy it to the /etc/init.d directory with this command:

Code: Select all

sudo cp /usr/local/bin/zram /etc/init.d
update:

Code: Select all

sudo update-rc.d zram defaults
check if zram is activated:

Code: Select all

free -h
if zram is not activate, do these command:

Code: Select all

sudo insserv /etc/init.d/zram

Code: Select all

sudo /etc/init.d/zram start
remove zram:

Code: Select all

sudo insserv -r zram

Code: Select all

sudo rm /etc/init.d/zram
u can start/stop zram:

Code: Select all

sudo /etc/init.d/zram start
or

Code: Select all

sudo /etc/init.d/zram stop
MX-17.1_x64 Horizon, G41M-P33 Combo(MS-7592), Pentium E5400 (min/max: 1203/2700 MHz), 8Gb RAM (800 MT/s),
Intel 4 Series Integrated Graphics, Realtek PCIe Fast RTL8101/2/6E, PCI Gigabit RTL8169 Ethernets.

bushyiii
Forum Novice
Forum  Novice
Posts: 14
Joined: Wed Mar 21, 2018 2:46 pm

Re: Swapping issue

#20 Post by bushyiii » Sun Nov 04, 2018 9:11 pm

I have screenshots of htop but don't know how to add them to a post.

Post Reply

Return to “MX Help”