You are not logged in.

#1 2015-09-14 05:23:31

rowra
Member
Registered: 2015-08-30
Posts: 24

[solved] Memory leak? Or is this amount of memory usage normal?

I have a bare Arch system with Gnome3, hardly any other things installed and my memory usage is typically 6-700Mb just being in the desktop. (Now firefox eats another like 400MB but that I don't really care I doubt it's Arch related)
So is this normal? I'm posting stats:

/proc/meminfo

MemTotal:        3952932 kB
MemFree:         2533052 kB
MemAvailable:    3133100 kB
Buffers:           51568 kB
Cached:           660264 kB
SwapCached:            0 kB
Active:           739496 kB
Inactive:         466776 kB
Active(anon):     495440 kB
Inactive(anon):   185768 kB
Active(file):     244056 kB
Inactive(file):   281008 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:              1208 kB
Writeback:             0 kB
AnonPages:        494416 kB
Mapped:           203956 kB
Shmem:            186764 kB
Slab:             130276 kB
SReclaimable:     104372 kB
SUnreclaim:        25904 kB
KernelStack:        5104 kB
PageTables:        20268 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     1976464 kB
Committed_AS:    2490304 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      371656 kB
VmallocChunk:   34358947836 kB
HardwareCorrupted:     0 kB
AnonHugePages:    253952 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       77336 kB
DirectMap2M:     4018176 kB

free -m

              total        used        free      shared  buff/cache   available
Mem:           3860         564        2454         201         841        3040
Swap:             0           0           0

htop (ordered by mem)
http://i.imgur.com/ADdmceL.png



-- mod edit: read the Forum Etiquette and only post thumbnails http://wiki.archlinux.org/index.php/For … s_and_Code [jwr] --

Last edited by rowra (2015-09-14 20:03:12)

Offline

#2 2015-09-14 06:20:06

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [solved] Memory leak? Or is this amount of memory usage normal?

Not a Sysadmin issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2015-09-14 10:09:45

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [solved] Memory leak? Or is this amount of memory usage normal?

I don't see any signs of memory leak there, but it looks like you were simultaneously running six separate gnome sessions.

Offline

#4 2015-09-14 10:24:00

ayekat
Member
Registered: 2011-01-17
Posts: 1,618

Re: [solved] Memory leak? Or is this amount of memory usage normal?

@ooo: I guess those are just threads of one single process - htop could be configured to either highlight threads in a different colour or to hide them.

GNOME is quite a... feature-rich desktop environment - so if eats a lot of memory, I'm not that surprised (however I don't use it, so I couldn't tell if those values are normal).
If there were a serious memory leak, the amount of used memory would increase over time. Do you experience that?

Last edited by ayekat (2015-09-14 10:24:43)


pkgshackscfgblag

Offline

#5 2015-09-14 10:24:36

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,702
Website

Re: [solved] Memory leak? Or is this amount of memory usage normal?

Gnome-shell is a memory hog and in my experience it also leaks.  To be fair, I haven't used it since 2012; you are welcome to try it with my script and report back: https://bbs.archlinux.org/viewtopic.php?id=122269


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#6 2015-09-14 10:36:25

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [solved] Memory leak? Or is this amount of memory usage normal?

That's "normal" for a "modern" desktop. As a dirty comparison, my Windows 10 Desktop with nothing but drivers, laptop hotkey tools, a clipboard manager and three lines in autohotkey devours 2,4 GiB. It looks like the "memory is cheap" mantra is a fundamental design principle these days.

Offline

#7 2015-09-14 10:51:17

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [solved] Memory leak? Or is this amount of memory usage normal?

You also seem to have two sets of many processes running (X's and Xwayland's?). Evolution's calendar or somesuch also eats some memory.

Offline

#8 2015-09-14 10:53:39

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [solved] Memory leak? Or is this amount of memory usage normal?

lucke wrote:

You also seem to have two sets of many processes running (X's and Xwayland's?). Evolution's calendar or somesuch also eats some memory.

Wise men say: He who reads thread learns about threads.

Offline

#9 2015-09-14 11:05:08

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [solved] Memory leak? Or is this amount of memory usage normal?

Do gnome-shell run by user mark and gnome-shell run by user gdm look like threads to you? Are mark's and gdm's gnome-settings threads?

I haven't touched Wayland.

Offline

#10 2015-09-14 11:29:57

Soukyuu
Member
Registered: 2014-04-08
Posts: 854

Re: [solved] Memory leak? Or is this amount of memory usage normal?

Awebb wrote:

That's "normal" for a "modern" desktop. As a dirty comparison, my Windows 10 Desktop with nothing but drivers, laptop hotkey tools, a clipboard manager and three lines in autohotkey devours 2,4 GiB. It looks like the "memory is cheap" mantra is a fundamental design principle these days.

I'm pretty sure about half of that is cache. My clean installation of Win10 eats about 1.3GB, plus a certain amount of RAM cache, totalling at about 3GB. Compared to that, my rather full KDE installation eats about 900MB RAM, with about 165MB RAM usage coming from anything- and profile-sync-deamons.


[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]

Offline

#11 2015-09-14 11:38:01

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [solved] Memory leak? Or is this amount of memory usage normal?

