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

cpu hog while seeding

Tags: None
(comma "," separated)
ambro626
Registered Member
Posts
9
Karma
0

cpu hog while seeding

Sat Jul 26, 2008 9:00 pm
When I start seeding a downloaded torrent, ktorrent starts using about 20% CPU. If I activate another one, it uses all CPU.

Strace shows these calls repeating very fast immediately after activating a torrent:
Code: Select all
[pid  4067] poll([{fd=53, events=POLLIN, revents=POLLIN}], 1, 1000) = 1             
[pid  4067] gettimeofday({1217103865, 161328}, NULL) = 0                             
[pid  4067] ioctl(53, FIONREAD, [0])    = 0                                         
[pid  4067] poll([{fd=53, events=POLLIN, revents=POLLIN}], 1, 1000) = 1             
[pid  4067] gettimeofday({1217103865, 161473}, NULL) = 0                             
[pid  4067] ioctl(53, FIONREAD, [0])    = 0                                         
[pid  4067] poll([{fd=53, events=POLLIN, revents=POLLIN}], 1, 1000) = 1             
[pid  4067] gettimeofday({1217103865, 161618}, NULL) = 0         


The fd in question is a TCP socket connected to some computer on the internet. It is polling for input on the socket but never handles it. Sometimes poll is cycling on two fds not one.
It only seems to happen with completed torrents, not the ones still downloading.
I've compiled ktorrent from svn a few hours ago, together with the rest of KDE.
George
Moderator
Posts
5421
Karma
1

Sun Jul 27, 2008 8:18 am
I see what the problem is, will fix it later today.
George
Moderator
Posts
5421
Karma
1

Mon Jul 28, 2008 11:19 am
This should be fixed.

Note: you may have to increase the network sleep interval in the advanced settings to something bigger (50, 100 or 200), my intention is to get rid of this parameter in the future.


Bookmarks



Who is online

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