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

            Bug ID: 462438
           Summary: KWin huge memory usage after alt-tabbing for some time
    Classification: Plasma
           Product: kwin
           Version: 5.26.3
          Platform: Manjaro
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: core
          Assignee: kwin-bugs-n...@kde.org
          Reporter: ed...@inbox.lv
  Target Milestone: ---

Created attachment 154167
  --> https://bugs.kde.org/attachment.cgi?id=154167&action=edit
kwin alt-tab + memory ussage video

SUMMARY
KWin uses a LOT of memory when doing alt-tab for some time.
This is what I have observed.

I rarely restart the system and lately had to alt-tab quite a lot, then
everything started to stutter a lot. Investigation showed that all memory was
used up and almost all swap space too. Before investigation, I turned off swap.

At that time checking out xrestop showed that kwin used 5GB of pixmaps (if I
remember right), free -hw showed that "shared" was used for 15GB, after
restarting kwin, all freed up, memory was back to normal, that is "shared" to
3.5GB and xrestop showed some 300MB pixmap usage.

Since this is built-in graphics adapter, main memory is shared between system
and gpu, this is why, I think, all memory went to "shared" portion and I was
not able to detect this earlier.

So, I wrote a script which did alt-tabbing for me, opened 25 kwrite windows and
recorded a video which shows start of the alt-tabbing and the end of
alt-tabbing.
As you'll be able to see, memory increases A LOT, 300 times alt-tab increased
used pixmap memory from 300MB to 3GB and "shared" portion of used memory from
3.7GB to 8.7GB.

This is with modesetting driver, X11. Restarting kwin helps for a while.

If you need more tests, please ask. I'll attach video and script to this
report.
Sorry for video quality but I can not upload larger video to bug report,
anyhow, this should suffice.

STEPS TO REPRODUCE
1. work as usual
2. alt-tab for a while
3. observe how memory gets used up

OBSERVED RESULT
Huge memory usage

EXPECTED RESULT
Normal memory usage

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
Operating System: Manjaro Linux
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7
Kernel Version: 6.0.7-linux-mjasnik-pds-20221106 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Memory: 31,2 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 530
Manufacturer: Dell Inc.
Product Name: XPS 15 9550

ADDITIONAL INFORMATION
When using simple task switcher (without thumbnails), kwin eats memory at quite
a lower pace.
It appears that it eats memory proportionally how many window thumbnails are
shown on alt-tab popup.

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

Reply via email to