Ah, I was talking about your "many processes". Lost in ambiguity, then.  Well, that's how Gnome works. You might notice, that there is no gdm binary in that list, but a gnome-shell process with --mode=gdm running as the user gdm. The gnome-settings-daemon also runs for every user running a gnome-shell, so this is normal, too. I think OP might be able to squeeze out another 50-60MiB, if the session was a pure X session, because half of the applications will still need X.

Soukyuu wrote:
Awebb wrote:

That's "normal" for a "modern" desktop. As a dirty comparison, my Windows 10 Desktop with nothing but drivers, laptop hotkey tools, a clipboard manager and three lines in autohotkey devours 2,4 GiB. It looks like the "memory is cheap" mantra is a fundamental design principle these days.

I'm pretty sure about half of that is cache. My clean installation of Win10 eats about 1.3GB, plus a certain amount of RAM cache, totalling at about 3GB. Compared to that, my rather full KDE installation eats about 900MB RAM, with about 165MB RAM usage coming from anything- and profile-sync-deamons.

Clean install 1,3 GiB, logitech gaming drivers, laptop utilities, NVIDIA drivers, Shadowplay, Experience... a reasonable 2,4 GiB. It's about 4,4 GiB cached.

Last edited by Awebb (2015-09-14 11:40:51)

Offline

#12 2015-09-14 13:21:06

rowra
Member
Registered: 2015-08-30
Posts: 24

Re: [solved] Memory leak? Or is this amount of memory usage normal?

graysky I'll try your script thanks

Well I can compare pretty well as I *needed to* install Windows (either 8.1 or 10) for one of my curses at the university (yay). It consumed almost 1Gb of ram with literally no thing running, having done nothing, extremely clean and fresh pure install. As soon as I start launching stuff as basic as explorer and edge it goes clearly about the magical 1gig and it has nothing like the gnome animations etc so I'm not whining I just thought this was too much.

Also I have no clue why it shows those processes so many times if I set up htop to show a "tree view" they seem to be different etc but then again I did nothing but install the gnome package. The whole of it, as if I leave out just a single one of it my usb keyboard/mouse freezes at gdm login. Awful. But no better alternative for me for now.

Offline

#13 2015-09-14 16:23:55

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [solved] Memory leak? Or is this amount of memory usage normal?

ayekat wrote:

@ooo: I guess those are just threads of one single process - htop could be configured to either highlight threads in a different colour or to hide them.

that makes more sense :) I never used htop so I was confused of the output.

I think ~150MB for gnome-shell is quite normal, and in my experience it shouldn't consume more than 200MB, or you might be experiencing some more serious memory leak. You can always restart the shell by entering 'r' to the run command dialog (Alt-f2). After that gnome-shell uses ~80MB on my system.

You still got more than 3 gigs of free RAM, so IMHO you really shouldn't be that worried about it.

Offline

#14 2015-09-14 17:56:33

rowra
Member
Registered: 2015-08-30
Posts: 24

Re: [solved] Memory leak? Or is this amount of memory usage normal?

@ooo it's not that I'm worried about running out of memory. That will never happen I do not do anything hardcore other than gcc/g++ .. it's that I want Arch to do what it's best at: be minimal. Well I know it's Gnome at fault (hopefully?) but still.

Anyway, Gnome, the whole bloat all together, uses A LOT more than 150MB. Try 500Mb and you're getting there. Here is a pic of disabled GDM aka no booting into any graphical UI:
2G7olAB.jpg
115MB memory used, 16 tasks running. This is Arch after boot and logging in. Is that reasonable / okay btw? Just so I know where to go on a journey to look for "my lost memory"
And with gnome: 73 tasks and 659MB memory used.
With firefox open (5 tabs, 2 Arch forum 2 imgur 1 fb, nothnig very consuming imo?), that grows to 1238MB.

Again, not trying to be way too crazy about things I couldn't care less as long as they're normal. But are they?
Is ~100-120MB memory usage ok by a plain linux without graphical ui or doing anything in particular?
Is ~6-700MB memory usage and ~70tasks ok with gnome?
Is 1200MB+ ok with gnome and firefox and a few casual tabs open?


*edit: I managed to reduce by almost 200MB just by disabling GDM and starting gnome shell manually/xinitrc. Thats totally worth it. But still. Are my numbers normal?

Last edited by rowra (2015-09-14 18:11:51)

Offline

#15 2015-09-14 19:41:46

dice
Member
From: Germany
Registered: 2014-02-10
Posts: 413

Re: [solved] Memory leak? Or is this amount of memory usage normal?

I don't think there is anything wrong with your memory usage.
Just for comparison on my machine:
fresh boot without X: 130M with 21 Tasks. Biggest memory usage caused by polkit and networkmanager.
Cinnamon/session started by lightdm: 460M with 61 tasks. Biggest hogs are cinnamon and Xorg

Cinnamon is not Gnome so this does not match. I would expect cinnamon to be a little less than Gnome so from my point of view it fits well. Gnome is heavy on memory.

Regarding firefox I got the suspicion that the recent versions are slightly leaking when you open and close a lot of tabs, i.e. it does not free all memory that was used for the tab. I didn't investigate further yet.


I put at button on it. Yes. I wish to press it, but I'm not sure what will happen if I do.  (Gune | Titan A.E.)

Offline

#16 2015-09-14 20:02:43

rowra
Member
Registered: 2015-08-30
Posts: 24

Re: [solved] Memory leak? Or is this amount of memory usage normal?

@dice  okay, thanks. I guess I'm marking it solved due to all the reassurances

Offline

Board footer

Powered by FluxBB