Discussion:
Ubuntu - nautilus - takes up the most memory even though it is not open
(too old to reply)
Adam
2021-02-06 04:37:01 UTC
Permalink
***@ASUS-N550JX:~$ ps -A --sort -rss -o comm,pmem,rss | head -n 6
COMMAND %MEM RSS
nautilus 23.5 1867636
NetworkManager 7.4 594380
wpa_supplicant 6.1 490664
thunderbird 4.9 390432
unity-panel-ser 0.5 45048


This is after closing Nautilus. Why ?
Melzzzzz
2021-02-06 05:54:58 UTC
Permalink
Post by Adam
COMMAND %MEM RSS
nautilus 23.5 1867636
NetworkManager 7.4 594380
wpa_supplicant 6.1 490664
thunderbird 4.9 390432
unity-panel-ser 0.5 45048
This is after closing Nautilus. Why ?
Hm, memory leak?
--
current job title: senior software engineer
skills: x86 aasembler,c++,c,rust,go,nim,haskell...

press any key to continue or any other to quit...
Adam
2021-02-06 07:04:51 UTC
Permalink
Post by Melzzzzz
Post by Adam
COMMAND %MEM RSS
nautilus 23.5 1867636
NetworkManager 7.4 594380
wpa_supplicant 6.1 490664
thunderbird 4.9 390432
unity-panel-ser 0.5 45048
This is after closing Nautilus. Why ?
Hm, memory leak?
Yeah, it's very slow at releasing memory after being closed.
Jeff Layman
2021-02-06 07:58:36 UTC
Permalink
Post by Adam
Post by Melzzzzz
Post by Adam
COMMAND %MEM RSS
nautilus 23.5 1867636
NetworkManager 7.4 594380
wpa_supplicant 6.1 490664
thunderbird 4.9 390432
unity-panel-ser 0.5 45048
This is after closing Nautilus. Why ?
Hm, memory leak?
Yeah, it's very slow at releasing memory after being closed.
Somewhat OT, but I get the same thing with Nemo in Mint. I just booted
this morning, and on checking the system monitor, find Nemo is using
20.7MB of memory. I didn't start it, but see that one of its activities
is "It is also responsible for handling the icons on the Cinnamon
desktop", although it doesn't appear in the list of "Startup
applications". Does Nautilus work the same way?
--
Jeff
Adam
2021-02-06 10:34:50 UTC
Permalink
Post by Adam
Post by Melzzzzz
Post by Adam
COMMAND %MEM RSS
nautilus 23.5 1867636
NetworkManager 7.4 594380
wpa_supplicant 6.1 490664
thunderbird 4.9 390432
unity-panel-ser 0.5 45048
This is after closing Nautilus. Why ?
Hm, memory leak?
Yeah, it's very slow at releasing memory after being closed.
Somewhat OT, but I get the same thing with Nemo in Mint. I just booted this morning, and on checking the system monitor, find Nemo is using 20.7MB of memory. I didn't start it, but see that one of its activities is "It is also responsible for handling the icons on the Cinnamon desktop", although it doesn't appear in the list of "Startup applications". Does Nautilus work the same way?
I have no idea. Memory for nautilus does go down but very slow.
Been checking and waiting for nautilus to disappear but nope.
Melzzzzz
2021-02-06 14:27:48 UTC
Permalink
Post by Jeff Layman
Post by Adam
Post by Melzzzzz
Post by Adam
COMMAND %MEM RSS
nautilus 23.5 1867636
NetworkManager 7.4 594380
wpa_supplicant 6.1 490664
thunderbird 4.9 390432
unity-panel-ser 0.5 45048
This is after closing Nautilus. Why ?
Hm, memory leak?
Yeah, it's very slow at releasing memory after being closed.
Somewhat OT, but I get the same thing with Nemo in Mint. I just booted
this morning, and on checking the system monitor, find Nemo is using
20.7MB of memory. I didn't start it, but see that one of its activities
is "It is also responsible for handling the icons on the Cinnamon
desktop", although it doesn't appear in the list of "Startup
applications". Does Nautilus work the same way?
No, handling icons on desktop was removed since 3.6?
--
current job title: senior software engineer
skills: x86 aasembler,c++,c,rust,go,nim,haskell...

press any key to continue or any other to quit...
Paul
2021-02-06 12:20:17 UTC
Permalink
Post by Adam
COMMAND %MEM RSS
nautilus 23.5 1867636
NetworkManager 7.4 594380
wpa_supplicant 6.1 490664
thunderbird 4.9 390432
unity-panel-ser 0.5 45048
This is after closing Nautilus. Why ?
Is Nautilus supposed to be running when you're
not using it ?

