Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Testing - Bookworm] using twice the memory bullseye needed

- - ALL UNSTABLE / TESTING THREADS SHOULD BE POSTED HERE - -
This sub-forum is the dedicated area for the ongoing Unstable/Testing releases of Debian. Advanced, or Experienced User support only. Use the software, give, and take advice with caution.
Post Reply
Message
Author
baldyeti
Posts: 22
Joined: 2013-04-23 09:33
Has thanked: 1 time

[Testing - Bookworm] using twice the memory bullseye needed

#1 Post by baldyeti »

Hello, i have recently upgraded a bullseye installation to bookworm. It mostly went well, but under debian 12 the same system is using about twice the memory it needed before. That is to say, about 550M in text mode and 1.1G under plasma.

This is a 4th gen i3 system (and using Intel HD).

Code: Select all

CPU: dual core Intel Core i3-4150 (-MT MCP-) speed/min/max: 798/800/3500 MHz
Kernel: 6.1.0-6-amd64 x86_64 Up: 2m Mem: 1798.3/7862.4 MiB (22.9%)
Storage: 1.82 TiB (60.6% used) Procs: 227 Shell: Bash inxi: 3.3.25
Something that i noticed is that "htop" reports many processes as having several instances, even though pgrep only finds one.
e.g: under htop many (10+) instances of firefox or startplasma-x11 or kwin-x11 whereas pgrep only reports one

A similarly inflated memory consumption occurs when booting under the bullseye 5.10 kernel.
Can someone suggest what might be causing this ?

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2082
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 225 times

Re: [Testing - Bookworm] using twice the memory bullseye needed

#2 Post by FreewheelinFrank »

Saying your computer uses a lot of memory with Firefox running is like saying you car feels a bit heavy with an unspecified number of baby elephants sitting in the back.

Firefox can easily use 1.5G with multiple tabs open and active. Memory use depends on how many tabs you have open, what the content is, and if they are active.

Firefox recently introduced sandboxing for content from different sites, resulting in multiple processes. The Firefox ESR version has jumped from 91 to 102, so this could be the change you are seeing.

Aki
Global Moderator
Global Moderator
Posts: 2823
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 69 times
Been thanked: 385 times

Re: [Testing - Bookworm] using twice the memory bullseye needed

#3 Post by Aki »

Hello,

According to Debian Bookworm Install Guide [1], these are the recommended Minimum System Requirements:
Install TypeRAM (minimum)RAM (recommended)Hard Drive
No desktop256 megabytes512 megabytes2 gigabytes
With Desktop1 gigabytes2 gigabytes10 gigabytes
Therefore, it seems you are within specifications.

You could have installed or activated services that you don't need after the release upgrade. You can check memory usage by process to spot what you can remove or disable. You can use the smem command [2] to this extent; for example, absolute memory usage by process:

Code: Select all

smem 
or percentage memory utilization by process:

Code: Select all

smem -p
Hope that helps.

---
[1] https://www.debian.org/releases/bookwor ... 04.en.html
[2] https://packages.debian.org/search?keywords=smem
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

baldyeti
Posts: 22
Joined: 2013-04-23 09:33
Has thanked: 1 time

Re: [Testing - Bookworm] using twice the memory bullseye needed

#4 Post by baldyeti »

FreewheelinFrank wrote: 2023-03-25 09:58 Saying your computer uses a lot of memory with Firefox running is like saying you car feels a bit heavy with an unspecified number of baby elephants sitting in the back.
The figures i gave are straight after booting, running "free -h" either from a text console or konsole instance. The inxi report is with firefox running so i can post here.

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2082
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 225 times

Re: [Testing - Bookworm] using twice the memory bullseye needed

#5 Post by FreewheelinFrank »

Sounds about normal. XFCE takes about 900MB and Gnome 1.3GB on my laptop running Testing.

http://dontsurfinthenude.blogspot.com/2 ... pared.html

Multiple instances of Firefox as you can see.

Installations do get bigger over time. My old laptop runs XFCE on Wheezy with 500MB RAM. Don't think I'll get Bookworm on that.

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2029
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 139 times
Been thanked: 206 times

Re: [Testing - Bookworm] using twice the memory bullseye needed

#6 Post by Hallvor »

1,1 GB on Plasma on a clean desktop sounds very heavy. I did a fresh Bullseye install a couple of days ago when changing SSD, and memory usage with Plasma was around 500 MB.
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD

baldyeti
Posts: 22
Joined: 2013-04-23 09:33
Has thanked: 1 time

Re: [Testing - Bookworm] using twice the memory bullseye needed

#7 Post by baldyeti »

Hallvor wrote: 2023-03-25 12:20 1,1 GB on Plasma on a clean desktop sounds very heavy. I did a fresh Bullseye install a couple of days ago when changing SSD, and memory usage with Plasma was around 500 MB.
That was about my expectation, too. Perhaps a little higher but not double the memory from previous version.

I suspect this is a side effect from the upgrade process, but don't see any obvious culprit. dmesg is pretty normal (expect for a failed exim startup which IIRC was already happening previously).

