aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: [1] 2

Author Topic: High CPU Load  (Read 15676 times)

dashaund

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 25
High CPU Load
« on: November 02, 2005, 05:58:23 AM »

Didn't see this one posted recently, so I thought I would.  I'm experiencing an extremely high CPU load with aMule right now.  I tried the preconfigured binary (10-06) and downloaded the CVS binary (11-01), and both versions have the same result; aMule maxes out my cpu to 100%.  I have debug on, so if you guys need someting, tell me and I'll send it.  The weird thing is that it just started doing this.  The 10-06 build didn't do this in the past.  I THINK it might have something to do with the recent Mac OSX 10.4.3 system update.  Anyone else seeing this?
Logged

lionel77

  • Provider of Mac builds, Forum Mod
  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 1107
  • Mac OS X 10.4 (Power Mac G5)
Re: High CPU Load
« Reply #1 on: November 02, 2005, 07:29:21 AM »

Recent CVS builds exhibit a high cpu utilization here, too. It usually takes a couple hours for this to happen but then amule reaches ~100% and stays there. Since I'm running 10.3.9 I think we can rule out that it is related to the recent 10.4.3 update.
Speaking of 10.4.3, can you run amule for a few hours and then do "netstat -aLp tcp | grep -w 4662" (with 4226 being your amule tcp port) in the terminal? I would be very interested in the output.

I've been working with ken now for a while on tracking down the memory corruptions that make amule relatively unstable, so I haven't had time to investigate the cpu load issue further.
Could you try to get a better idea of the time course of this issue? That would be really great. For instance, it would be interesting to know whether the increase is gradual or sudden and how long it usually takes. :)
Logged
Current aMule CVS builds for OS X can be found here.

dashaund

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 25
Re: High CPU Load
« Reply #2 on: November 02, 2005, 11:33:53 PM »

The high CPU load only lasts for the first 5-10mins on startup, and then goes away.  I'm assuming it maxes out while initally connecting to servers/peers/Kad, etc...  When I run netstat I get:

0/0/5          *.9662

Being, my aMule TCP port is 9662.  Let me know if I can be more of a help.
Logged

lionel77

  • Provider of Mac builds, Forum Mod
  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 1107
  • Mac OS X 10.4 (Power Mac G5)
Re: High CPU Load
« Reply #3 on: November 03, 2005, 01:50:52 AM »

If it's right after startup, it could also be amule hashing files.
I guess, I need to do a more systematic investigation on the high cpu load issues on my machine. Problem is, I've compiled about 40 different amule versions over the last four weeks with various patches while hunting the memory corruption, so I kinda lost track under which circumstances i was experiencing the high cpu load. ;)

Quote
0/0/5 *.9662
This is very excellent as it indicates that Apple really did fix the stuck connections issue, that Tiger users were suffering from. So from now on I can post unpatched amule binaries again. :)
Logged
Current aMule CVS builds for OS X can be found here.

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: High CPU Load
« Reply #4 on: November 03, 2005, 04:10:16 PM »

Here's a way to provide us more information to help us figure out what's going on.  When aMule is using lots of CPU, open a Terminal window (Applications -> Utilities -> Terminal) and type the command:

sample amule 10

and post the resulting file to this thread.

Thanks for you help.  :)
Logged

dashaund

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 25
Re: High CPU Load
« Reply #5 on: November 03, 2005, 06:07:08 PM »

Okay, I ran it, and the attacthment is what I came up with.  I had to .zip it because it was too big...go figure.
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: High CPU Load
« Reply #6 on: November 04, 2005, 03:09:29 AM »

OK, that was big.  ;)

One thing I noticed is that one of the culprits in using the CPU time is code in Kad that was just recently made more efficient (thanks to lupz).  So, the next CVS snapshot or release should improve in that regard.

The second thing is that this looks like it's right during aMule's startup.  Which I guess is what you are reporting.  Well, ideally we wouldn't want aMule to be quite so hungry even during startup, but you should understand that it's doing a lot of setup work right then.  So, some high rates of CPU use are to be expected.

If it keeps using high CPU after you think it should be fully initialized and settled down, we'll re-examine the issue.
Logged

dashaund

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 25
Re: High CPU Load
« Reply #7 on: November 04, 2005, 04:58:49 PM »

