Author Topic: High CPU usage when Torrenting??  (Read 2319 times)

Offline flynn

  • Member
  • Posts: 118
High CPU usage when Torrenting??
« on: October 09, 2011, 11:31:21 PM »
Been curious about this for a while, opinions please??

Switched to an SSD and 70/10 fiber optic at the same time a month or so ago, but am only making guesses as what the souce of the cause is...
Anything over 800kB/s down pushes CPU up to 40+%~~ never used to be this high...

Didn't have this before on a platter HDD and ASDL...
No major deal, but if I could keep the usage down and the speed up, would be great?
Havent messed with core affinity or anything, is this nature of the product??

I understand more data is going to increase computing workload but such a massive jump compared to platter drive and even torrenting at the same speeds I used to get dosent add up... Do SSD require so much more CPU time or have I got this configured wrong @_@?

WinXP32, SSD OS, F3spinpoint HDD directory folder(write to).
No idea if this new router (switched ISP to fiber) handles packets differently? thought the OSI was p2p data universal standard...
Thanks for reading.

SPEC
(click to show/hide)



« Last Edit: November 14, 2011, 09:57:03 PM by flynn »

Offline kureshii

  • Former Staff
  • Member
  • Posts: 4485
  • May typeset edited light novels if asked nicely.
Re: High CPU usage when Torrenting??
« Reply #1 on: October 09, 2011, 11:46:34 PM »
Does setting net.low_cpu to true in advanced options resolve the issue? Can't remember if BT Mainline has this option though.

http://forum.utorrent.com/viewtopic.php?pid=399156 This thread might be interesting. See if your issue is the same, i.e. BT causing lots of hardware interrupts to show up in Process Explorer.
« Last Edit: October 09, 2011, 11:52:41 PM by kureshii »

Offline flynn

  • Member
  • Posts: 118
Re: High CPU usage when Torrenting??
« Reply #2 on: October 10, 2011, 12:58:17 AM »
Thanks for the rapid response kureshii :p
It made a noticable, although not significant difference, running afue process elimantion tests,
any one any idea what the bottleneck would be when data transfer is high 4-7 mb/s down on this build?
im thinking ram or OS, but could be FSB northbridge?

Dosent seem to be hardware interrupts, like in the link, I'm kinda waiving towards mass data handiling as I never got better than 800kB/s on my old line, but I just dont have anything to comapare to.
it seems when you hit 900/1mb/s cpu usage rockets rather than steadily increasing, the same usage if 1.4mb/s as 7mb/s ...wut?

Anyone have a similar situation on CPU when torrenting @2mb/s++ ??
Obviously more data more handling, but whats a normal ratio to data:cpu usage??


Offline kureshii

  • Former Staff
  • Member
  • Posts: 4485
  • May typeset edited light novels if asked nicely.
Re: High CPU usage when Torrenting??
« Reply #3 on: October 10, 2011, 03:43:41 AM »
I have a 6Mbps ADSL connection and never saw anything that high (unless uTorrent was hashing something). My guess would be either disk io or the NIC. How are the spinpoints set up?

Time to set up performance counters :)
« Last Edit: October 10, 2011, 02:08:43 PM by kureshii »

Offline cyberbeing

  • Member
  • Posts: 62
Re: High CPU usage when Torrenting??
« Reply #4 on: October 10, 2011, 08:39:20 AM »
Do you run a software firewall, security suite, or anti-virus? If so, try adding your bittorrent client as an exception for both real-time and network scanning. If that doesn't work, also add your download directory as an exception.

Are you sure that TCP/UDP Checksum Offload, Interrupt Modulation and other Offload options are enabled in your NIC driver? They should all help reduce CPU load.

If all else fails, go into your Bittorent client's advanced options and try setting bt.transp_disposition = 5 which disabled uTP, the potential cause of your high CPU load.
« Last Edit: October 10, 2011, 08:41:02 AM by cyberbeing »

Offline Kyrdua

  • Member
  • Posts: 7306
  • I have no idea what i'm doing.
    • Lunatic Red (A member there XD)
Re: High CPU usage when Torrenting??
« Reply #5 on: October 10, 2011, 10:23:24 AM »
I remember tweaking around with Advanced>Disk Cache when this happened to me on utorrert 3.0, worked.
but unfortunately i cannot remember which settings i used back then, and this one's the only thing i've found with semi-relevant information.

