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

[r801907] RAM, CPU and Disk use issues

Tags: None
(comma "," separated)
imported4-Tomasu
Registered Member
Posts
302
Karma
0
First off I would like to thank all the developers who work on ktorrent, its been excellent for a long time now :)

I have to report though a few issues,

1. I have ktorrent set to download to ~/data/bittorent/incomplete, and move files to ~/data/bittorrent, if however a torrent is stopped, the torrent is removed from ktorrent but the data is kept, upon importing and restarting the torrent again, it'll try and move the file over itself once its done, which does give a nice Error dialog, but it also deletes the file it was trying to move. Its just gone, not in my incomplete folder, and not in the main folder. And ktorrent can't find it either, when it starts seeding it cant find it, asks to recreate it, and then goes back into the download queue.

2. VERY serious memory usage. svn currently uses way more ram than 2.x did. Sure, I load it up with a ton of torrents, but I did the same to 2.x as well. At no point should ktorrent be using up over a Gig of ram. Where did the "memory use" options go?

3. CPU use is kind of high sometimes, I have 5 torrents seeding at any one time, and 10 downloading (I didn't used to limit downloads, but ktorrent will eat up all my ram if I let it, I have 2G), and one of its threads eats up a near constant 10%, and the others use 2%-10% each intermitently. I have a quadcore, so they are constantly eating up cpu on all cores. I immagine on a slower system with a single or dual core, it would be highly annoying seeing ktorrent use 20-40% of your cpu for 10 torrents. I assume the cause is the bandwidth limiting, I have to limit ktorrents upload speed to half my max, or my voip drops out :(
George
Moderator
Posts
5421
Karma
1

Sat Aug 23, 2008 10:29 am
Revision 801907 is nearly 50000 revisions below the latest commit (850570), try upgrading. It is not very useful for us if you aren't running recent SVN code.
imported4-Tomasu
Registered Member
Posts
302
Karma
0

Sat Aug 23, 2008 8:12 pm
I looked at the number of actuall commits to ktorrent since, and there was like 5? I think you're letting the over all global svn commit number fool you :o kde has become quite busy as of late. I can try upgrading, but I didn't notice anything in the rss feed that would fix any of my issues. And till then I still have more kde 4.1 memory issues like kdelibs not actually letting closed applications exit (fixed for 4.1.1 I hear).
imported4-Tomasu
Registered Member
Posts
302
Karma
0

Sat Aug 23, 2008 8:55 pm
Yeah, it seems I gave the wrong revision. Opps. Thats for an older 2.x based ktorrent. And I think I lost the directory for the 3.x version I built, so I cant find the right revision number, all I know is its 3.2dev (is what ktorrent itself says).

I'm in the process of building another. I'll get back to you with results..
imported4-Tomasu
Registered Member
Posts
302
Karma
0

Sat Aug 23, 2008 9:39 pm
Ok, its still deleting downloads when they exist in the directory its trying to move them too. Memory useage is bearable, 364MB res, 1.02G virt (I have no swap, its too annoying to see my machine swap storm for 30 minutes ::))
George
Moderator
Posts
5421
Karma
1

Mon Aug 25, 2008 6:35 pm
Tomasu wrote:Ok, its still deleting downloads when they exist in the directory its trying to move them too. Memory useage is bearable, 364MB res, 1.02G virt (I have no swap, its too annoying to see my machine swap storm for 30 minutes ::))


We do check for this, but maybe there is something wrong with the check.

But I haven't been able to reproduce it. Do you use the import dialog, to import it, or the normal dialog file selection dialog ?
imported4-Tomasu
Registered Member
Posts
302
Karma
0

Mon Aug 25, 2008 7:01 pm
I think they originally imported on startup, and/or the kde3 import option. I did it a while back now. And I think files keep being removed when they finish, each time, IIRC I think one of the torrents has downloaded a couple times now only to be lost...

I'm not sure what the import method has to do with it though, shouldn't it just always check that it isn't trying to copy a file to itself?
imported4-Tomasu
Registered Member
Posts
302
Karma
0

Wed Aug 27, 2008 9:40 pm
Now its crashing. A lot. Nothing in the stdout log, even though I enabled full debug mode, and stderr gave "Bus Error". the ktorrent log doesn't seem to say anything in regards to the crash, last few items:
Code: Select all
Wed Aug 27 15:38:29 2008: DHT: Got 3 potential peers for torrent [Haruhi-Fr]_Suzumiya_Haruhi_no_Yûutsu_OST.rar
Wed Aug 27 15:38:29 2008: DHT: got getPeers request
Wed Aug 27 15:38:29 2008: Chunk 581 downloaded
Wed Aug 27 15:38:29 2008: PEX: found 3 peers
Wed Aug 27 15:38:29 2008: Chunk 499 downloaded