Yeah, I understood that it is going to use a lot of CPU cycles at startup...that's just common sense.  I was just concerned about the fact that it seems to temporarily handcuff the interface with the 100% load, then it tapers off and everything is fine.  I'll download the nightly and see if everything if okay.  I really appreciate the hard work you guys invest in this project.  It is truly one of the premier open source projects out there!
Logged

lionel77

  • Provider of Mac builds, Forum Mod
  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 1107
  • Mac OS X 10.4 (Power Mac G5)
Re: High CPU Load
« Reply #8 on: November 05, 2005, 08:44:07 AM »

I just noticed amule taking up 100-120% CPU time on my dual G4 1.8ghz (after running for ~ 24h). I'll keep an eye on it but I would be surprised if CPU usage went down again without restarting amule. I've attached the output from 'sample'.

[rev 5636 // wx cvs 2005-11-03 // ken's latest anti-memory corruption patch]
Logged
Current aMule CVS builds for OS X can be found here.

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: High CPU Load
« Reply #9 on: November 05, 2005, 09:43:04 PM »

Hmm.  Well, I don't see anything obvious in the sample.  aMule is spending its time doing all sorts of different things.  There's no one thing that seems to be taking an inordinate amount of time.

If this happens again, it will be good to check other samples.  Maybe a pattern will emerge.

Out of curiousity, is this the aMule session that crashed on quit?  If so, it might be a symptom of the same underlying problem (memory corruption?).
Logged

lionel77

  • Provider of Mac builds, Forum Mod
  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 1107
  • Mac OS X 10.4 (Power Mac G5)
Re: High CPU Load
« Reply #10 on: November 06, 2005, 12:17:25 AM »

I think I closed amule (without experiencing a crash) an hour or so after after I pulled out the samples, but I'm not 100% sure.
It seems like once the CPU usage is high it really stays that way until you quit amule. If you think it would be helpful, I can take a sequence of samples (say every 10min or so) once the CPU load is high again.

In any case, I will have a close eye on the potential relationship between the high CPU load and the memory corruption crashes on quit.
Logged
Current aMule CVS builds for OS X can be found here.

agav

  • Guest
Re: High CPU Load
« Reply #11 on: November 27, 2005, 05:50:06 PM »

had the same problem. if this post is still an issue: i switched off the options containing "high cpu load".
Logged

lionel77

  • Provider of Mac builds, Forum Mod
  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 1107
  • Mac OS X 10.4 (Power Mac G5)
Re: High CPU Load
« Reply #12 on: December 05, 2005, 07:20:40 AM »

Ken, just a quick update:

It's definitively not the Tab Info thing -- as I mentioned earlier, I did a test where I turned off all those (frequently) updated info things in the GUI (including "show transfer speeds in title bar" etc.) and aMule is still maxing out my CPU.

I shark'ed a bit more but I didn't discover any smoking gun. But then again, that does not have to mean much.

Right now I'm testing if I get the same effect using an older version of wx (namely 2.6.2). Let's see how that goes...
Logged
Current aMule CVS builds for OS X can be found here.

lionel77

  • Provider of Mac builds, Forum Mod
  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 1107
  • Mac OS X 10.4 (Power Mac G5)
Re: High CPU Load
« Reply #13 on: December 19, 2005, 08:31:27 AM »

Fellow Mac users, ;)

are you experiencing excessive CPU utilization with the aMule CVS binaries, too?
I don't seem to get it if I only download a handful of files, but whenever I download 20-30 files with a number of popular ones among them, aMule completely maxes out my CPUs (dual g4 1.8gz). It would be very helpful to us to know if this is a universal effect of it is limited to certain system variables (e.g., only dual processor machines, only 10.3, etc.).

A simple tool for tracking your overall CPU usage is MenuMeters. When you notice that your CPU load is high, you can go to Applications->Utilities->Activity Monitor to see if indeed aMule is the culprit.

Your feedback on this is highly appreciated. :)
Logged
Current aMule CVS builds for OS X can be found here.

salamiaal

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
Re: High CPU Load
« Reply #14 on: December 21, 2005, 10:30:04 AM »

hi!
i've tried the latest cvs-build (aMule-Mac.CVS.2005-12-21.debug.zip) and there is no indication excessive cpu utilization on my machine. i've also downloaded 20-30 files. the cpu load raises partly to 100%, however only some seconds. Afterwards everything made a normal impression (see attachment).

my system:
g4 1.4 ghz (mac mini) with mac os x 10.3.9
Logged
Pages: [1] 2