Hello, I've been noticing that KDE performance degrades after it runs for a while on my machine. Since I am the only user, I usually never log off, and just let KDE runs for days at a time (I just lock the screen when I have to leave the desktop). I do restart some applications, e.g kontact, kopete, Firefox just in case I need to login to my mail (IMAP) or IM services from another location.
After a day or two, I would notice that Desktop switching is not as responsive. Scrolling the list of folders or messages in my Kontact / Kmail feel sluggish. Most obvious are desktop effect stuffs (e.g. show dashboard, show all desktops). As anectdotal example, show dashboard would take 4-5 seconds after I hit the shortcut before it happens. Displaying / drawing windows, for examples, if I want to change my preferences in Firefox or Kmail or starting xterm or konsole, is also less responsive. It's not unbearable, but the degradation is there for sure.
Log off (restarting X) and re-login usually cure the problem. If I happen to be too busy and have too many windows / apps open, I can still bear this for a while, so it's probably not show stopper, but it's rather annoying.
I am running F13 - x86_64, fully updated. "Help --> About KDE" shows KDE 4.5.2 is installed. I am using proprietary nVidia driver from RPMFusion, running dual-desktop (twinview). I don't think my hardware is the problem since it's rather beefy machine: Nvidia Quadro NVS 295, 2 quad-core Intel i7 with 16 GB RAM.
I am just wondering if anyone else see the same thing. I am curious if this is KDE's problem, or X with/or Nvidia-driver interaction.
Thanks. AC
On Friday, November 12, 2010 17:25:55 Armelius Cameron wrote:
Hello, I've been noticing that KDE performance degrades after it runs for a while on my machine. Since I am the only user, I usually never log off, and just let KDE runs for days at a time
+1
I think I see the same issue. I reported it on the main Fedora list, here's a link to the thread:
http://comments.gmane.org/gmane.linux.redhat.fedora.general/381446
My setup seems to be fairly different from yours (F12 64bit KDE with Compiz, Intel 965 graphics hardware), but the symptoms seem to match.
I traced the issue down to swap usage --- after a couple of days of running, *something* seems to gradually fill the memory with junk, so the system starts swapping more and more for regular desktop apps. I suggest you take a look at swap usage when you start feeling a performance hit. Logging off and back on helps (and cleans out the swap), but eventually it gets filled up again.
I wasn't able to pinpoint which particular app is responsible for memory leakage (it is definitely an X app since relogging restarts X and everything is fine again), but we may be able to help each other if we cross-reference which apps we both typically keep open/use regularly.
It is curious that compiz somehow avoids being swapped out, so is always responsive (in my case), while KDE desktop effects in your case seem to get sluggish with the rest of the system. I haven't tried KDE desktop effects on this machine.
After some time spent on this, I decided to upgrade to F14 next week, hoping that the issue might go away. But I am not sure it will.
I am just wondering if anyone else see the same thing. I am curious if this is KDE's problem, or X with/or Nvidia-driver interaction.
If we are seeing the same issue, you can rule out nVidia driver, since I don't have it on this machine. My KDE is 4.4.5, from a fully updated F12.
I'm pretty baffled with this myself, so if you happen to find out anything related, I'm all ears! :-)
HTH, :-) Marko
On Fri, Nov 12, 2010 at 3:55 PM, Marko Vojinovic vvmarko@gmail.com wrote:
I traced the issue down to swap usage --- after a couple of days of running, *something* seems to gradually fill the memory with junk
Run top and type "M". That will sort process by their resident memory usage. It won't had to spot the offender.
On Friday, November 12, 2010 22:14:34 you wrote:
On Fri, Nov 12, 2010 at 3:55 PM, Marko Vojinovic vvmarko@gmail.com wrote:
I traced the issue down to swap usage --- after a couple of days of running, *something* seems to gradually fill the memory with junk
Run top and type "M". That will sort process by their resident memory usage. It won't had to spot the offender.
Ok, sure, I've been advised to do this before, and I've done it many times, but somehow I'm not any smarter after looking at top output. Maybe I am reading it wrong, but it just confuses me even further. Here goes, sorted by memory usage:
top - 22:16:38 up 10 days, 5:11, 5 users, load average: 0.38, 0.45, 0.37 Tasks: 200 total, 1 running, 199 sleeping, 0 stopped, 0 zombie Cpu(s): 10.4%us, 8.5%sy, 0.0%ni, 79.9%id, 1.0%wa, 0.0%hi, 0.2%si, 0.0%st Mem: 2048088k total, 1657424k used, 390664k free, 18640k buffers Swap: 4192956k total, 1038432k used, 3154524k free, 566580k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2528 vmarko 20 0 2029m 171m 19m S 1.3 8.6 564:19.55 firefox 2397 vmarko 20 0 366m 148m 7460 S 1.3 7.4 230:40.39 skype 2366 vmarko 20 0 565m 92m 3044 S 0.0 4.6 12:10.68 emerald 5723 vmarko 20 0 989m 82m 17m S 0.0 4.1 10:29.49 kmail 1739 root 20 0 471m 59m 11m S 19.9 3.0 3780:01 X 2021 vmarko 20 0 1380m 57m 9476 S 6.3 2.9 780:37.22 ktorrent 2016 vmarko 20 0 293m 42m 8176 S 0.7 2.1 137:01.00 skype 2222 vmarko 20 0 789m 28m 5436 S 0.0 1.4 11:05.85 cairo-dock 1998 vmarko 20 0 937m 20m 8824 S 4.3 1.0 804:03.95 plasma-desktop 2603 vmarko 20 0 546m 18m 7088 S 0.0 0.9 1:39.64 kile 22635 vmarko 20 0 480m 12m 6452 S 0.7 0.6 43:06.53 konsole 2053 vmarko 9 -11 501m 12m 11m S 0.3 0.6 259:54.25 pulseaudio 10764 vmarko 20 0 455m 8572 4608 S 0.0 0.4 1:07.09 okular 32679 vmarko 20 0 285m 8528 5616 S 0.0 0.4 0:00.11 kio_pop3
So what do you make of it?
First 14 processes take up (together) 37.4 %MEM. Except for the last one (I have no idea what is kio_pop3), all of those are active simultaneously on my desktop most of the time.
I have 2 GB of RAM and 4GB of swap, and apparently most of the RAM is used up and an extra 1 GB of swap. So what apps are using up the remaining 62.6 %MEM?
Is there a way to list all processes, sorted by memory usage? Top truncates the output to the height of the terminal, and I would really like to see if the %MEM is actually summed up to 100 for all processes.
By the way, does MEM column refer to RAM or RAM+swap? In any case, I don't see why my 10+ apps, using a total of 37% of memory can force the system to use 1GB of swap, on top of 2GB RAM.
Is there a way to check which pages (belonging to which apps) are being swapped out? Furthermore, is there a way to understand why is this being done? What is occupying all that RAM if Firefox and KMail are routinely swapped out and thus behave in an extremely sluggish way until they finally get focus (and get swapped back to RAM)?
I guess it should be a sane system policy that apps currently open on the desktop not be swapped, unless there is no more RAM for all of them. But all my desktop apps take up only 37% of that RAM, so why do they get swapped out in the first place?
I'd appreciate any clarification on this matter.
Best, :-) Marko
On 11/12/2010 06:43 PM, Marko Vojinovic wrote:
On Friday, November 12, 2010 22:14:34 you wrote:
On Fri, Nov 12, 2010 at 3:55 PM, Marko Vojinovicvvmarko@gmail.com wrote:
I traced the issue down to swap usage --- after a couple of days of running, *something* seems to gradually fill the memory with junk
Run top and type "M". That will sort process by their resident memory usage. It won't had to spot the offender.
Ok, sure, I've been advised to do this before, and I've done it many times, but somehow I'm not any smarter after looking at top output. Maybe I am reading it wrong, but it just confuses me even further. Here goes, sorted by memory usage:
top - 22:16:38 up 10 days, 5:11, 5 users, load average: 0.38, 0.45, 0.37 Tasks: 200 total, 1 running, 199 sleeping, 0 stopped, 0 zombie Cpu(s): 10.4%us, 8.5%sy, 0.0%ni, 79.9%id, 1.0%wa, 0.0%hi, 0.2%si, 0.0%st Mem: 2048088k total, 1657424k used, 390664k free, 18640k buffers Swap: 4192956k total, 1038432k used, 3154524k free, 566580k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2528 vmarko 20 0 2029m 171m 19m S 1.3 8.6 564:19.55 firefox 2397 vmarko 20 0 366m 148m 7460 S 1.3 7.4 230:40.39 skype 2366 vmarko 20 0 565m 92m 3044 S 0.0 4.6 12:10.68 emerald 5723 vmarko 20 0 989m 82m 17m S 0.0 4.1 10:29.49 kmail 1739 root 20 0 471m 59m 11m S 19.9 3.0 3780:01 X 2021 vmarko 20 0 1380m 57m 9476 S 6.3 2.9 780:37.22 ktorrent 2016 vmarko 20 0 293m 42m 8176 S 0.7 2.1 137:01.00 skype 2222 vmarko 20 0 789m 28m 5436 S 0.0 1.4 11:05.85 cairo-dock 1998 vmarko 20 0 937m 20m 8824 S 4.3 1.0 804:03.95 plasma-desktop 2603 vmarko 20 0 546m 18m 7088 S 0.0 0.9 1:39.64 kile 22635 vmarko 20 0 480m 12m 6452 S 0.7 0.6 43:06.53 konsole 2053 vmarko 9 -11 501m 12m 11m S 0.3 0.6 259:54.25 pulseaudio 10764 vmarko 20 0 455m 8572 4608 S 0.0 0.4 1:07.09 okular 32679 vmarko 20 0 285m 8528 5616 S 0.0 0.4 0:00.11 kio_pop3
So what do you make of it?
First 14 processes take up (together) 37.4 %MEM. Except for the last one (I have no idea what is kio_pop3), all of those are active simultaneously on my desktop most of the time.
I have 2 GB of RAM and 4GB of swap, and apparently most of the RAM is used up and an extra 1 GB of swap. So what apps are using up the remaining 62.6 %MEM?
You have almost 400M free and almost 600M cached. Not sure why so much goes into swap. What are the results of the free command after running this command?
swapoff -a && swapon -a
Is there a way to list all processes, sorted by memory usage? Top truncates the output to the height of the terminal, and I would really like to see if the %MEM is actually summed up to 100 for all processes.
By the way, does MEM column refer to RAM or RAM+swap? In any case, I don't see why my 10+ apps, using a total of 37% of memory can force the system to use 1GB of swap, on top of 2GB RAM.
Is there a way to check which pages (belonging to which apps) are being swapped out? Furthermore, is there a way to understand why is this being done? What is occupying all that RAM if Firefox and KMail are routinely swapped out and thus behave in an extremely sluggish way until they finally get focus (and get swapped back to RAM)?
I guess it should be a sane system policy that apps currently open on the desktop not be swapped, unless there is no more RAM for all of them. But all my desktop apps take up only 37% of that RAM, so why do they get swapped out in the first place?
I'd appreciate any clarification on this matter.
Best, :-) Marko
kde mailing list kde@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/kde New to KDE4? - get help from http://userbase.kde.org
On Friday, November 12, 2010 22:52:12 Patrick Boutilier wrote:
On 11/12/2010 06:43 PM, Marko Vojinovic wrote:
On Friday, November 12, 2010 22:14:34 you wrote:
On Fri, Nov 12, 2010 at 3:55 PM, Marko Vojinovicvvmarko@gmail.com
wrote:
I traced the issue down to swap usage --- after a couple of days of running, *something* seems to gradually fill the memory with junk
Run top and type "M". That will sort process by their resident memory usage. It won't had to spot the offender.
top - 22:16:38 up 10 days, 5:11, 5 users, load average: 0.38, 0.45, 0.37 Tasks: 200 total, 1 running, 199 sleeping, 0 stopped, 0 zombie Cpu(s): 10.4%us, 8.5%sy, 0.0%ni, 79.9%id, 1.0%wa, 0.0%hi, 0.2%si, 0.0%st Mem: 2048088k total, 1657424k used, 390664k free, 18640k buffers Swap: 4192956k total, 1038432k used, 3154524k free, 566580k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2528 vmarko 20 0 2029m 171m 19m S 1.3 8.6 564:19.55 firefox 2397 vmarko 20 0 366m 148m 7460 S 1.3 7.4 230:40.39 skype 2366 vmarko 20 0 565m 92m 3044 S 0.0 4.6 12:10.68 emerald 5723 vmarko 20 0 989m 82m 17m S 0.0 4.1 10:29.49 kmail 1739 root 20 0 471m 59m 11m S 19.9 3.0 3780:01 X 2021 vmarko 20 0 1380m 57m 9476 S 6.3 2.9 780:37.22 ktorrent 2016 vmarko 20 0 293m 42m 8176 S 0.7 2.1 137:01.00 skype 2222 vmarko 20 0 789m 28m 5436 S 0.0 1.4 11:05.85 cairo-dock 1998 vmarko 20 0 937m 20m 8824 S 4.3 1.0 804:03.95 plasma-desktop 2603 vmarko 20 0 546m 18m 7088 S 0.0 0.9 1:39.64 kile
22635 vmarko 20 0 480m 12m 6452 S 0.7 0.6 43:06.53 konsole
2053 vmarko 9 -11 501m 12m 11m S 0.3 0.6 259:54.25 pulseaudio
10764 vmarko 20 0 455m 8572 4608 S 0.0 0.4 1:07.09 okular 32679 vmarko 20 0 285m 8528 5616 S 0.0 0.4 0:00.11 kio_pop3
So what do you make of it?
You have almost 400M free and almost 600M cached. Not sure why so much goes into swap. What are the results of the free command after running this command?
swapoff -a && swapon -a
Oh, if I try to turn off the swap now (just swapoff -a) the machine will grind to a halt for some time (half an hour or so), then the command will fail and the swap will get back in use (I mean without running the swapon -a part). Tried it several times before. Apparently the kernel eventually figures out there is not enough RAM for the swapoff command to complete, and instead the command gets killed before swap gets off. That's at least how I explain this behavior to myself. But the system is in a very bad state after that, and basically the only thing that makes sense at that point is to reboot.
I'll try again, just to make sure, but I'll probably end up having to reboot the machine. But then we'd have to wait for a week or so for the system to reach this state again, so I'd rather postpone this step for later, when all other ideas run out.
Speaking of turning off swap, I tried also to do a fresh boot, then do a swapoff -a, and keep the system running without swap. After a while (several days) the machine would start to choke, processes randomly getting killed, etc., all symptoms of "not enough memory" problem. Eventually it would end up with a complete lockup, and I'd have to reboot.
So any ideas how to troubleshoot this memory leakage, before I do something that risks requiring a reboot?
Best, :-) Marko
P.S. Apparently I inadvertently stole the thread from the OP. But if he is having the same issue, I guess it doesn't hurt... :-)
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2528 vmarko 20 0 2029m 171m 19m S 1.3 8.6 564:19.55 firefox 2397 vmarko 20 0 366m 148m 7460 S 1.3 7.4 230:40.39 skype 2366 vmarko 20 0 565m 92m 3044 S 0.0 4.6 12:10.68 emerald
Looks like the top 3 aren't kde applications. Try quiting/restarting these?
-- Rex
On 11/12/2010 06:10 PM, Rex Dieter wrote:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2528 vmarko 20 0 2029m 171m 19m S 1.3 8.6 564:19.55 firefox 2397 vmarko 20 0 366m 148m 7460 S 1.3 7.4 230:40.39 skype 2366 vmarko 20 0 565m 92m 3044 S 0.0 4.6 12:10.68 emerald
Looks like the top 3 aren't kde applications. Try quiting/restarting these?
I've been experiencing terrible firefox memory consumption lately. I'm down to restarting it every day.
On Saturday, November 13, 2010 01:10:18 Rex Dieter wrote:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2528 vmarko 20 0 2029m 171m 19m S 1.3 8.6 564:19.55 firefox 2397 vmarko 20 0 366m 148m 7460 S 1.3 7.4 230:40.39 skype 2366 vmarko 20 0 565m 92m 3044 S 0.0 4.6 12:10.68 emerald
Looks like the top 3 aren't kde applications. Try quiting/restarting these?
Sorry for the delay, I wasn't around yesterday... :-)
Ok, so I exited from firefox, skype and emerald (replaced it with default kde4-window-decorator). The swap usage dropped halfway, from 1 GB to 0.5 GB. Some memory also got released. This is the new top output:
top - 21:27:10 up 12 days, 4:21, 4 users, load average: 0.21, 0.25, 0.31 Tasks: 184 total, 1 running, 183 sleeping, 0 stopped, 0 zombie Cpu(s): 12.7%us, 11.9%sy, 0.0%ni, 75.2%id, 0.0%wa, 0.0%hi, 0.2%si, 0.0%st Mem: 2048088k total, 1845144k used, 202944k free, 33668k buffers Swap: 4192956k total, 537340k used, 3655616k free, 1093460k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 15276 vmarko 20 0 624m 81m 23m S 0.0 4.1 0:18.03 okular 1739 root 20 0 472m 77m 25m S 20.9 3.9 4700:18 X 2021 vmarko 20 0 1396m 69m 9760 S 5.3 3.5 910:19.04 ktorrent 9797 vmarko 20 0 810m 59m 21m S 0.0 3.0 0:51.88 kmail 15242 vmarko 20 0 543m 58m 23m S 0.0 2.9 0:04.16 kile 2222 vmarko 20 0 727m 24m 12m S 0.0 1.2 13:53.29 cairo-dock 1998 vmarko 20 0 938m 22m 10m S 5.0 1.1 958:46.41 plasma-desktop 15152 vmarko 20 0 676m 21m 13m S 0.0 1.1 0:14.63 kde4-window-dec 15170 vmarko 20 0 420m 19m 12m S 0.7 1.0 0:03.23 konsole 2053 vmarko 9 -11 565m 18m 16m S 6.0 0.9 297:56.92 pulseaudio 2022 vmarko 20 0 420m 11m 7744 S 0.0 0.6 0:02.00 fusion-icon 2346 vmarko 20 0 188m 9.9m 3024 S 1.7 0.5 198:32.22 compiz 15525 vmarko 20 0 271m 8512 6000 S 0.0 0.4 0:00.07 kio_http
The system regained some responsiveness, but still appears mainly sluggish.
The problem isn't the actual load, but the fact that memory consumption increases without bound over time. I'll try to use Konqueror for a day instead of Firefox, and I'll try to refrain from keeping skype and emerald running. If the swap usage keeps increasing, the culprit is somewhere else... I'll wait and see.
Best, :-) Marko
On Friday, November 12, 2010 17:43:56 Marko Vojinovic wrote:
On Friday, November 12, 2010 22:14:34 you wrote:
On Fri, Nov 12, 2010 at 3:55 PM, Marko Vojinovic vvmarko@gmail.com wrote:
I traced the issue down to swap usage --- after a couple of days of running, *something* seems to gradually fill the memory with junk
Run top and type "M". That will sort process by their resident memory usage. It won't had to spot the offender.
[snip]
Mem: 2048088k total, 1657424k used, 390664k free, 18640k buffers Swap: 4192956k total, 1038432k used, 3154524k free, 566580k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2528 vmarko 20 0 2029m 171m 19m S 1.3 8.6 564:19.55 firefox 2397 vmarko 20 0 366m 148m 7460 S 1.3 7.4 230:40.39 skype 2366 vmarko 20 0 565m 92m 3044 S 0.0 4.6 12:10.68 emerald 5723 vmarko 20 0 989m 82m 17m S 0.0 4.1 10:29.49 kmail 1739 root 20 0 471m 59m 11m S 19.9 3.0 3780:01 X 2021 vmarko 20 0 1380m 57m 9476 S 6.3 2.9 780:37.22 ktorrent 2016 vmarko 20 0 293m 42m 8176 S 0.7 2.1 137:01.00 skype 2222 vmarko 20 0 789m 28m 5436 S 0.0 1.4 11:05.85 cairo-dock 1998 vmarko 20 0 937m 20m 8824 S 4.3 1.0 804:03.95 plasma-desktop 2603 vmarko 20 0 546m 18m 7088 S 0.0 0.9 1:39.64 kile 22635 vmarko 20 0 480m 12m 6452 S 0.7 0.6 43:06.53 konsole 2053 vmarko 9 -11 501m 12m 11m S 0.3 0.6 259:54.25 pulseaudio 10764 vmarko 20 0 455m 8572 4608 S 0.0 0.4 1:07.09 okular 32679 vmarko 20 0 285m 8528 5616 S 0.0 0.4 0:00.11 kio_pop3
So what do you make of it?
These top processes are, together, allocated over 10 GB of virtual address space. On a 2 GB physical memory machine, you are almost certainly going to page. Also firefox with flash has been known to consume memory without bound. Some Web sites are designed poorly to cause Javascript to consume memory without bound.
It is clear from above that the 2 GB memory on this machine is over- committed. Add more RAM.
On Friday, November 12, 2010 17:52:12 Patrick Boutilier wrote:
You have almost 400M free and almost 600M cached. Not sure why so much goes into swap. What are the results of the free command after running this command?
swapoff -a && swapon -a
Do not do this. The processes above will *not* fit in 2 GB.
Also the size of cached is almost certainly coming from ktorrent, judging from the CPU time it has accumulated. The file data it reads from the network is being held around in anticipation of it being useful soon. It probably isn't. Cached will be reclaimed when needed by a process.
On Friday, November 12, 2010 20:10:18 Rex Dieter wrote:
Looks like the top 3 aren't kde applications. Try quiting/restarting these?
Yup.
On Saturday, November 13, 2010 05:01:36 Garry T. Williams wrote:
On Friday, November 12, 2010 17:43:56 Marko Vojinovic wrote:
On Friday, November 12, 2010 22:14:34 you wrote:
On Fri, Nov 12, 2010 at 3:55 PM, Marko Vojinovic vvmarko@gmail.com
wrote:
I traced the issue down to swap usage --- after a couple of days of running, *something* seems to gradually fill the memory with junk
Mem: 2048088k total, 1657424k used, 390664k free, 18640k buffers Swap: 4192956k total, 1038432k used, 3154524k free, 566580k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2528 vmarko 20 0 2029m 171m 19m S 1.3 8.6 564:19.55 firefox 2397 vmarko 20 0 366m 148m 7460 S 1.3 7.4 230:40.39 skype 2366 vmarko 20 0 565m 92m 3044 S 0.0 4.6 12:10.68 emerald 5723 vmarko 20 0 989m 82m 17m S 0.0 4.1 10:29.49 kmail 1739 root 20 0 471m 59m 11m S 19.9 3.0 3780:01 X 2021 vmarko 20 0 1380m 57m 9476 S 6.3 2.9 780:37.22 ktorrent 2016 vmarko 20 0 293m 42m 8176 S 0.7 2.1 137:01.00 skype 2222 vmarko 20 0 789m 28m 5436 S 0.0 1.4 11:05.85 cairo-dock 1998 vmarko 20 0 937m 20m 8824 S 4.3 1.0 804:03.95 plasma-desktop 2603 vmarko 20 0 546m 18m 7088 S 0.0 0.9 1:39.64 kile
22635 vmarko 20 0 480m 12m 6452 S 0.7 0.6 43:06.53 konsole
2053 vmarko 9 -11 501m 12m 11m S 0.3 0.6 259:54.25 pulseaudio
10764 vmarko 20 0 455m 8572 4608 S 0.0 0.4 1:07.09 okular 32679 vmarko 20 0 285m 8528 5616 S 0.0 0.4 0:00.11 kio_pop3
So what do you make of it?
These top processes are, together, allocated over 10 GB of virtual address space. On a 2 GB physical memory machine, you are almost certainly going to page. Also firefox with flash has been known to consume memory without bound. Some Web sites are designed poorly to cause Javascript to consume memory without bound.
It is clear from above that the 2 GB memory on this machine is over- committed. Add more RAM.
Well, it doesn't seem to be overcommitted for the first four days of running, with all those apps. Apparently there is a process among these which uses more and more memory as time passes, without bound, and eventually forces everything else to swap. So adding more RAM is not the solution, it would just postpone using of swap for another week maybe.
The problem is that this shouldn't happen in the first place. If I can successfully use the machine with 2GB of RAM for the first week, why isn't that state maintained indefinitely? I don't usually add any more load than this, and the machine seems to handle it without problems initially. But something keeps eating away RAM, slowly but without bound. :(
As for Firefox with flash, I know, but I need a browser open all the time. Restarting it doesn't seem to help much. Any suggestions on how to combat/workaround this issue? That is, short of rebooting every day?
On Friday, November 12, 2010 17:52:12 Patrick Boutilier wrote:
You have almost 400M free and almost 600M cached. Not sure why so much goes into swap. What are the results of the free command after running this command?
swapoff -a && swapon -a
Do not do this. The processes above will *not* fit in 2 GB.
I know. At least they won't fit *now*. They all *do* fit in 2 GB after a fresh boot or logout/login into X. But give them two weeks, and...
Also the size of cached is almost certainly coming from ktorrent, judging from the CPU time it has accumulated. The file data it reads from the network is being held around in anticipation of it being useful soon. It probably isn't. Cached will be reclaimed when needed by a process.
So you are saying that ktorrent should not create problems I'm having, right? If cached mem can be reclaimed, I believe that would happen *before* the system resorts to using swap? Or am I wrong here?
Best, :-) Marko
On Sunday, November 14, 2010 16:52:54 Marko Vojinovic wrote:
On Saturday, November 13, 2010 05:01:36 Garry T. Williams wrote:
On Friday, November 12, 2010 17:43:56 Marko Vojinovic wrote:
On Friday, November 12, 2010 22:14:34 you wrote:
On Fri, Nov 12, 2010 at 3:55 PM, Marko Vojinovic vvmarko@gmail.com wrote:
I traced the issue down to swap usage --- after a couple of days of running, *something* seems to gradually fill the memory with junk
Mem: 2048088k total, 1657424k used, 390664k free, 18640k buffers Swap: 4192956k total, 1038432k used, 3154524k free, 566580k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2528 vmarko 20 0 2029m 171m 19m S 1.3 8.6 564:19.55 firefox 2397 vmarko 20 0 366m 148m 7460 S 1.3 7.4 230:40.39 skype 2366 vmarko 20 0 565m 92m 3044 S 0.0 4.6 12:10.68 emerald 5723 vmarko 20 0 989m 82m 17m S 0.0 4.1 10:29.49 kmail 1739 root 20 0 471m 59m 11m S 19.9 3.0 3780:01 X 2021 vmarko 20 0 1380m 57m 9476 S 6.3 2.9 780:37.22 ktorrent 2016 vmarko 20 0 293m 42m 8176 S 0.7 2.1 137:01.00 skype 2222 vmarko 20 0 789m 28m 5436 S 0.0 1.4 11:05.85 cairo-dock 1998 vmarko 20 0 937m 20m 8824 S 4.3 1.0 804:03.95 plasma-desktop 2603 vmarko 20 0 546m 18m 7088 S 0.0 0.9 1:39.64 kile 22635 vmarko 20 0 480m 12m 6452 S 0.7 0.6 43:06.53 konsole 2053 vmarko 9 -11 501m 12m 11m S 0.3 0.6 259:54.25 pulseaudio 10764 vmarko 20 0 455m 8572 4608 S 0.0 0.4 1:07.09 okular 32679 vmarko 20 0 285m 8528 5616 S 0.0 0.4 0:00.11 kio_pop3
[snip]
It is clear from above that the 2 GB memory on this machine is over- committed. Add more RAM.
Well, it doesn't seem to be overcommitted for the first four days of running, with all those apps. Apparently there is a process among these which uses more and more memory as time passes, without bound, and eventually forces everything else to swap. So adding more RAM is not the solution, it would just postpone using of swap for another week maybe.
Maybe not. It looks like another Gig would do it.
My money is on ktorrent. It's filling up the cached memory, I bet. That stuff is probably also being used as peers request blocks from your client. The system gradually pages out pages from other applications to make room for ktorrent pages in cached memory. Eventually you use one of those apps and it page faults a bunch of its memory back in before it can respond.
You might try clearing the cache. From a root prompt, type:
sync; echo 3 >/proc/sys/vm/drop_caches
Or maybe stop running ktorrent altogether to see if that helps.
Stopping and restarting firefox on a regular basis will help, too.
On Monday, November 15, 2010 00:00:17 Garry T. Williams wrote:
[snip]
You might try clearing the cache. From a root prompt, type:
sync; echo 3 >/proc/sys/vm/drop_caches
You also may want to read this article:
http://www.linuxatemyram.com/play.html
Note the reference to swapiness at the bottom of the page. That's another tunable that you might want to try. Lowering that value will make more application pages stay in real memory rather than be written out to swap.
On Sun, Nov 14, 2010 at 23:52, Marko Vojinovic vvmarko@gmail.com wrote:
As for Firefox with flash, I know, but I need a browser open all the time. Restarting it doesn't seem to help much. Any suggestions on how to combat/workaround this issue? That is, short of rebooting every day?
Use the Flashblock addon: it bocks al flash until you want to enable it on a specific website,or a specific applet. I cuts Firefox memory use for half to a tenth, depending on what sites you visit. Youcan whitelist sites such as youtube.
On Friday, November 12, 2010 17:43:56 Marko Vojinovic wrote:
[snip]
Is there a way to list all processes, sorted by memory usage?
top -n1 -b
will print all processes and exit. (See top(1).) I don't know how to get it to sort by memory usage, though. If you really wanted to, you could pipe that to awk or perl and normalize one of the memory columns' values and then pipe that to sort.
On Saturday, November 13, 2010 10:52:01 Tomas Straupis wrote:
Is there a way to list all processes, sorted by memory usage?
What is wrong with "system monitor"? Why in the context of KDE isn't that used to monitor memory, swap, CPU usage, sort on different columns etc.?
I guess you mean the ksysguard utility?
I don't know how to copy/paste results from its output to an e-mail message. Top is text-based.
Best, :-) Marko
On 11/12/2010 03:55 PM, Marko Vojinovic wrote:
After some time spent on this, I decided to upgrade to F14 next week, hoping that the issue might go away. But I am not sure it will.
I have been seeing this kind of slowdown on F14, after upgrading from F12, where I never saw it.
Richard
On Saturday, November 13, 2010 06:25:45 pm Richard Heck wrote:
On 11/12/2010 03:55 PM, Marko Vojinovic wrote:
After some time spent on this, I decided to upgrade to F14 next week, hoping that the issue might go away. But I am not sure it will.
I have been seeing this kind of slowdown on F14, after upgrading from F12, where I never saw it.
My laptop runs F12 which a much more modest hardware (a typical dual core laptop with 4GB RAM) and I don't think I've experienced the slowdown there either. At first I thought it's because I often turn it off and on rather than leaving it for days like my desktop at work. But on occassion I have left the laptop logged in over a whole weekend and it's still fairly responsive.
The most obvious for me for the slowdown is the "Show Dashboard" action. It's fairly responsive on my laptop (F12) ; it always takes 5 seconds on my desktop (F13) before Dashboard is shown. Both uses Nvidia proprietary driver.
AC
On 11/15/2010 12:11 PM, Armelius Cameron wrote:
On Saturday, November 13, 2010 06:25:45 pm Richard Heck wrote:
On 11/12/2010 03:55 PM, Marko Vojinovic wrote:
After some time spent on this, I decided to upgrade to F14 next week, hoping that the issue might go away. But I am not sure it will.
I have been seeing this kind of slowdown on F14, after upgrading from F12, where I never saw it.
My laptop runs F12 which a much more modest hardware (a typical dual core laptop with 4GB RAM) and I don't think I've experienced the slowdown there either. At first I thought it's because I often turn it off and on rather than leaving it for days like my desktop at work. But on occassion I have left the laptop logged in over a whole weekend and it's still fairly responsive.
The most obvious for me for the slowdown is the "Show Dashboard" action. It's fairly responsive on my laptop (F12) ; it always takes 5 seconds on my desktop (F13) before Dashboard is shown. Both uses Nvidia proprietary driver.
The most obvious problem I have been seeing has to do with window switches. It seems as if, all of a sudden, they become painfully slow. One version: Ctrl-Alt-Delete completely freezes everything, to the point that the mouse cursor disappears, and then---like you---I wait 3-5 seconds until the logout box finally appears.
Log out and log in seems to cure it. The only thing I do know is that X is consuming what looks like a lot of resources as I switch windows, e.g., 35% CPU. But I have four cores, so that can't be the issue by itself.
Also, this is not a memory issue: I have 6GB, and no swap being used.
Richard
On Monday, November 15, 2010 09:00:26 pm Richard Heck wrote:
The most obvious problem I have been seeing has to do with window switches. It seems as if, all of a sudden, they become painfully slow. One version: Ctrl-Alt-Delete completely freezes everything, to the point that the mouse cursor disappears, and then---like you---I wait 3-5 seconds until the logout box finally appears.
I'll add text box scrolling as well. It gets unusably slow after some point. A quick fix I've discovered is to disable and enable the desktop effects (the other way around works just as well!).
Christos.
On Tuesday, November 16, 2010 04:19:28 am Christos Lazaridis wrote:
On Monday, November 15, 2010 09:00:26 pm Richard Heck wrote:
I'll add text box scrolling as well. It gets unusably slow after some point. A quick fix I've discovered is to disable and enable the desktop effects (the other way around works just as well!).
What do you mean by text box scrolling ? I observe also that sometime any text editor (Kmail composer window, kile, kate) gets unreasonably slow and sluggish even for small amount of text. I cannot reproduce it consistently. It cures itself at some point (possibly due to login / logout or just restarting the application, I don't know). Is this what you meant ?
AC
On Tuesday, November 16, 2010 03:47:06 pm Armelius Cameron wrote:
On Tuesday, November 16, 2010 04:19:28 am Christos Lazaridis wrote:
On Monday, November 15, 2010 09:00:26 pm Richard Heck wrote:
I'll add text box scrolling as well. It gets unusably slow after some point. A quick fix I've discovered is to disable and enable the desktop effects (the other way around works just as well!).
What do you mean by text box scrolling ? I observe also that sometime any text editor (Kmail composer window, kile, kate) gets unreasonably slow and sluggish even for small amount of text. I cannot reproduce it consistently. It cures itself at some point (possibly due to login / logout or just restarting the application, I don't know). Is this what you meant ?
Exactly. And I've notived the performance of all the applications I am using degrades at the same time. Restarting them or logging in/out is a big hassle so I'm glad the enable/disable desktop effects works; otherwise I might've moved away from KDE until a fix comes.
If people have ideas on how to try to track this down, I'd be more than happy to try helping.
Christos.
AC _______________________________________________ kde mailing list kde@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/kde New to KDE4? - get help from http://userbase.kde.org
On 11/16/2010 09:59 AM, Christos Lazaridis wrote:
On Tuesday, November 16, 2010 03:47:06 pm Armelius Cameron wrote:
On Tuesday, November 16, 2010 04:19:28 am Christos Lazaridis wrote:
On Monday, November 15, 2010 09:00:26 pm Richard Heck wrote:
I'll add text box scrolling as well. It gets unusably slow after some point. A quick fix I've discovered is to disable and enable the desktop effects (the other way around works just as well!).
What do you mean by text box scrolling ? I observe also that sometime any text editor (Kmail composer window, kile, kate) gets unreasonably slow and sluggish even for small amount of text. I cannot reproduce it consistently. It cures itself at some point (possibly due to login / logout or just restarting the application, I don't know). Is this what you meant ?
Exactly. And I've notived the performance of all the applications I am using degrades at the same time. Restarting them or logging in/out is a big hassle so I'm glad the enable/disable desktop effects works; otherwise I might've moved away from KDE until a fix comes.
If people have ideas on how to try to track this down, I'd be more than happy to try helping.
No ideas, but by running ksysguard I've noticed HUGE CPU usage when I try to logout. I can't see what is using the CPU, since everything visual freezes, but once ksysguard "catches up" after I cancel, I have a big hump. Same goes when just using alt-tab to switch windows. I can see all kinds of activity, even though I'm only seeing window outlines on the screen. No desktop effects active; four cores; 6GB; no swap.
But I can confirm the workaround: Enabling and then disabling desktop effects fixes the problem.
Do we need a new thread to call this to the right people's attention? Or should a bug be filed somewhere?
Richard
On Tuesday, November 16, 2010 11:09:01 am Richard Heck wrote:
On 11/16/2010 09:59 AM, Christos Lazaridis wrote: But I can confirm the workaround: Enabling and then disabling desktop effects fixes the problem.
Just curious and to make things clearer: are both of you (Richard and Christos) also using NVidia proprietary driver ?
Do we need a new thread to call this to the right people's attention? Or should a bug be filed somewhere?
I don't know... we can try a new thread. This thread seemed to get a bit side- tracked earlier. I am not sure how / what bug report to file this againsts yet, as I don't have a reliable way to reproduce, and my evidences are mainly anectdotal (hence i wonder if anyone else experience it). But if you do file it please let us know and we can contribute reports.
I haven't had a chance to try the workaround. For some reason my system seems to be doing okay since I came in earlier today. I'll try the turning off -- turning on desktop effect when it gets worse.
Thanks AC