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

Net extremely sluggish with new ktorrent

Tags: None
(comma "," separated)
Fjodor
Registered Member
Posts
9
Karma
0
Hi all.

It would seem that whenever I run ktorrent 2.0.3, network access on my entire network (a stationary and a laptop, connected via wifi and a linux ap/router) gets extremely sluggish, bordering on unusable. Everything takes forever, even dns lookups. This happens even though the average dl speed is around 20Kb/s on a 4Mbit connection.

Upload is uncapped, as this is the only way to get any traffic downstream, which is another regression from 1.2. There is no change in sluggishness if I cap it at 1kb/s.

Allowed number of connections is set at 400. CPU load on the router is below 0.1. uPnP isn't loaded, as ports are configured to be forwarded.

What changes may have caused these regressions since 1.2?

Best regards,

Fjodor
imported4-Ivan
Registered Member
Posts
819
Karma
0

Fri Oct 20, 2006 3:46 pm
Something is definitely wrong there since KT is not using your full bandwidth but your network is slow. Are you 100% sure KT is causing this? I haven't heard anybody with similar problem.
Fjodor
Registered Member
Posts
9
Karma
0

Fri Oct 20, 2006 3:51 pm
Fairly sure, as the problem only shows while ktorrent is running, and it only takes shutting down ktorrent for the net to get back to normal...

/Fjodor
stoeptegel
Registered Member
Posts
1075
Karma
0

Fri Oct 20, 2006 6:51 pm
First time i hear about such problem too.
What makes me wonder is why other computers are effected too.
Seeing the whole network is affected at the same time, it should have been caused by a reasonable source.

This sluggishness applies only for traffic that goes to the internet, LAN-only traffic is just fine?
Does this happen with other bittorrent clients too?
Fjodor
Registered Member
Posts
9
Karma
0

Fri Oct 20, 2006 8:53 pm
Local file transfer seems to be marginally slower, 5-10% or so.

I haven't seen it with e.g. mldonkey, and as stated, neither did I see it with ktorrent 1.2.

What can I do to narrow down the cause?

Best regards,

Fjodor
George
Moderator
Posts
5421
Karma
1

Sat Oct 21, 2006 10:48 am
1.2 didn't set the TOS byte in IP packets, The current version does. The TOS byte influences how the router will route packets. So this could be the reason, we would need to test this.

Currently to change this, you need to modify the code. We can tell you what you need to change. If you are not afraid of compiling, you need to do this :

in libktorrent/mse/streamsocket.cpp replace all lines with this in :

sock->setTOS(IPTOS_THROUGHPUT);

by

// sock->setTOS(IPTOS_THROUGHPUT);


Then recompile and install again and see if that brings any improvements.
Fjodor
Registered Member
Posts
9
Karma
0

Sat Oct 21, 2006 11:27 am
Just waiting for the ubuntu edgy repos to become consisten again, as I am unable to install some prerequisites atm. Will report back, but possibly not until tomorrow, as I am attending a ph.d. celebration party in a few hours.

Best regards,

Fjodor
Fjodor
Registered Member
Posts
9
Karma
0

Mon Oct 23, 2006 10:37 am
Commenting out the setTOS statements make no difference. What else might we try?

Best regards,

Fjodor
Fjodor
Registered Member
Posts
9
Karma
0

Semi-solved?

Mon Oct 23, 2006 1:40 pm
Another point I was about to make, was that my dowload rate would almost never go higher than the current upload rate.

To get anything downloaded at all, I had set the upload rate to 0 (unlimited), but have now found, that capping it at 10 seems to get me enough "goodwill" with other peers to nearly max out my connection dl-wise.

With this setting, I also get around the sluggishness of my connection (or so it seems. Testing atm), but I cannot tell if it is the settings plus no setTOS, or the settings alone.

I noticed that with uncapped upload, the dowload speed would oscilate between 5-6 kb/s to 40-50kb/s and the same for the upload rate. Someone should investigate this, and I'll be happy to help, if I'm given directions for what to do.

Best regards,

Fjodor
George
Moderator
Posts
5421
Karma
1

Re: Semi-solved?

Mon Oct 23, 2006 4:57 pm
Fjodor wrote:I noticed that with uncapped upload, the dowload speed would oscilate between 5-6 kb/s to 40-50kb/s and the same for the upload rate. Someone should investigate this, and I'll be happy to help, if I'm given directions for what to do.


You should try the latest from SVN, I made some improvements the past weekend which managed to get my BSG torrent downloaded faster then ever before.
prezidentchimp
Registered Member
Posts
2
Karma
0
Yes.. using v2.03 is causing internet access through my router to stall... my computer and two others not using ktorrent on my subnet. Throttling down to 1k per second didn't alleviate the problem. I think (without actually knowing how this works, so maybe I'm not best qualified to suggest this reason) that ktorrent is flooding the network with requests for chunks or new peers.

I was really quite liking ktorrent2.03 until the users of the other two computers began complaining. The version I had off the official kubuntu repository didn't do this to everyone, just my own internet performance was degraded by that version.
Fjodor
Registered Member
Posts
9
Karma
0

Mon Oct 23, 2006 7:57 pm
I think now would be a perfect time to say that the svn version seems to be working welll :-)

/Fjodor
prezidentchimp
Registered Member
Posts
2
Karma
0

Mon Oct 23, 2006 8:09 pm
Fjodor wrote:I think now would be a perfect time to say that the svn version seems to be working welll :-)

/Fjodor


If only I knew how to do that compiling stuff.. I think I'll just take the easy way out and start the downloads when everyone else has gone to bed, and then check with the ktorrent download page some time in the future to see if a 2.04 debian package is available. Its good otherwise though (my otherwise favorite client in linux), so thanks to the people who have taken it thus far!
Fjodor
Registered Member
Posts
9
Karma
0

Tue Oct 24, 2006 5:50 am
I hope this is ok with the developers...

I put two files on my website, http://molgaard.org/ktorrent/ktorrent_2 ... buntu5.dsc and http://molgaard.org/ktorrent/ktorrent_2 ... tu5.tar.gz

Download them to some dir and run
dpkg-source -x ktorrent_2.0.3+svn20061023-0ubuntu5.dsc

That should give you a dir ktorrent-2.0.3+svn20061023. cd to that.

Now run dpkg-buildpackage -rfakeroot.

This will probably complain of missing packages (possibly even fakeroot itself), so you should sudo apt-get install those.

Now run dpkg-buildpackage -rfakeroot again, and it should build you a nice .deb in ../ relative to the ktorrent dir you're in. sudo dpkg -i that .deb, and you should be good to go.

If you wonder why it's called something or other with ubuntu, that because that's what I use, but it should work for regular debian too.

Best regards,

Fjodor
Fjodor
Registered Member
Posts
9
Karma
0

Tue Oct 24, 2006 12:05 pm
Now, to go with my praises of the svn version, I should probably say something about the overhead traffic.

It would seem that quite a bit of this is generated, as I'm currently seeing outbound traffic in the 200-500kb/s area, while ktorrent is reporting 100-150kb/s.

I wouldn't know if this is caused by DHT or something else, but it does seem a bit high compared to what I saw with mldonkey.

On the plus side, however, this traffic is actually shown on my bandwith meter (gkrellm), instead of the net being silently "clogged" as before.
Naturally, regular net access may slow down a bit because of this, but nothing like before. I still would like to know the cause and reason for this, though.

Best regards,

Fjodor


Bookmarks



Who is online

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