And it keeps asking me if I want to force seeding a bunch of torrents that I've already said no to.

edit: I've had to change to the debian package for now, svn wont stay up for more than a couple minutes at this point, and even with a debug version I get no useful debug info from it.
George
Moderator
Posts
5421
Karma
1

Thu Aug 28, 2008 8:22 pm
Could you run ktorrent in gdb ?

gdb `which ktorrent`

In gdb :
run --nofork

Then wait until something goes wrong, then you can generate a backtrace with :

bt

That should give use some idea what is going wrong.
imported4-Tomasu
Registered Member
Posts
302
Karma
0

Fri Aug 29, 2008 1:32 am
Yeah, I'm not sure what was wrong, or how I ended up with a version from svn that said it was 3.2dev, but wasn't trunk. I managed to get KDE trunk installed minus kdenetwork and kdemultimedia, and had to fetch ktorrent by hand, this time I made sure it was the right branch, and it seems to be ok, but mem use could be lower.. Right now its at 764Virt, 235Res.

One thing that is annoying still is this "maximum share ratio exceeded" box that keeps poping up on its own. Right now it keeps doing it for the same two torrents. Things stay queued even if you tell it no, you don't want it to continue seeding.

I'm still getting the "File exists where we are trying to move it to" dialog or whatever it says, I think the only button on any dialog that keeps it from deleting stuff is Cancel.

edit: Also, plasma crashed when I started ktorrent up. I have the ktorrent applet on my desktop.
George
Moderator
Posts
5421
Karma
1

Fri Aug 29, 2008 11:47 am
Tomasu wrote:Yeah, I'm not sure what was wrong, or how I ended up with a version from svn that said it was 3.2dev, but wasn't trunk. I managed to get KDE trunk installed minus kdenetwork and kdemultimedia, and had to fetch ktorrent by hand, this time I made sure it was the right branch, and it seems to be ok, but mem use could be lower.. Right now its at 764Virt, 235Res.


I'm revamping the entire chunk memory management system at the moment, which will lead to a reduction in memory usage.

One thing that is annoying still is this "maximum share ratio exceeded" box that keeps poping up on its own. Right now it keeps doing it for the same two torrents. Things stay queued even if you tell it no, you don't want it to continue seeding.


I will fix this

I'm still getting the "File exists where we are trying to move it to" dialog or whatever it says, I think the only button on any dialog that keeps it from deleting stuff is Cancel.


I think I found the cause of this problem, will fix it later today

edit: Also, plasma crashed when I started ktorrent up. I have the ktorrent applet on my desktop.


The applet is still under development, and is not production ready
imported4-Tomasu
Registered Member
Posts
302
Karma
0

Fri Aug 29, 2008 5:34 pm
Very nice. One more thing, related to the "File exists" thing, yesterday, parts of two files in a batch torrent were very incomplete, after ktorrent decided the entire thing was done, the last two actually, the last was 12% or less, and upon ktorrent trying to overwrite it with itself, the file disappeared before I could press cancel on the dialog, and now its downloaded again, but the file is still missing, and the second last file is still stuck at 97%, it seems its downloaded them in my "incomplete" folder, instead of the one where it existed, where it is trying to overwrite...
imported4-Tomasu
Registered Member
Posts
302
Karma
0

Sat Aug 30, 2008 6:58 am
A lot of the issues are gone, but some files are still being removed somehow. Right now its down to three of four torrents (that I know of), one is a single file torrent, the others are batch torrents, and in the batch torrents case, its only one single file in each that's being removed. They show up in the Files dock as the last file in the tree.

First I get a "source and destination are the same" dialog, and poof, the file is gone, and upon uploading it rechecks the file and sees the missing file, and sets it to download again.

I'm trying one last thing, moving one of the batch torrents into my incomplete folder (which didn't work till I "touch missing.file", or it complains that the missing file is well, missing, and does nothing), and restarted. I'll report how that does once it's done.

edit: yes, I updated to at least r854561
imported4-Tomasu
Registered Member
Posts
302
Karma
0

Sat Aug 30, 2008 10:15 pm
Moving the torrent into the download folder does indeed work. Course I had to remove the temporary copy that was placed in there by ktorrent at some time in the past.
George
Moderator
Posts
5421
Karma
1

Tue Sep 02, 2008 5:57 pm
All the memory management changes are now complete, so latest SVN should use a lot less memory when downloading and seeding.


Bookmarks



Who is online

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