https://bugs.kde.org/show_bug.cgi?id=502013

            Bug ID: 502013
           Summary: Excessive memory usage (15-100MB per window)
    Classification: Plasma
           Product: kwin
           Version: 6.3.2
          Platform: Debian testing
                OS: Linux
            Status: REPORTED
          Severity: major
          Priority: NOR
         Component: performance
          Assignee: kwin-bugs-n...@kde.org
          Reporter: parav...@debian.org
  Target Milestone: ---

STEPS TO REPRODUCE
1. for i in $(seq 1 50); do alacritty & done
2. killall alacritty

(or any terminal application of your choice)

OBSERVED RESULT

After (1) and with the windows still open (whether visible or not), resident
memory of the kwin_wayland process rises from e.g. ~600MB to 1300MB. Basically
for every window spawned, memory rises by 15MB. (This happens even with one
window, but is much more evident if you spawn 50-100 windows as above).

This seems to be dependent (perhaps proportional?) to the window size. This
figure is for a 80x24 terminal. 
If instead of alacritty I do "for i in $(seq 1 50); do terminator --maximize &
done" memory rises to 5GB resident, so ~90-100MB per window. (Obviously 80x24
is on the lower end of a typical window size. Larger window sizes are typical
for e.g. browser windows.)

After (2), resident memory lowers again significantly, but not entirely, i.e.
there is probably a leak somewhere. About ~3MB per process remains. This isn't
significant but it adds up over time. Sometimes this added memory usage gets
freed up after a while all at once much later, so going from e.g. 800MB
resident usage back to 600MB. I'm not sure when or how juet yet.

(I had previously commented on 496469 which describes a memory leak. I believe
this now to be a separate issue)

EXPECTED RESULT

I'm not sure what is considered "normal" here, but 15-100MB per active window
(irrespective of whether it's visible or not!) feels quite excessive to me. I
use multiple workspaces and typically have dozens of windows open hidden from
view in some workspace, mostly terminals and browser windows. I regularly see
kwin consuming 1-4 GB of RAM.

The memory leak is probably a separate/orthogonal issue, but contributes to
this as it creates even more memory pressure over time.

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux 12
KDE Plasma Version: 6.3.2
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.12.19-amd64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i7-1185G7 @ 3.00GHz
Memory: 31.1 GiB of RAM
Graphics Processor: Mesa Intel® Iris® Xe Graphics 

If it matters my resolution is 3840x2160 with scaling factor 2.

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to