[SOLVED] Memory hog?

Forum rules
Before you post please read how to get help
Post Reply
User avatar
JerryF
Level 9
Level 9
Posts: 2640
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

[SOLVED] Memory hog?

Post by JerryF » Fri Oct 06, 2017 12:40 pm

I recently switched from 18.2 Cinnamon to 18.2 MATE, one being that I might see and improvement with response in opening apps.

I just checked System Monitor, Resources and to my surprise, I'm using 1.3 GB of RAM as I write this. This seems like a lot.

Here's a couple of screenshots of System Monitor, if this helps.
Selection_001.jpg
Selection_002.jpg
Last edited by JerryF on Sat Oct 07, 2017 5:31 pm, edited 1 time in total.
IF AND WHEN your problem has been solved, please edit your original post and add [SOLVED] to the beginning of the Subject Line. It helps other members.

User avatar
MintBean
Level 9
Level 9
Posts: 2884
Joined: Fri Aug 07, 2015 6:54 am
Location: Blighty

Re: Memory hog?

Post by MintBean » Fri Oct 06, 2017 12:46 pm


User avatar
JerryF
Level 9
Level 9
Posts: 2640
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Memory hog?

Post by JerryF » Fri Oct 06, 2017 12:54 pm

Thanks mintbean...I understand now. :D
IF AND WHEN your problem has been solved, please edit your original post and add [SOLVED] to the beginning of the Subject Line. It helps other members.

User avatar
MintBean
Level 9
Level 9
Posts: 2884
Joined: Fri Aug 07, 2015 6:54 am
Location: Blighty

Re: Memory hog?

Post by MintBean » Fri Oct 06, 2017 12:57 pm

Sorry I was too lazy to type much.... :wink:

User avatar
Flemur
Level 15
Level 15
Posts: 5793
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Memory hog?

Post by Flemur » Fri Oct 06, 2017 1:55 pm

As a curiosity if nothing else, you can release that memory like this:
# cat clear_mem.sh

Code: Select all

# This needs to be run as REAL root: "sudo -l"  or "sudo -s"
#!/bin/sh
sync; echo 3 > /proc/sys/vm/drop_caches
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

User avatar
JerryF
Level 9
Level 9
Posts: 2640
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Memory hog?

Post by JerryF » Fri Oct 06, 2017 4:04 pm

Flemur wrote:As a curiosity if nothing else, you can release that memory like this:
# cat clear_mem.sh

Code: Select all

# This needs to be run as REAL root: "sudo -l"  or "sudo -s"
#!/bin/sh
sync; echo 3 > /proc/sys/vm/drop_caches
Hi Flemur:

I got this:

Code: Select all

jerry # cat clear_mem.sh
cat: clear_mem.sh: No such file or directory
IF AND WHEN your problem has been solved, please edit your original post and add [SOLVED] to the beginning of the Subject Line. It helps other members.

User avatar
Pjotr
Level 20
Level 20
Posts: 10406
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Memory hog?

Post by Pjotr » Fri Oct 06, 2017 5:10 pm

A strange thing about linuxatemyram.com: it states that "available" = "free" + "buff/cache". But it's not. Not on my machine, and not even in the example the author gives....
Tip: 10 things to do after installing Linux Mint 19 Tara
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

ColdBootII
Level 3
Level 3
Posts: 170
Joined: Wed Aug 02, 2017 8:19 am

Re: Memory hog?

Post by ColdBootII » Fri Oct 06, 2017 6:09 pm

JerryF wrote:
Flemur wrote:As a curiosity if nothing else, you can release that memory like this:
# cat clear_mem.sh

Code: Select all

# This needs to be run as REAL root: "sudo -l"  or "sudo -s"
#!/bin/sh
sync; echo 3 > /proc/sys/vm/drop_caches
Hi Flemur:

I got this:

Code: Select all

jerry # cat clear_mem.sh
cat: clear_mem.sh: No such file or directory
Try this way:

Code: Select all

sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"
Pjotr wrote:A strange thing about linuxatemyram.com: it states that "available" = "free" + "buff/cache". But it's not. Not on my machine, and not even in the example the author gives....
You are right, available memory amounts to free + some amount of buffers and cache that kernel can evict if need be. Sometimes it may be all buff/cache, sometimes it's not. Some people even keep locked certain files(e.g. database tables) in cache when quick access to these is a priority.

User avatar
MintBean
Level 9
Level 9
Posts: 2884
Joined: Fri Aug 07, 2015 6:54 am
Location: Blighty

Re: Memory hog?

Post by MintBean » Fri Oct 06, 2017 6:37 pm