Did you start a file search, then dismiss the window ?

Perhaps the process is a windowless runaway.

I vaguely remember mention of some file manager
being naughty, if you start a file search, then
close the window. The parent process might then live
on, when it's not supposed to.

Paul
Adam
2021-02-06 14:39:44 UTC
Permalink
Post by Paul
Post by Adam
COMMAND %MEM RSS
nautilus 23.5 1867636
NetworkManager 7.4 594380
wpa_supplicant 6.1 490664
thunderbird 4.9 390432
unity-panel-ser 0.5 45048
This is after closing Nautilus. Why ?
Is Nautilus supposed to be running when you're
not using it ?
Not behaviour I expect.
Post by Paul
Did you start a file search, then dismiss the window ?
Don't remember. Possibly.
Post by Paul
Perhaps the process is a windowless runaway.
If so, not good.
Post by Paul
I vaguely remember mention of some file manager
being naughty, if you start a file search, then
close the window. The parent process might then live
on, when it's not supposed to.
Is it safe to kill the process ?
Post by Paul
Paul
Adam
2021-02-06 14:56:58 UTC
Permalink
Post by Adam
Post by Paul
Post by Adam
COMMAND %MEM RSS
nautilus 23.5 1867636
NetworkManager 7.4 594380
wpa_supplicant 6.1 490664
thunderbird 4.9 390432
unity-panel-ser 0.5 45048
This is after closing Nautilus. Why ?
Is Nautilus supposed to be running when you're
not using it ?
Not behaviour I expect.
Post by Paul
Did you start a file search, then dismiss the window ?
Don't remember. Possibly.
Post by Paul
Perhaps the process is a windowless runaway.
If so, not good.
Post by Paul
I vaguely remember mention of some file manager
being naughty, if you start a file search, then
close the window. The parent process might then live
on, when it's not supposed to.
Is it safe to kill the process ?
Post by Paul
Paul
***@ASUS-N550JX:~$ history | grep gnome
242 sudo apt-get install gnome-shell
253 sudo apt-get install vim-gnome
270 gnome-volume-control
271 sudo apt-get install gnome-volume-control

Could any of this be related ? I know gnome-shell has memory leak issues.
But, I don't see gnome-shell in the ps list. Synaptic lists gdm package to
be removed along with gnome-shell. What functionality would I break ?
It doesn't look like gnome-shell is being used.
Paul
2021-02-06 18:06:29 UTC
Permalink
Post by Adam
Post by Adam
Post by Paul
Post by Adam
COMMAND %MEM RSS
nautilus 23.5 1867636
NetworkManager 7.4 594380
wpa_supplicant 6.1 490664
thunderbird 4.9 390432
unity-panel-ser 0.5 45048
This is after closing Nautilus. Why ?
Is Nautilus supposed to be running when you're
not using it ?
Not behaviour I expect.
Post by Paul
Did you start a file search, then dismiss the window ?
Don't remember. Possibly.
Post by Paul
Perhaps the process is a windowless runaway.
If so, not good.
Post by Paul
I vaguely remember mention of some file manager
being naughty, if you start a file search, then
close the window. The parent process might then live
on, when it's not supposed to.
Is it safe to kill the process ?
Post by Paul
Paul
242 sudo apt-get install gnome-shell
253 sudo apt-get install vim-gnome
270 gnome-volume-control
271 sudo apt-get install gnome-volume-control
Could any of this be related ? I know gnome-shell has memory leak issues.
But, I don't see gnome-shell in the ps list. Synaptic lists gdm package to
be removed along with gnome-shell. What functionality would I break ?
It doesn't look like gnome-shell is being used.
When something runs off with your memory, you have
a number of choices.

1) Find the command that requests that all applications
"shed weight". Not appropriate in this case, as there's
no evidence this zombie is "working for us".

2) Use "kill -9 <PIDvalue>" to kill the process.
The 9 is a signal. The 9 can't be intercepted.
"It's hammer time" so to speak. You can use sudo
for things owned by root. There are also
signal values which are "more polite" and allow
a process to put away its toys first.

3) Or, use reboot to stop it that way.

I didn't see nautilus running as a backgrounder
here, so assume yours is a rogue/zombie/runaway etc.

It's unlikely to have command line parameters passed
to it. I do that sometimes, but not that often. Most
people would launch Nautilus by clicking an icon in
the DE.

nautilus /path/to/dir

