Clear encrypted SWAP memory?

Is it cleaned up when you restart the browser?
Ok - I tried this. Think we are finally making progress about where the swap is going.

So first of all I shut down the large Chromium instance (killed the main process via htop, which made the browser instance disappear, relevant below). What happened to swap usage? Surprisingly nothing!

But then I started looking at htop, I noticed there were other processes still running in htop starting with "chrome -something-something". I tried by luck by killing them (there were many, I reckon more than 50 at least) and viola - it reduced active swap usage from 7.75GB (almost full) to 700 MB when I got rid of every single chrome process!

SWAP was redeemed - I think these Chromium processes are the culprit.

So quick question:
1) Why are these "extra" processes (since they didn't close with the Chromium instance) hanging around after closing of the browser instance?
2) Is a possible solution to my swap full usage issue - to keep killing these extra processes from htop? Or is there a better alternative? (killing them one by one can be a pain)
It may take some time for window content to appear entirely as it should. The waiting period, after resizing a window, may be longer if the system is noticeably busy.

That said, I don't recall ever seeing an amount used (i.e.more than zero) with zero processes listed.
I think I tried to see it even when the system load was manageable - still yielded nothing.
 
Chromium, Settings, "System" page. At top is "Continue running background apps when Chromium is closed", make sure that option is off.
Not exactly sure if how applicable to FreeBSD that option is, but I've always turned it on all my systems where I run Chrome/Chromium.

This one from almost 13 years ago:
 
Chromium, Settings, "System" page. At top is "Continue running background apps when Chromium is closed", make sure that option is off.
Will try to do this BUT

In an ideal situation : I don't want to be closing Chromium for as long as possible (a nasty side effect of this is that I need to login again on every site, specially when I kill the Chromium process)

Wouldn't it make more sense to kill these "extra" chromium processes themselves rather than the instance of Chromium? (they were present in htop even before trying to kill the main chromium process itself - not sure what gives rise to these extra processes)
 
Wouldn't it make more sense to kill these "extra" chromium processes themselves rather than the instance of Chromium? (they were present in htop even before trying to kill the main chromium process itself - not sure what gives rise to these extra processes)
Yes it may make more sense; I think one of the links I give has something in Chrome itself that will show the processes/threads and you can kill them.

One of the links addresses the "extra processes" part: extensions, addons could give rise to them, also seems tied to number of open tabs. I think the first article had a link to something called "memory saver" supposedly came in around v110, "on" by default that reduces memory use of background pages/tabs you haven't interacted with in a while. I checked on a up to date Windows Chrome and it was off (I never turned it on or off) and Chromium on FreeBSD it was also off (again never turned it on or off).

Based on your usage pattern (lots of tabs open) check Memory Saver (first option under Settings, Performance). There may be side effects of enabling it.
 
Ok - I tried this. Think we are finally making progress about where the swap is going.

So first of all I shut down the large Chromium instance (killed the main process via htop, which made the browser instance disappear, relevant below). What happened to swap usage? Surprisingly nothing!

But then I started looking at htop, I noticed there were other processes still running in htop starting with "chrome -something-something". I tried by luck by killing them (there were many, I reckon more than 50 at least) and viola - it reduced active swap usage from 7.75GB (almost full) to 700 MB when I got rid of every single chrome process!

SWAP was redeemed - I think these Chromium processes are the culprit.

So quick question:
1) Why are these "extra" processes (since they didn't close with the Chromium instance) hanging around after closing of the browser instance?
2) Is a possible solution to my swap full usage issue - to keep killing these extra processes from htop? Or is there a better alternative? (killing them one by one can be a pain)

I think I tried to see it even when the system load was manageable - still yielded nothing.

You should kill Chrome processes from Chrome's own task manager (in "more tools"). It also allows you to sort by size. That way you can tell tabs from the main process and you don't take down the entire browser.

As mentioned, by default Chrome indeed continues to work in the background. You can turn that off, but it probably doesn't make a RAM difference.
 
Looks like chrome spawns these and keeps them running "just in case", and then these idle processes are swapped out completely. Maybe you need to impose some rlimits on chrome? Is that possible?
 
Back
Top