ColdBootII wrote:You are right, available memory amounts to free + some amount of buffers and cache that kernel can evict if need be. Sometimes it may be all buff/cache, sometimes it's not. Some people even keep locked certain files(e.g. database tables) in cache when quick access to these is a priority.
Thanks for the insight. How (broadly speaking) do you go about keeping files locked in cache?

User avatar
Flemur
Level 15
Level 15
Posts: 5793
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Memory hog?

Post by Flemur » Fri Oct 06, 2017 7:27 pm

JerryF wrote:I got this:

Code: Select all

jerry # cat clear_mem.sh
cat: clear_mem.sh: No such file or directory
You have to make your own .sh file from that code or just enter the string after "sudo -i".
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

ColdBootII
Level 3
Level 3
Posts: 170
Joined: Wed Aug 02, 2017 8:19 am

Re: Memory hog?

Post by ColdBootII » Fri Oct 06, 2017 9:10 pm

MintBean wrote:Thanks for the insight. How (broadly speaking) do you go about keeping files locked in cache?
Sorry MintBean, as it doesn't pertain to my use case, I haven't bothered delving into any details. Mostly SysAdmin's stuff as they are forever bent over system performance.

User avatar
trytip
Level 7
Level 7
Posts: 1624
Joined: Tue Jul 05, 2016 1:20 pm

Re: Memory hog?

Post by trytip » Fri Oct 06, 2017 10:47 pm

i see in the process snap shot that teamviewer,dropbox,mintupdate,bluttoothg are loaded . if you don't use these turn them off in startup session of control centre
Image

User avatar
MintBean
Level 9
Level 9
Posts: 2884
Joined: Fri Aug 07, 2015 6:54 am
Location: Blighty

Re: Memory hog?

Post by MintBean » Sat Oct 07, 2017 12:00 am

No worries ColdBoot, just an idle question.

User avatar
JerryF
Level 9
Level 9
Posts: 2640
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Memory hog?

Post by JerryF » Sat Oct 07, 2017 9:58 am

trytip wrote:i see in the process snap shot that teamviewer,dropbox,mintupdate,bluttoothg are loaded . if you don't use these turn them off in startup session of control centre
Yes, I do use them. Thanks for the suggestion. :)
IF AND WHEN your problem has been solved, please edit your original post and add [SOLVED] to the beginning of the Subject Line. It helps other members.

User avatar
JerryF
Level 9
Level 9
Posts: 2640
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Memory hog?

Post by JerryF » Sat Oct 07, 2017 10:39 am

Flemur wrote:You have to make your own .sh file from that code or just enter the string after "sudo -i".
Hi Flemur:

I tried both ways. Directly with sudo -i sh -c "sync; echo 3 > /proc/sys/vm/drop_caches" and I created a file with the code you gave me and ran it as root in terminal.

Code: Select all

cat clear_mem.sh
# This needs to be run as REAL root: "sudo -l"  or "sudo -s"
#!/bin/sh
sync; echo 3 > /proc/sys/vm/drop_caches
There was no output from the commands. Is there supposed to be? After running the command and script, I checked Resources in System Monitor and free -m and both stayed the same.

As a note, when I first boot, my memory in Resources show as 890 MB. Then when I start Chrome, it goes to 1.2 GB. I'm beginning to think this is normal for my setup with the startup apps I have---Dropbox, Teamviewer, etc.
IF AND WHEN your problem has been solved, please edit your original post and add [SOLVED] to the beginning of the Subject Line. It helps other members.

User avatar
trytip
Level 7
Level 7
Posts: 1624
Joined: Tue Jul 05, 2016 1:20 pm

Re: Memory hog?

Post by trytip » Sat Oct 07, 2017 1:16 pm

yes this is normal for your setup. you can boot test without most of the startup apps to compare. i personally don't like all these things running in background that was windows downfall too, every application you installed also went into startup as some kind of service ultimately building a slow boot time and memory hog.

see if this code does better, but clearing ram and cache in linux is not as useful as in windows

Code: Select all

su -c "echo 3 >'/proc/sys/vm/drop_caches' && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared'"
Image

User avatar
JerryF
Level 9
Level 9
Posts: 2640
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Memory hog?

Post by JerryF » Sat Oct 07, 2017 5:31 pm

trytip,

Thanks. Yes, I realize about the startup apps, but those are the very few that I run.

Your commands did reduce the the Memory from 1.2 GB to 1.1 GB, but went back. Not a big deal. As long as I know that my memory usage isn't out of the ordinary with my setup

Thanks to all!
IF AND WHEN your problem has been solved, please edit your original post and add [SOLVED] to the beginning of the Subject Line. It helps other members.

Post Reply

Return to “MATE”