nautilus smb://192.168.1.1/sambadisk

The latter format is for cases where a redesign of
a file manager, leaves it with no onscreen space
to enter a URI. Neither of these is noteworthy in
the current situation.

I'm not going to contemplate the killing of random
things in your DE for sport :-) Let's just stick
with the current target.

https://man7.org/linux/man-pages/man7/signal.7.html

SIGKILL 9 "Blammo!"

"The signals SIGKILL and SIGSTOP cannot be caught,
blocked, or ignored."

That's for cases where a process does not respond when
we ask nicely. You need a signal flavor in that case,
which returns control to the user.

https://man7.org/linux/man-pages/man1/kill.1.html

"If no signal is specified, the TERM signal is sent."

And that's the polite knock on the door, and troublemakers
will ignore that.

sudo kill <PIDvalue> # "Knock, knock, Avon calling"
# SIGTERM can be intercepted.

True zombies, the zombie state is an intermediate state,
never intended for users to see. Yet, in the past, in
*all* OSes, they have manifested (I've seen the zombie state
in Windows). They also can't be killed, because... they're
in the process of dying, and the chance to kick them in
the nuts is over. A reboot will harvest technical zombies.
I also carelessly refer to "still living pests" as zombies,
to connote their unwillingness to listen to reason. But there
is actually a process state of "zombie" as well. And those
are in the netherworld, their resources half-harvested
perhaps. This is obviously a bug, but a carefully orchestrated
bug nonetheless. You can imagine as a server operator needing
24/7 service, you would not appreciate something like that.
(Server operators hate to reboot.)

Paul
Anton Ertl
2021-02-06 18:47:33 UTC
Permalink
Post by Paul
True zombies, the zombie state is an intermediate state,
never intended for users to see.
In Unix, zombies are terminated processes that the parent does not yet
wait() for. They consume an entry in the process table (and a PID)
for holding the exit status until the parent actually wants that data
by wait()ing for it. So a zombie is not particularly expensive or
worrysome.

- anton
--
M. Anton Ertl Some things have to be seen to be believed
***@mips.complang.tuwien.ac.at Most things have to be believed to be seen
http://www.complang.tuwien.ac.at/anton/home.html
Adam
2021-02-07 07:36:26 UTC
Permalink
Post by Anton Ertl
Post by Paul
True zombies, the zombie state is an intermediate state,
never intended for users to see.
In Unix, zombies are terminated processes that the parent does not yet
wait() for. They consume an entry in the process table (and a PID)
for holding the exit status until the parent actually wants that data
by wait()ing for it. So a zombie is not particularly expensive or
worrysome.
- anton
Strange but simply running nautilus again seems to improve memory usage (without rebooting or anything else).

***@ASUS-N550JX:~$ ps -A --sort -rss -o comm,pmem,rss | head -n 6
COMMAND %MEM RSS
NetworkManager 6.5 516116
wpa_supplicant 6.4 507952
chromium-browse 5.2 413400
nautilus 5.0 403992
compiz 0.4 38224

Thanks, ALL !!
Gordon
2021-02-07 07:34:50 UTC
Permalink
Post by Adam
COMMAND %MEM RSS
nautilus 23.5 1867636
NetworkManager 7.4 594380
wpa_supplicant 6.1 490664
thunderbird 4.9 390432
unity-panel-ser 0.5 45048
This is after closing Nautilus. Why ?
Because it is still in memory, as the memory is not required for current
use it is still taking up that space. However it will get the boot should
that memory be needed. Of course you might open up nautilus in which case it
will be there faster than if it had to come of the hard/SSD.

Think of it this way. You paid for the RAM, you want the machine to use it
all to get $/GB.
Adam
2021-02-07 12:40:23 UTC
Permalink
Post by Gordon
Post by Adam
COMMAND %MEM RSS
nautilus 23.5 1867636
NetworkManager 7.4 594380
wpa_supplicant 6.1 490664
thunderbird 4.9 390432
unity-panel-ser 0.5 45048
This is after closing Nautilus. Why ?
Because it is still in memory, as the memory is not required for current
use it is still taking up that space. However it will get the boot should
that memory be needed. Of course you might open up nautilus in which case it
will be there faster than if it had to come of the hard/SSD.
Think of it this way. You paid for the RAM, you want the machine to use it
all to get $/GB.
Yep, makes sense.