btw, my speed is around 1.4 Mbps DL/256 Kbps UL. it happened (probably, because i haven't encountered it since removing said torrent) because of a huge torrent with many files i partial downloaded.
 avatar/signature: Touhou | My Links | MyAnimelist

Offline flynn

  • Member
  • Posts: 118
Re: High CPU usage when Torrenting??
« Reply #6 on: October 10, 2011, 01:11:32 PM »
The more you know! Thanks all for the input, just doing up some research now...

@kureshii They are just set up as individual seperate drives, no raid config, too lazy :p
               and thanks for that performace counter tip, handy tool and I fucking love watching graphs!!

@cyberbeing I only run firewall and its all configured and forwarded correctly, I ran bittorrent with it off too see,
                  but was still 'thrashing'...
                  All offloads are enabled for the NIC, not sure how to check the Interupt Modulation? I dont have an option for it
                  in the NIC panel? Is this adapter dependant optional? or OS? Didnt find much in the googles about it in XP.
                  OKAY- bt.transp_disposition = 5 I am a little confused about, from what I understand setting this to 5 equates
                  to 4+1 allow out/in TCP connections ??
 
(click to show/hide)
                    I have no idea how accurate this data is. So by setting it to 5, this would ONLY allow TCP data and block uTP??
                    And how would this affect torrent speed, hashfail, packet loss ect, from what I understand uTP is implemented to
                    controll packet flow for application usage? with it off I'd be effectivly DDOS'ing myself with a flood of data at the
                    fastest rate with bittotrrent as the priority service? Causing the same workload because it would still be an equal
                    amount of data as it was before? I cant see how this would reduce CPU time?
                    Please correct me if im totaly wrong here !!

@Kyrdua  Thanks for that guide it's very comprehensive, a good read.
               I'm a little confused with disk caching in my set up, I'm assumng it caches the data in the drive where the torrent is
               stored? Or am I wrong and it caches it on the OS drive where the client is running? Because caching is disabled on my
               OS SSD, but not the directory drive... Could be onto something there :p
               Also, I never considered that it would make a difference if I was downloading parts of a large torrent compared to
               downloading one large file of one torrent, I thought it didnt make a difference as to the file sizes and content because
               of the nature of the protocol breaking it all down to blocks and pieces... I'll do a little testing here too I guess >.<
 
Thanks again for the advice, looks like I have a lot of tinkering around to do !! haha 8)

Offline cyberbeing

  • Member
  • Posts: 62
Re: High CPU usage when Torrenting??
« Reply #7 on: October 10, 2011, 01:48:05 PM »
Yes, setting bt.transp_dispositi on = 5 means you only accept and receive TCP connections, effectively disabling uTP. Unless you know your ISP throttles torrent traffic, using TCP-only should increase speeds, reduce CPU load, and decrease the chance of a DoS condition.

The problem with uTP is that some firewalls/antivirus/nics/routers aren't designed the handle the extreme amount of UDP traffic it generates, so you can end up creating a Denial-of-Service attack on yourself. While TCP is usually processed on a per-connection basis as a data-stream with continuations, UDP is handled by most hardware/software on a per packet basis. The increased processing load of uTP with your fast connection may be the cause of your high CPU usage. When you make this change, I would also grab a new IP address (if you have a Dynamic IP), or (if you have a Static IP) change your torrenting port and have your router block all remote traffic to the old port.
« Last Edit: October 10, 2011, 01:55:09 PM by cyberbeing »

Offline kureshii

  • Former Staff
  • Member
  • Posts: 4485
  • May typeset edited light novels if asked nicely.
Re: High CPU usage when Torrenting??
« Reply #8 on: October 10, 2011, 02:13:33 PM »
I'm a little confused with disk caching in my set up, I'm assumng it caches the data in the drive where the torrent is stored? Or am I wrong and it caches it on the OS drive where the client is running?
Downloaded blocks are cached in memory, and written to disk every so often so as to minimise the number of disk writes/reads. You can tune when and how often blocks are written out to disk. Set it too high/frequent and you have heavier disk IO; set it too low and you have high memory usage (for a fast connection, that is).