User avatar
BBQdave
df -h | participant
df -h | participant
Posts: 152
Joined: 2011-09-25 03:38
Location: North Carolina
Has thanked: 9 times
Been thanked: 14 times

Re: [Testing - Bookworm] using twice the memory bullseye needed

#8 Post by BBQdave »

FreewheelinFrank wrote: 2023-03-25 11:40XFCE takes about 900MB and Gnome 1.3GB on my laptop running Testing. Multiple instances of Firefox...
Running Debian 11, Gnome. For comparison: Firefox multiple tabs, 1.5GB. Add Chrome (multiple tabs open) plus Firefox, 2.8GB.

Seems normal too.
On quest for blue smoke and red rings!
Debian 12 Toshiba Satellite C655 | i3 2.3Ghz | Intel HD Graphics 3000 | 8GB RAM | 65GB SSD

anticapitalista
Posts: 428
Joined: 2007-12-14 23:16
Has thanked: 12 times
Been thanked: 13 times

Re: [Testing - Bookworm] using twice the memory bullseye needed

#9 Post by anticapitalista »

Thee have been changes to how free measures memory.

Code: Select all

procps (2:4.0.2-1) unstable; urgency=medium

  * New libproc2 library moved into sid
    library: total new API
    free: Used field is now Total - Available
    free: Added Comitted memory option
    pgrep: -A to ignore ancestors
    pgrep: Can select version 2 cgroup paths
    ps: many new fields
    sysctl: Support systemd glob patterns
    sysctl: Check resolved path is under /proc/sys
    top: many new fields
    top: extra wide views for CPU and memory stats
    top: bottom window to display supplementary data

 -- Craig Small <csmall@debian.org>  Mon, 05 Dec 2022 21:59:09 +1100
antiX with runit - lean and mean.
https://antixlinux.com

baldyeti
Posts: 22
Joined: 2013-04-23 09:33
Has thanked: 1 time

Re: [Testing - Bookworm] using twice the memory bullseye needed

#10 Post by baldyeti »

anticapitalista wrote: 2023-03-26 09:25 Thee have been changes to how free measures memory.
Tx that could explain it (and i am seeing the same kind of increase for "top", too, which makes sense if both "free" and "top" rely on "libproc2")
Here are my figures from a just logged-in plasma session:

versionfree -htopsmem -u (USS/PSS/RSS)
bullseye467 M468M324/403/1107
bookworm1.1G1138M499/609/1583
Anyway i am not obsessing over these figures but was simply a bit surprised and curious to ask if someone had noticed a similar effect after upgrading.

User avatar
fabien
Forum Helper
Forum Helper
Posts: 621
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 60 times
Been thanked: 146 times

Re: [Testing - Bookworm] using twice the memory bullseye needed

#11 Post by fabien »

anticapitalista wrote: 2023-03-26 09:25

Code: Select all

    free: Used field is now Total - Available
I quickly saw this change but didn't quite understand what it meant (I mistook the - for a dash, not a minus sign).
The manuals clarify this point:

from man free in Bullseye:
used Used memory (calculated as total - free - buffers - cache)
from man free in Bookworm:
used Used or unavailable memory (calculated as total - available)
So the old value is still available for comparison at the cost of a little calculation.

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 557
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 76 times
Been thanked: 85 times

Re: [Testing - Bookworm] using twice the memory bullseye needed

#12 Post by wizard10000 »

anticapitalista wrote: 2023-03-26 09:25Thee have been changes to how free measures memory.
Thank you - I knew something like this happened but didn't know exactly what it was. I eventually figured out that the way Linux counted RAM use had changed but didn't know exactly what the change was.

edit: I saw what OP is talking about happen in Sid on three machines a couple of months ago. All three run openbox and all three had RAM use at idle double overnight. Spent a a fair bit of time chasing my tail trying to find out where the 400MB or so of RAM went. Turned out it didn't go anywhere :)

conky even released a {legacymem} option to display RAM using the old method and yes, I'm using it because displaying 800MB RAM used at idle in openbox is just annoying :mrgreen:
we see things not as they are, but as we are.
-- anais nin

User avatar
drokmed
Posts: 1162
Joined: 2007-10-03 19:24
Location: Saint Petersburg, FL

Re: [Testing - Bookworm] using twice the memory bullseye needed

#13 Post by drokmed »

The change is noticeable on fresh minimal installs too, on same hardware device:

Bullseye minimal no gui netinstall on bare metal: ~98 MB
Bookworm minimal no gui netinstall on bare metal: ~332 MB

The memory numbers in debian never really have added up, it can vary depending on which script or tool method you use.

The memory the apps are using seems to be the same though. Even with how reporting "free" has changed, I'm guessing the kernel and modules are taking up more now. Curious, but not enough to figure it out. It is what it is, until I get annoyed and keep digging.
Author of the Debian Linux Security Appliance Firewall howto, found here
Thread discussing it is here

Post Reply