Created attachment 184761 [details] Ram usage after fresh boot SUMMARY After a fresh boot, the DiscoverNotifier process usually uses over 340MBs of RAM. That's more than Plasmashell, which uses around 250MBs, or even Discover itself, that uses around 280MBs. I don't think it makes sense for it to use more RAM than the entirety of Plasmashell, so there must be a bug somewhere. STEPS TO REPRODUCE 1. Start the computer normally 2. Check the Details tab on System Monitor and sort by RAM usage OBSERVED RESULT The DiscoverNotifier process uses more RAM than any other process on the system, including Plasmashell, Kwin or Discover itself. EXPECTED RESULT A more reasonable RAM usage considering its function. SOFTWARE/OS VERSIONS Operating System: Fedora Linux 42 KDE Plasma Version: 6.4.4 KDE Frameworks Version: 6.17.0 Qt Version: 6.9.1 Kernel Version: 6.16.4-200.fc42.x86_64 (64-bit) Graphics Platform: Wayland Processors: 4 × Intel® Core™ i3-1005G1 CPU @ 1.20GHz Memory: 12 GiB of RAM (11.4 GiB usable) Graphics Processor: Intel® UHD Graphics Manufacturer: HP Product Name: HP 246 G7 Notebook PC
Update: it seems it only uses so much RAM when there are updates available. Without any updates it's sitting at 26MBs. I'm sure it wasn't a one off thing though because I often check for RAM consumption and the process usually sits at over 300MBs. I might have to investigate further.
(In reply to guimarcalsilva from comment #0) > Created attachment 184761 [details] > Ram usage after fresh boot > > SUMMARY > After a fresh boot, the DiscoverNotifier process usually uses over 340MBs of > RAM. That's more than Plasmashell, which uses around 250MBs, or even > Discover itself, that uses around 280MBs. I don't think it makes sense for > it to use more RAM than the entirety of Plasmashell, so there must be a bug > somewhere. > > STEPS TO REPRODUCE > 1. Start the computer normally > 2. Check the Details tab on System Monitor and sort by RAM usage > > OBSERVED RESULT > The DiscoverNotifier process uses more RAM than any other process on the > system, including Plasmashell, Kwin or Discover itself. > > EXPECTED RESULT > A more reasonable RAM usage considering its function. > > SOFTWARE/OS VERSIONS > Operating System: Fedora Linux 42 > KDE Plasma Version: 6.4.4 > KDE Frameworks Version: 6.17.0 > Qt Version: 6.9.1 > Kernel Version: 6.16.4-200.fc42.x86_64 (64-bit) > Graphics Platform: Wayland > Processors: 4 × Intel® Core™ i3-1005G1 CPU @ 1.20GHz > Memory: 12 GiB of RAM (11.4 GiB usable) > Graphics Processor: Intel® UHD Graphics > Manufacturer: HP > Product Name: HP 246 G7 Notebook PC Hi, I'm not sure this is actionable by KDE developers. I'm not exactly sure what "too much RAM" entails, but please understand that there is a constant effort to improve things behind the scenes. Can you share why exactly you think that ~300MB of RAM usage is an issue on a system that has 12GB of memory? Thanks.
(In reply to john.liptrot from comment #2) > (In reply to guimarcalsilva from comment #0) > > Created attachment 184761 [details] > > Ram usage after fresh boot > > > > SUMMARY > > After a fresh boot, the DiscoverNotifier process usually uses over 340MBs of > > RAM. That's more than Plasmashell, which uses around 250MBs, or even > > Discover itself, that uses around 280MBs. I don't think it makes sense for > > it to use more RAM than the entirety of Plasmashell, so there must be a bug > > somewhere. > > > > STEPS TO REPRODUCE > > 1. Start the computer normally > > 2. Check the Details tab on System Monitor and sort by RAM usage > > > > OBSERVED RESULT > > The DiscoverNotifier process uses more RAM than any other process on the > > system, including Plasmashell, Kwin or Discover itself. > > > > EXPECTED RESULT > > A more reasonable RAM usage considering its function. > > > > SOFTWARE/OS VERSIONS > > Operating System: Fedora Linux 42 > > KDE Plasma Version: 6.4.4 > > KDE Frameworks Version: 6.17.0 > > Qt Version: 6.9.1 > > Kernel Version: 6.16.4-200.fc42.x86_64 (64-bit) > > Graphics Platform: Wayland > > Processors: 4 × Intel® Core™ i3-1005G1 CPU @ 1.20GHz > > Memory: 12 GiB of RAM (11.4 GiB usable) > > Graphics Processor: Intel® UHD Graphics > > Manufacturer: HP > > Product Name: HP 246 G7 Notebook PC > > Hi, > > I'm not sure this is actionable by KDE developers. > > I'm not exactly sure what "too much RAM" entails, but please understand that > there is a constant effort to improve things behind the scenes. > > Can you share why exactly you think that ~300MB of RAM usage is an issue on > a system that has 12GB of memory? > > Thanks. It's because that's not the normal amount of RAM that process uses usually. Normally it's around 50MBs but for some reason I cannot pinpoint it shoots up to over 300MBs. The notifier process in that case uses more RAM than the entirety of Plasma Shell or even the full Discover application. If there's a tutorial somewhere teaching how to debug memory usage I could try to get some more actionable debug information.
> It's because that's not the normal amount of RAM that process uses usually. > Normally it's around 50MBs but for some reason I cannot pinpoint it shoots > up to over 300MBs. The notifier process in that case uses more RAM than the > entirety of Plasma Shell or even the full Discover application. > > If there's a tutorial somewhere teaching how to debug memory usage I could > try to get some more actionable debug information. Hi, Are you saying that in the past 50MB of RAM usage was used, even when checking for/installing updates, and suddenly it is using 300+MB? Because that would be interesting and worth looking into. If it has always been that way, it is unlikely to be a bug. On my system, I opened Discover to find 627.8MB of pending updates. I checked system Monitor, Discover shows 254.7MB of RAM usage. For the 'expected outcome' in your original bug report, you wrote "A more reasonable RAM usage considering its function." What is a "reasonable amount" of RAM? What exactly is a "normal" amount of RAM? How much RAM is "too much" RAM? I'd love to help, but I don't know exactly how this is actionable. Do you have any reason to believe that this is a bug?
>Are you saying that in the past 50MB of RAM usage was used, even when checking for/installing updates, and suddenly it is using 300+MB? Because that would be interesting and worth looking into. Yes. It's usually under 50MBs, but sometimes I find it using >280MBs for no known reason. To be honest I haven't for sure confirmed updates to be the cause. Just now I made Discover look for updates and it was still using around 41MBs, even with updates available. I don't know exactly what causes the RAM usage to spike so high and stay high. Maybe it's some kind of memory leak? But then I don't know why sometimes it's high after a fresh boot and sometimes it's fine. Maybe when can keep this issue open for some more time until Fedora gets Plasma 6.5. I'll keep the NEEDSINFO tag and if I can't find anything to help solve this then it will get closed automatically in a month, I think. I'll look into finding a way to capture some useful info about the process when the issue happens again in the meantime.
*** Bug 473310 has been marked as a duplicate of this bug. ***
300 MB is more than what all of Plasmashell uses on my system half the time. It's definitely excessive for a tiny status notifier icon.
Created attachment 185790 [details] pmap -x of DiscoverNotifier I don't know if this is useful but here goes a pmap -x of DiscoverNotifier when it's using tons of RAM
Created attachment 185791 [details] Verbose pmap Verbose version of pmap
I tried attaching KDE's Heaptrack to the faulty DiscoverNotifier but the log always came back empty. I can get a trace when I start a new process but then in System Monitor it shows the process is consuming a normal amount of RAM. Any tips to be able to get a trace from the running process? I used "heaptrack --pid $(pidof DiscoverNotifier)" when I got an empty log, and "HEAPTRACK_ENABLE_DEBUGINFOD=1 heaptrack /usr/libexec/DiscoverNotifier" for a new process.
I managed to get a trace from KDE's Heaptrack. I kept trying to trace DiscoverNotifier from a fresh process (since I couldn't attach Heaptrack to a running process) and after many tries I managed to make DiscoverNotifier consume over 350 MBs. When I checked Discover, new updates were available, so that means the problem is definitely linked to updates. The trace is over 22MBs, so I can't attach it, but I'll link it from my Google Drive. Hopefully this won't get marked as spam: https://drive.google.com/file/d/1ltSYZSAvcKzIfqJXGWJvJbLVrxzSG0SI/view?usp=sharing
Created attachment 185826 [details] High memory usage that does not get freed This screenshot shows the moment I got the trace. The memory never got freed after going up.
Sorry, I forgot to add to the last comment that the memory never got freed even AFTER updating. Usually during daily usage I can easily spot DiscoverNotifier in the 300MBs even hours after the system has booted up and updated.
Created attachment 186353 [details] Heaptrack screenshot I decided to take a look at the file. I don't have the technical expertise to understand exactly what's happening, but apparently some kind of XML parser is (one of) the culprits for the huge memory consumption. Now, the question that stands is: Why does discover-notifier needs to parse so much data (from the package metadata?) just to show the number of available updates? Could there be a cheaper way to show how many updates are available?
(In reply to guimarcalsilva from comment #14) > Created attachment 186353 [details] > Heaptrack screenshot > > I decided to take a look at the file. I don't have the technical expertise > to understand exactly what's happening, but apparently some kind of XML > parser is (one of) the culprits for the huge memory consumption. Now, the > question that stands is: Why does discover-notifier needs to parse so much > data (from the package metadata?) just to show the number of available > updates? Could there be a cheaper way to show how many updates are available? Also, even if that process is needed, couldn't it unload that data at some point when it's not needed anymore?