How to clean RAM after closing programs?

Booting, installing, newbie
Message
Author
User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#16 Post by rufwoof »

ITSMERSH wrote:
22 browsers tabs
:shock:
May be you should get a hobby in real life? :wink:
22 does seem somewhat excessive - but each to their own. Predominately I run one session cli/root using tmux for multiple windows (tabs set to be at the top of screen), and another browser as desktop, running as user ... type setup. That way the hardware and personal docs/data (root) are isolated from the X/browser (user) session. Nowadays a browser/online services can pretty much do all the things I do/use, calculator, text editing, image editing, docs/spreadsheets, mail/calendar, music/video player ....etc. Such that I can ctrl-alt-Fn between the root/cli/tmux (with multiple tabs) and browser (maximised, with multiple tabs). Used in such a manner and two or even three browser sessions, each with multiple tabs ... isn't that uncommon - as that is a form of 'multiple-desktops' with multiple-activities/tasks running on each.

I've also transitioned over from using a gui document editor (LibreOffice) to simply creating/editing documents using raw html (browser can be used to view/spell-check and the print to PDF file those html documents). Pretty much just base OpenBSD (that includes X, window manager, http server, mail server ...etc. as part of the base system, that is intensively security audited as a whole), with a browser (Iridium in my case) on top of that. And where the browser is in effect the desktops/windows (gui). Pretty rare however for me to have even 15 'windows' (browser tabs) 'open' (3 browser sessions, 5 tabs each). More often its a case of 1 browser session, up to a handful of tabs.
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

User avatar
souleau
Posts: 148
Joined: Sun 23 Oct 2016, 15:24

#17 Post by souleau »

mcewanw made this shell script years ago called freeupram, and it works great for me.
I don't know how it behaves on modern puppies though.

Here's the link:

http://www.murga-linux.com/puppy/viewto ... 596#356501

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

#18 Post by mikeslr »

Hi souleau,

Examination of mcewanw's script reveals that it is exactly the same as that nic007 provided earlier on this thread.

Maybe the thing to do is to create a desktop file which calls it. Then you could add it to the panel/taskbar.

Sorry, don't have the time to prepare it right now. But all you would need is a named /usr/share/desktop file, using the script after Exec=; a line providing "No Display" if you didn't want it to appear on the Start Menu, an icon somewhere (e.g. /usr/share/icons) with the desktop Icon's argument being Icon=pathToIcon/nameOfIcon.png? and an argument Category=Utility.

mikesLr

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#19 Post by greengeek »

In many cases the problem with RAM usage by the browser is not so much a case of how MUCH ram the browser needs to run, it is a case of misuse of that ram, and ram leaks of some kind, causing the cpu usage to get clagged.

I often find even simple sites cause my Chrome 48 to go into some form of "runaway" when those sites have certain types of adverts spread around the screen. The browser process heats up the machine, stops other processes running and often fails completely.

Someone released a version of Palemoon that locked out many of the advertising sites and it works really well in cases where Chrome gets it's knickers in a knot. I can browse much much faster with that version of Palemoon than I can with Chrome (especially on Trademe.co.nz). Sometimes the problem is bad browser code and excessive adverts or bad video codecs rather than actually running out of RAM.

I really doubt that a machine with 4GB of ram should have any genuine issue with inadequate ram - the real issue is coding faults or bad privacy settings in the browser.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

Re: I FOUND THE PROBLEM

#20 Post by greengeek »

pp4mnklinux wrote:I found that the problem is not the RAM, but a scrip which hang on the computer.

I send two screens, hosted at google drive


https://photos.google.com/photo/AF1QipO ... E4BAAmkS6V


https://photos.google.com/photo/AF1QipM ... Sp17lwyop5


thanky
I tried to view these but it seems to require signing into a Google account. I could not find a way to view these.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#21 Post by Flash »

It appears that pp4 has removed those images. They give a 404 error now.
Attachments
404 error.png
(22.03 KiB) Downloaded 147 times

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#22 Post by Flash »

greengeek wrote:In many cases the problem with RAM usage by the browser is not so much a case of how MUCH ram the browser needs to run, it is a case of misuse of that ram, and ram leaks of some kind, causing the cpu usage to get clagged.

I often find even simple sites cause my Chrome 48 to go into some form of "runaway" when those sites have certain types of adverts spread around the screen. The browser process heats up the machine, stops other processes running and often fails completely.

Someone released a version of Palemoon that locked out many of the advertising sites and it works really well in cases where Chrome gets it's knickers in a knot. I can browse much much faster with that version of Palemoon than I can with Chrome (especially on Trademe.co.nz). Sometimes the problem is bad browser code and excessive adverts or bad video codecs rather than actually running out of RAM.

I really doubt that a machine with 4GB of ram should have any genuine issue with inadequate ram - the real issue is coding faults or bad privacy settings in the browser.
I completely agree. Many web pages cause SeaMonkey to lock up. They usually seem to be poorly designed just to look at them, though CNN is a big offender. It's no surprise they'd contain a lot of poorly written scripts and code. Turning off javascript helps a lot, but that leaves you out of the fun.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#23 Post by musher0 »

Hello pp4mnklinux.

I've uploaded on PrivateBin a handy RAM-Cleaner script that perhaps will
fill your need:
https://privatebin.net/?31c76cc5c9b46fe ... qKmasIA3E=

It is the result of collective work done at thread
http://murga-linux.com/puppy/viewtopic. ... t&start=75
a while back.

Requires the real less (not the busybox one; the real less utility should
be in all recent Puppies), as well as urxvt v. > 9.0. Uses urxvt's
borderless feature; it cleans the RAM, then displays before and after
info on screen for 20 seconds.

A screen capture is attached as well as a zip of the script.

Any questions, please ask, either here or at PrivateBin.

IHTH.
Attachments
cleanup_memory4c.zip
Unzip, make executable and run.
(3.58 KiB) Downloaded 62 times
RAM-Cleaner.jpg
(89.61 KiB) Downloaded 103 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Post Reply