Torrenting doesn’t often put really heavy IO load on disks though, especially not on a 70/10 line, so it is most likely a networking/NIC issue. Try cyberbeing’s tip about uTP.

Offline Kyrdua

  • Member
  • Posts: 7306
  • I have no idea what i'm doing.
    • Lunatic Red (A member there XD)
Re: High CPU usage when Torrenting??
« Reply #9 on: October 11, 2011, 02:24:04 AM »
@flynn:
Hmm, Basically what Kureshii said. and it has nothing to do with the OS/Directory drive i think, but rather
where the torrent files are, which would be on either depending on where you saved it.

anyway, regarding the IO r/w & caching settings skyrocketing CPU usage
I think it was because of the large number of blocks in the torrent, and there were huge gaps between the pieces
but i'm not really sure how that causes utorrent to do extra work on seeding, in fact, the number of pieces may
have nothing to do with it at all, so don't take my word for it on this.

to explain further why i think this is the problem:
the torrent itself was around a few hundred Gigabytes, and has thousands of files. Going about
my usual torrenting habits nothing happened for a few weeks, but as i downloaded more and more files
(but not all of the files in it) utorrent would randomly consume an insane amount of CPU while seeding.
So, I tweaked around with the caching and it solved the issue.

but as i've said, i forgot the exact settings. and i don't really get why it worked myself. I'll try to add
the torrent again sometime with uT 1.8.5 and see if it still happens with the default cache settings.

 avatar/signature: Touhou | My Links | MyAnimelist

Offline Bozobub

  • Member
  • Posts: 956
  • Demon Lord of Clowns
Re: High CPU usage when Torrenting??
« Reply #10 on: October 12, 2011, 11:45:52 AM »
What are your per-torrent and global connection limits?  If either is set too high (or set to "unlimited") you eventually will see a rather significant performance hit.  Anything over 200-300 (global) is usually overkill.

Offline AncientRome

  • Member
  • Posts: 7
Re: High CPU usage when Torrenting??
« Reply #11 on: October 20, 2011, 04:23:34 PM »
Whenever uTorrent starts to use a lot of memory (consistently) or CPU usage, I just restart the PC.
For me, that's usually a sign that I haven't reset the PC in about 2 or 3 weeks.

When you restart, I suppose it's the peer list(s) that get refreshed or rest and I think there is an advanced option that you can use to reset the peer lists on torrents.
« Last Edit: October 20, 2011, 06:37:58 PM by AncientRome »

Offline Freezeron

  • Member
  • Posts: 7
Re: High CPU usage when Torrenting??
« Reply #12 on: October 29, 2011, 07:04:34 PM »
uTorrent is going havoc on any version from 3.## Stable. The bug is known, and I (and a massive load of people) still wait for a fix (do you happen by any means to have a 64bit edition OS installed too?).
Had to get to a early beta edition to download right (and not get my PC out of breath) but as I can see BakaBT has banned (for their own good reasons) the betas.
So I have to wait for now...  :o

Offline Freezeron

  • Member
  • Posts: 7
Re: High CPU usage when Torrenting??
« Reply #13 on: November 01, 2011, 03:58:37 PM »
Ok, one little update from my side...
I did a super house keeping from uTorrent (as beta 32bit version started to behave strangely again...), total delete from anything saying uTorrent on it and installed the 64bit version of uT (as reported earlier I'm on 64bit OS).
For now the PC is a whisper as I have only the usual (finally) noise and resources footprint of a working uT (3% of CPU and a lot less utilized RAM, even with huge downloads).
Will update if the problem is coming back... Hope no  :P

Offline flynn

  • Member
  • Posts: 118
Re: High CPU usage when Torrenting??
« Reply #14 on: November 14, 2011, 09:55:20 PM »
So, after along thread over at the corsair forumz and multiple alignments, partitions, offsets and reinstalls with no solution for XP, I took the plunge and grabbed Win7pro x64 and racked 12gb of 1333 DDR3 in there, (Looks hawt as fuck^^)

and sofar the problem is RESOLVED :D

Just have a long list of updates to trawl through and check wtf is what, running SP1 from stock, anything to avoid ?_?

Anyways, Thank you too all that posted, your knowledge is always appreciated!! :D