This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[3.1.5][kde 4.1.2] losing UI / too much mem use

Tags: None
(comma "," separated)
bpoterie
Registered Member
Posts
9
Karma
0
Hello,
after letting ktorrent run for days it eats the memory out, looses its UI and goes in limbo.
This morning it was still in background but the UI somehow crashed during the night. This is not the first time i had this situation.
top utility gives me this line :
VIRT 3293m RES 2.4g SHR 6972 S D %CPU 0 %MEM 88.8 TIME 1319:43
i have approximately 420 torrents in Upload and 2 or 3 in Donwload.
There are 3Gb memory on my PC.
George
Moderator
Posts
5421
Karma
1

Sun Dec 07, 2008 9:44 am
Try 3.2beta1, that should solve the memory usage problem.
MoDaX
Registered Member
Posts
241
Karma
0
OS

Sat Jan 03, 2009 9:50 am
Well, it is not true, 3.2dev does not solve memory usage problems. Apparently, there are huge memory leak(s) somewhere as ktorrent starts with low memory usage and grows over time. After ~15 hours of running, I had the following situation (`free` output):

Code: Select all
             total       used       free     shared    buffers     cached
Mem:       1029232    1008344      20888          0       1824      78700
-/+ buffers/cache:     927820     101412                                 
Swap:      2441840     850348    1591492


Right after quitting ktorrent:

Code: Select all
             total       used       free     shared    buffers     cached
Mem:       1029232     678532     350700          0       1872      79944
-/+ buffers/cache:     596716     432516
Swap:      2441840     402912    2038928


So lets calculate 850348-402912+927820-596716=778540 Kb. This basically means that ktorrent used over ~778 MB of memory. That's enourmously high for ~20 torrents seeding. Unfortunately, ktorrent is very hard to valgrind on my PC as it runs very slow then.
George
Moderator
Posts
5421
Karma
1

Sat Jan 03, 2009 12:39 pm
Every couple of seconds a message should be printed to the log about how much memory is being used by all the chunks, how much does it say when this is happening ?
MoDaX
Registered Member
Posts
241
Karma
0
OS

Sat Jan 03, 2009 1:33 pm
George wrote:Every couple of seconds a message should be printed to the log about how much memory is being used by all the chunks, how much does it say when this is happening ?

I guess you want grep 'Piece cache' log. Here it is http://alioth.debian.org/~modax-guest/k ... ecache.log Oddly, "memory in use" is always 0B
George
Moderator
Posts
5421
Karma
1

Mon Jan 05, 2009 2:32 pm
Then it is not the piece cash causing the leaks, but something else.

Better run ktorrent under valgrind, even if it is very slow.
George
Moderator
Posts
5421
Karma
1

Tue Jan 06, 2009 1:58 pm
I have managed to fix some leaks in the KT code, there are still some left in Qt and KDE code, but those I can't fix.

So try the latest SVN version and see if it improves things over the long run.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]