OT, I've notices that nautilus takes a long time to load. I have tons of files,
especially in the home directory. So, my directory structure is very wide and not very deep.
Would nautilus load faster for deep hierarchies than wide hierarchies ? Anyone ?
If deep hierarchies load faster, I may organize files differently.
Paul
2021-02-07 17:23:37 UTC
Permalink
Post by Adam
Post by Gordon
Post by Adam
COMMAND %MEM RSS
nautilus 23.5 1867636
NetworkManager 7.4 594380
wpa_supplicant 6.1 490664
thunderbird 4.9 390432
unity-panel-ser 0.5 45048
This is after closing Nautilus. Why ?
Because it is still in memory, as the memory is not required for current
use it is still taking up that space. However it will get the boot should
that memory be needed. Of course you might open up nautilus in which case it
will be there faster than if it had to come of the hard/SSD.
Think of it this way. You paid for the RAM, you want the machine to use it
all to get $/GB.
Yep, makes sense.
OT, I've notices that nautilus takes a long time to load. I have tons of files,
especially in the home directory. So, my directory structure is very
wide and not very deep.
Would nautilus load faster for deep hierarchies than wide hierarchies ?
Anyone ?
If deep hierarchies load faster, I may organize files differently.
You "can't beat the tax man".

Going the deep tree route, doubles the size of what
you can do, which is hardly scalable and won't win
a Nobel Prize.

You must know by now, that what File Managers do, sucks
by design.

The sad part, is it's the Wikipedia articles that mislead
people. They see an article that says "EXT4 can hold a
gazillion files", and then they go around with this big
grin on their face "I'm going to download a gazillion
files, knowing everything in the computer just loves
this stuff". You will soon discover the machine creaks
and groans, before it even gets remotely close to the
limit. The heat death of the universe will happen,
before the File Manager displays all the files at
the same time :-)

<Patient> "Doctor, it hurts when I do this"
<Doctor> "What, are you here *again* ?" (that's my doctor)

Paul
Adam
2021-02-07 17:34:06 UTC
Permalink
Post by Paul
Post by Adam
Post by Gordon
Post by Adam
COMMAND %MEM RSS
nautilus 23.5 1867636
NetworkManager 7.4 594380
wpa_supplicant 6.1 490664
thunderbird 4.9 390432
unity-panel-ser 0.5 45048
This is after closing Nautilus. Why ?
Because it is still in memory, as the memory is not required for current
use it is still taking up that space. However it will get the boot should
that memory be needed. Of course you might open up nautilus in which case it
will be there faster than if it had to come of the hard/SSD.
Think of it this way. You paid for the RAM, you want the machine to use it
all to get $/GB.
Yep, makes sense.
OT, I've notices that nautilus takes a long time to load. I have tons of files,
especially in the home directory. So, my directory structure is very wide and not very deep.
Would nautilus load faster for deep hierarchies than wide hierarchies ? Anyone ?
If deep hierarchies load faster, I may organize files differently.
You "can't beat the tax man".
Can't beat the File Manager man either, huh ? :-)
Post by Paul
Going the deep tree route, doubles the size of what
you can do, which is hardly scalable and won't win
a Nobel Prize.
You must know by now, that what File Managers do, sucks
by design.
The sad part, is it's the Wikipedia articles that mislead
people. They see an article that says "EXT4 can hold a
gazillion files", and then they go around with this big
grin on their face "I'm going to download a gazillion
files, knowing everything in the computer just loves
this stuff". You will soon discover the machine creaks
and groans, before it even gets remotely close to the
limit. The heat death of the universe will happen,
before the File Manager displays all the files at
the same time :-)
<Patient> "Doctor, it hurts when I do this"
<Doctor> "What, are you here *again* ?" (that's my doctor)
Paul
Andrei Z.
2021-02-08 06:35:29 UTC
Permalink
Post by Gordon
Post by Adam
COMMAND %MEM RSS
nautilus 23.5 1867636
NetworkManager 7.4 594380
wpa_supplicant 6.1 490664
thunderbird 4.9 390432
unity-panel-ser 0.5 45048
This is after closing Nautilus. Why ?
Because it is still in memory, as the memory is not required for current
use it is still taking up that space. However it will get the boot should
that memory be needed. Of course you might open up nautilus in which case it
will be there faster than if it had to come of the hard/SSD.
Think of it this way. You paid for the RAM, you want the machine to use it
all to get $/GB.
Keeping files in RAM
https://distrowatch.com/weekly.php?issue=20210208#qa

vmtouch is a tool for learning about and controlling the file system
cache of unix and unix-like systems.
https://hoytech.com/vmtouch/
https://github.com/hoytech/vmtouch

:~$ apt show vmtouch

Loading...