Results 1 to 10 of 10

Thread: KDE memory use is high

  1. #1

    Angry KDE memory use is high

    openSUSE 13.2, uptime is 6 days. I've got Firefox open with 3 tabs and CrashPlan running in the background for backups. Using htop, kdeinit4 seems to constantly grow over time in memory use.

    Code:
    ps aux | grep kde
    USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
    root        57  0.0  0.0      0     0 ?        S    Nov17   0:00 [kdevtmpfs]
    test      1875  0.0  0.0  13072  2636 ?        Ss   Nov17   0:00 /bin/sh /usr/bin/startkde
    root      2014  0.0  0.0   4068    24 ?        S    Nov17   0:00 /usr/lib64/kde4/libexec/start_kdeinit +kcminit_startup
    test      2016  0.0  0.3 346828 30880 ?        Ss   Nov17   0:00 kdeinit4: kdeinit4 Running...
    test      2017  0.0  0.2 351148 20276 ?        S    Nov17   0:00 kdeinit4: klauncher [kdeinit] --fd=9
    test      2019  0.0 14.3 2348584 1168960 ?     Sl   Nov17   0:38 kdeinit4: kded4 [kdeinit]
    test      2025  0.0  0.3 433896 29596 ?        S    Nov17   0:00 kdeinit4: kglobalaccel [kdeinit]
    test      2050  0.0  0.3 518604 31548 ?        Sl   Nov17   0:03 kdeinit4: ksmserver [kdeinit]
    test      2103  0.6  2.2 3906840 185964 ?      Sl   Nov17  56:31 kdeinit4: plasma-desktop [kdeinit]
    test      2163  0.0  0.6 1355316 50176 ?       Sl   Nov17   0:04 kdeinit4: krunner [kdeinit]
    test      2165  0.0  0.5 671820 41384 ?        Sl   Nov17   0:02 kdeinit4: kmix [kdeinit] -session 106d616368000141325654900000
    test      2188  0.0  0.3 439444 31260 ?        S    Nov17   0:00 kdeinit4: klipper [kdeinit]
    test      2190  0.0  0.4 379912 32812 ?        Sl   Nov17   0:01 /usr/lib64/kde4/libexec/polkit-kde-authentication-agent-1
    test      2809  0.5  0.5 533792 44292 ?        Sl   19:42   0:02 kdeinit4: konsole [kdeinit]
    test      4294  0.0  0.0  10520  1532 pts/2    S+   19:48   0:00 grep --color=auto kde
    test      7969  0.0  0.0 109036  6512 ?        S    Nov19   0:00 /usr/lib64/kde4/libexec/kdesud
    test     16461  0.0  0.3 441980 29884 ?        S    Nov21   0:00 kdeinit4: kwalletd [kdeinit]
    Yes, if I reboot it's fine for a while. But as the days go by, it grows.

    Code:
    ps -eo size,pid,user,command --sort -size | awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' | head -n 15
             0.00 Mb COMMAND 
          2988.97 Mb kdeinit4: plasma-desktop [kdeinit] 
          2161.74 Mb kwin -session 106d616368000141325654100000015970000_1416270002_829765 
          1674.51 Mb kdeinit4: kded4 [kdeinit] 
           899.28 Mb /usr/bin/Xorg -br :0 vt7 -nolisten tcp -seat seat0 -auth /var/lib/kdm/AuthFiles/A:0-EFAhUa 
           657.64 Mb kdeinit4: krunner [kdeinit] 
           649.55 Mb /usr/lib64/firefox/firefox 
           597.23 Mb /usr/sbin/nscd 
           507.34 Mb /usr/bin/kactivitymanagerd 
           447.19 Mb /usr/lib/polkit-1/polkitd --no-debug 
           297.14 Mb /usr/sbin/NetworkManager --no-daemon 
           296.98 Mb /usr/lib/udisks2/udisksd --no-debug 
           289.25 Mb /usr/sbin/rsyslogd -n 
           224.83 Mb /usr/lib/gvfs/gvfsd-fuse /run/user/1001/gvfs -f -o big_writes 
           218.02 Mb /usr/bin/pulseaudio --start --log-target=syslog
    Machine has 8GB RAM, but KDE seems to be using more than I would expect. I know there are better ways to narrow down what's using the memory, but I don't know how. What can I do to find what's using it and how do I prevent it from using so much?

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,395
    Blog Entries
    2

    Default Re: KDE memory use is high

    A search of these forums would return numerous threads about KDE high memory usage.

    First, it shouldn't be a practical issue. Practically all modern OS today will consume as many resources as might be available over time... In general the idea is that if something is already in RAM, it'll respond (start) and run faster. So, increased memory use isn't necessarily a bad thing. But, the critical issue is whether resources can be re-allocated promptly when a task is invoked and resources are insufficient. How quickly can low priority allocated resources be re-allocated?

    If you want to manually free up resources without rebooting, I included a command for doing so as part of my description how to use the "free" tool (see the last section at the following link)
    http://en.opensuse.org/User:Tsu2/free_tool

    You can also select a desktop that uses fewer resources than KDE,
    During bootup you can select the following a full Desktops that use less resources than KDE
    LXDE
    XFCE
    And there are other Desktops that use less resources (like Minimal X) or no Desktop at all (server, which is text only).

    TSU

  3. #3

    Default Re: KDE memory use is high

    Thank you for the info. I am aware that I want programs to utilize memory, I'm just trying to make sure there's not something wrong. What can I look at more in depth to find what's using what and see if that's ok?

    IMO, 8GB RAM, sitting at a desktop with just Firefox open with a couple tabs and swap starts being used, something's not right.

  4. #4
    Join Date
    Nov 2008
    Location
    N. Wales
    Posts
    1,028

    Default Re: KDE memory use is high

    clickwir adjusted his tin foil beanie and wrote:

    >
    > Thank you for the info. I am aware that I want programs to utilize
    > memory, I'm just trying to make sure there's not something wrong. What
    > can I look at more in depth to find what's using what and see if that's
    > ok?
    >
    > IMO, 8GB RAM, sitting at a desktop with just Firefox open with a couple
    > tabs and swap starts being used, something's not right.
    >
    >


    The blunt answer is that unused memory is wasted/cached memory ( meant in
    the best possible way though ) it is a lot faster than any hard drive and so
    should be looked upon as a speed bonus.

    If you launch a program that needs that memory then linux will automatically
    free up the memory needed.

    It has a very good memory management system.

    trust me ;-)

    I would certainly not.....


    --
    Mark
    Caveat emptor
    Nullus en verba
    Nil Illigitimi Carborundum

  5. #5

    Default Re: KDE memory use is high

    I would take a look at KDE bug tracker, like https://bugs.kde.org/show_bug.cgi?id=271934

    3 year OLD thread but quite a few openSUSE users confirm. More importantly they continue right up to yesterday

    I can confirm this on two (desktop and laptop) installs of openSUSE 13.2 with KDE 4.14.2 from standard openSUSE repos. $ rpm -qf `which kded4` kdelibs4-4.14.2-1.1.x86_64
    Main fix seem to circle around power management.

    I also get a growing kded4 process, goes from 11mb at boot to 500-600mb and does not stop. Am on desktop.

    Slap me silly if that is designed feature or memory management. Is KDE gone wild. Question is why.

    I just rebooted with no power management. So far kded4 seems is in coma, does not move.

    I have zero of PIM, Akonadi, Baloo stuff running so if that is considered "core" features my issue is invalid. Should test cleanly with mostly standard programs and such. I have not enough imagination to believe adding that bunch will help with any memory issue. But sure, in theory you could have a 3rd party process messing up KDEs own memory management. Then barking up the wrong tree.

    Reason I avoid all semantic PIM/desktop stuff is not that I have not used it or do not want to - just gave up for much the same reasons as they talk about in that tread.

  6. #6

    Default Re: KDE memory use is high

    I let Google work on "kde kded4 power management" limited to one year and ended up on this very forum https://forums.opensuse.org/showthre...05#post2664605 so more of the same. Also old story but still in progress. Is not closed bug.

    I wonder if anyone has tested power management settings, like one by one? Would be interesting if issue is a setting/toggle and not entire process. Fix of disabling is not really a good one. Some hours of fun to be had testing that.

  7. #7

    Default Re: KDE memory use is high

    https://bugs.kde.org/show_bug.cgi?id=271934 has gotten special honour, took 3.5 years but finally it is bug of the month https://community.kde.org/Gardening#...g_Of_The_Month Never say never with KDE

  8. #8

    Default Re: KDE memory use is high

    Quote Originally Posted by js9600 View Post
    https://bugs.kde.org/show_bug.cgi?id=271934 has gotten special honour, took 3.5 years but finally it is bug of the month https://community.kde.org/Gardening#...g_Of_The_Month Never say never with KDE
    Apparently this wasn't a KDE bug after all, according to the latest comment. It seems to have been a memleak in polkit, fixed yesterday.

    I created packages with the fix, can you please install them and report back whether the fix helps? Preferably in this openSUSE bug report:
    https://bugzilla.opensuse.org/show_bug.cgi?id=863078#c8

    I do not see this memleak here at all (my system doesn't announce any backlight brightness control), so cannot tell whether it works now.
    Last edited by wolfi323; 12-Jan-2015 at 05:10.

  9. #9

    Default Re: KDE memory use is high

    I thought it would be an idea to check state of kded4 with power management turned on before testing fix. D#¤%#¤ thing seem stable now! Disappointed... I enabled what was disabled, removed the enable desktop start up script plus another one setting dpms. Rebooted. Private memory starts at 12 or so, after 1-2 hours it sit 20. Might as well be 12 as depends on what is activated. Is not leaking. Before very easy and fast to reproduce by toggling Power Management/powerdevil on/off. Was not weird combo but consistent leakage.

    Setup change all the time via updates and I have made some too so guess I have just been lucky. Only action I know is new is this fix https://bugzilla.novell.com/show_bug.cgi?id=729154

    Have applied fix anyway.

    I am on a desktop computer btw.

    Oh, make no sense to mention scripts but they were necessary because of a bad side effects from disabling power management https://forums.opensuse.org/showthre...23#post2685323 and post on top of that. Now apparently not necessary.

  10. #10

    Default Re: KDE memory use is high

    Quote Originally Posted by js9600 View Post
    I thought it would be an idea to check state of kded4 with power management turned on before testing fix. D#¤%#¤ thing seem stable now! Disappointed...
    OK.
    On one hand I'd say good that the problem disappeared for you.
    But on the other hand this doesn't help in testing whether the fix works then of course...

    I am on a desktop computer btw.
    Doesn't matter really. Even a desktop computer can support backlight controls.

    Actually I do see the problem on one (intel) desktop system as well, which supports backlight, but has a monitor connected (CRT) that does not have one. There is a constant increase in kded4's memory usage by 100MBs of RAM in a few hours.

    I will test the fix there of course, but cannot do that before the weekend.

    According to the openSUSE report the problem should actually _not_ occur on laptops where backlight controls are working.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •