We have discontinued this forum and moved support tickets to the GitHub issue tracker. More info

CPU/MEM Usage and not displaying in menu bar issue

Control fans on Apple hardware: iMacs, Macbooks, etc

Moderator: Steven

Post Reply
cfshelor
Posts: 10
Joined: 29 Apr 2013, 15:38

CPU/MEM Usage and not displaying in menu bar issue

Post by cfshelor »

I have a MacPro with dual quad-core processors and I was running 6 processor intensive jobs simultaneously. After 45 minutes the system locked. I downloaded a temperature monitor application and saw that several locations were in the 70 - 80 degrees C range. Knowing that commercial semiconductor parts are specified for 0 - 60 C operation, I figured it was a thermal lockup. I downloaded Mac Fan control and was lucky enough that the Northbridge sensor was in the list as it was my hottest spot in the Mac. I set all fans except the boost fans (I still don't know what they are so I left them alone.) to be proportional to the Northbridge chip starting at 55 C and max of 70 C. The PCI, PS, Exhaust, and Intake fans are now all running at about double their min RPM and 1/2 of max RPM. Northbridge is still my hottest spot, but it is 60 C, PCIe slot 2 is 58 C, processor cores are all below 50 C. FANTASTIC!!!

Now for the strange memory behavior. In the activity monitor, MacsFanControl is usually showing 471 MB of virtual memory with 250-300 MB resident. (This value appears to grow over time, so I think you have a memory leak.) The virtual memory value jumps around from 11 MB to 16 EB. 16 Exabytes?!?!?!? First, the median value of 470 MBytes seems absolutely HUGE for an application like this. Second, why is it jumping around so much? Third, 16 Exabytes? How can that happen? Is it possible that you are accessing a 64-bit library function when your MacsFanControl is running as a 32-bit application? I don't know if that is even close to what is going on, I can't really think of any reason why the OS would think the application needed 16 EB. (I have screen shots of activity monitor showing these values.)

I really like this application: simple, easy to use, does the job!

Wish list:
1 - Fix memory leak and virtual memory weirdness
2 - More sensors to select from for fan control.
3 - Put it on a diet, should be able to make its memory footprint significantly smaller
4 - Does it really need 10%-30% of a CPU to do its job, although I do occasionally see it drop to less than 1%, most of the time it shows around 15% of the CPU being used.

I'll be glad to help in any way that I can.

Charles
User avatar
Steven
CrystalIDEA Developer
Posts: 2294
Joined: 21 Dec 2009, 11:48
Location: CrystalIDEA headquarters
Contact:

Re: Strange memory behavior

Post by Steven »

Hi,

Thank you very much for the feedback.

We need
- screenshots of Macs Fan Control
- screenshots of Activity Monitor
1 - Fix memory leak and virtual memory weirdness
Will take a very deep look into it
2 - More sensors to select from for fan control.
Please copy technical info from the about dialog of the program and post results here.
4 - Does it really need 10%-30% of a CPU to do its job, although I do occasionally see it drop to less than 1%, most of the time it shows around 15% of the CPU being used.
This is strange, I'm having it around 1% all the time. Need some more information
cfshelor
Posts: 10
Joined: 29 Apr 2013, 15:38

Re: Strange memory behavior

Post by cfshelor »

I tried to attach screen shots. I keep getting sent to the login page after hitting the Upload attachment button. When I do login and return to the previous page my message has been deleted. I have been trying to submit this information for the last 25 minutes. I can't waste anymore time on this stupid forum interface. I'll gladly send the data you want, but I'll need an email address to use.

I do wish to update, that at this time MacsFanControl is displaying in Activity Monitor with only 1 thread (previously had been 6), 0.0% CPU, does not show up in the Finder's Force Quit window, and does not display an icon in the menu bar. Real memory shows 332 KB with virtual at 898.7 MB.

Charles
User avatar
Steven
CrystalIDEA Developer
Posts: 2294
Joined: 21 Dec 2009, 11:48
Location: CrystalIDEA headquarters
Contact:

Re: Strange memory behavior

Post by Steven »

cfshelor,

Use e-mail address on the page
http://www.crystalidea.com/contact
User avatar
Steven
CrystalIDEA Developer
Posts: 2294
Joined: 21 Dec 2009, 11:48
Location: CrystalIDEA headquarters
Contact:

Re: Strange memory behavior

Post by Steven »

Well,

Virtual memory is not actually the memory that is consumed. Don't worry about that
http://en.wikipedia.org/wiki/Virtual_memory

I currently run MFC and it consumes only 19 MB of actual memory with about 700 of MB VM reserved.

Some more examples: Finder has 3.5 GB of memory, Skype - 933 MB, iTunes - 2.5 MB

the main problem that concerns me now is CPU usage (It consumes of up to 2.6 % now on my 2010 iMac) and this:
MacsFanControl is displaying in Activity Monitor with only 1 thread
does not display an icon in the menu bar.
Does it happen often? Anyway to reproduce?

Thank you

PS. Renamed the topic.
cfshelor
Posts: 10
Joined: 29 Apr 2013, 15:38

Re: CPU/MEM Usage and not displaying in menu bar issue

Post by cfshelor »

I am indeed aware that VM is not a real issue; UNTIL is reaches the point where the sum of all of the VM sizes exceeds the free space on the start-up drive where the swap file is located. When that happens the OS sends messages that VM has exceeded allowable amounts and to force-quit applications. If you don't resolve the issue fairly quickly, the OS hangs up requiring a restart. VM of a few hundred MB or even several GB do not disturb me; however my drive will not support VM of 16 EB. Also, the fact that the VM is acting so erratically is a possible indication of some other underlying problem. I'll send screen shots to the email address shortly.

The loss of threads and disappearing icon from menu bar has happened once so far. Wednesday, double clicking the application icon would act like it started the application but accomplish nothing. However, this morning, (Friday) it did startup as expected. It is using 0.6 to 2.1 % CPU (Early 2009 MacPro, dual quad core 2.66 GHz, 16 GB RAM, OS X 10.8.3) Real Mem 22.2 MB, VM 117.5 MB.

After 30 minutes, it is using 2.2 to 3.2 % CPU, 31.8 MB real men, 155 MB Virtual.
Hiding to Menu Bar it dropped to 0.5 to 0.9 % CPU for about 15 seconds then returned to 2.2 to 3.2 % CPU.
User avatar
Steven
CrystalIDEA Developer
Posts: 2294
Joined: 21 Dec 2009, 11:48
Location: CrystalIDEA headquarters
Contact:

Re: CPU/MEM Usage and not displaying in menu bar issue

Post by Steven »

Current situation is ok.
Looking forward to screenshots (with EB vallues) and some more information how it happens
cfshelor
Posts: 10
Joined: 29 Apr 2013, 15:38

Re: CPU/MEM Usage and not displaying in menu bar issue

Post by cfshelor »

Some time over the weekend, MacsFanControl again dropped out of the menu bar and 5 of the 6 threads quit. I killed the remaining thread and restarted the application and it is running again. It just seems to partially quit after 2-3 days of running on my system. I do get some messages in console when MacsFanControl starts up. I will send a screen shot of those. I also have a 'backtrace' of the apparent crash which is dated 5/5/2013 at 3:19 am, that I will also send by email as it is rather large.

Charles
User avatar
Steven
CrystalIDEA Developer
Posts: 2294
Joined: 21 Dec 2009, 11:48
Location: CrystalIDEA headquarters
Contact:

Re: CPU/MEM Usage and not displaying in menu bar issue

Post by Steven »

Thanks, received. I'll work on a new build for mac now
cfshelor
Posts: 10
Joined: 29 Apr 2013, 15:38

Re: CPU/MEM Usage and not displaying in menu bar issue

Post by cfshelor »

Have installed beta 5. Here is screen shot with expanded sensor list.

expanded sensor list.png
expanded sensor list.png (92.96 KiB) Viewed 20261 times
User avatar
Steven
CrystalIDEA Developer
Posts: 2294
Joined: 21 Dec 2009, 11:48
Location: CrystalIDEA headquarters
Contact:

Re: CPU/MEM Usage and not displaying in menu bar issue

Post by Steven »

That looks awesome :smile:
Thank you

PS. It's not actually the real final beta 5
cfshelor
Posts: 10
Joined: 29 Apr 2013, 15:38

Re: CPU/MEM Usage and not displaying in menu bar issue

Post by cfshelor »

When I started it at 5:00 pm yesterday, it used 22.3 MB Real memory and used 2.3-3.7 %CPU. At 8:30 am, it is now at 451.5 MB Real memory and 7.3-71.1 %CPU. (That is not a typo, that was a 71.1% reading.) About half of the Activity Monitor readings are around 7 %. About 1 out of 5 in the 25% category and maybe 1 out of 20-25 above 50%. Still toggles between 6 and 7 threads. Virtual memory is still flopping around like a fish on the shore from 34 MB, usually at 592 MB, sometimes 1.8 GB or 16 EB. Both the Real memory and Virtual memory are gradually increasing. About 1.5 MB each during the time I have been watching the data and writing this message (about 15 minutes)
User avatar
Steven
CrystalIDEA Developer
Posts: 2294
Joined: 21 Dec 2009, 11:48
Location: CrystalIDEA headquarters
Contact:

Re: CPU/MEM Usage and not displaying in menu bar issue

Post by Steven »

Hi,

Thanks for information. I'll definitely work on optimizing CPU usage - there' some places of optimization.

451.5 MB - that's not good. The problem is that I'm not able to reproduce such issue :(

Virtual RAM usage is not a problem at the moment I think, stability is the main point. Please write me back if the testing version I've sent you via e-mail will crash.
cfshelor
Posts: 10
Joined: 29 Apr 2013, 15:38

Re: CPU/MEM Usage and not displaying in menu bar issue

Post by cfshelor »

I was not on the system yesterday and I have new symptoms this morning. The MFC icon was still in the menu bar, but I got a spinning beach ball when I moused over it and tried to bring up the window. (Got the beach ball before clicking the icon.)

Looked at activity monitor and there were over 200 MFC entries with 1 thread each. Tried to take a screen snapshot, but that did not work, tried to use terminal to do a ps -el into a pipe and got "-bash: fork: Resource temporarily unavailable". Tried to open the console and that failed. Finally had to do a restart and had several applications that had to be force quit.

After restart I opened console and found some messages like these:


5/8/13 8:43:10.763 AM MacsFanControl[12734]: Exception caught: couldn't fork: errno 35

I had to go back to yesterday's log file at 10:31 to locate the start of the problem, here is an excerpt from that file:


May 7 22:21:07 Charless-Mac-Pro.local MacsFanControl[12734]: Exception caught: *** -[NSRunLoop addPort:forMode:]: port argument cannot be nil
May 7 22:21:37 --- last message repeated 339 times ---
May 7 22:21:37 Charless-Mac-Pro.local MacsFanControl[12734]: Exception caught: *** -[NSRunLoop addPort:forMode:]: port argument cannot be nil
May 7 22:22:04 --- last message repeated 241 times ---
May 7 22:22:04 Charless-Mac-Pro.local MacsFanControl[12734]: LSScheduleNotificationInvalidationCallbackFunc(), server must have died or deleted our notification, notificationID=50425024 ( cf <rdar://problem/9658870> Client stops receiving LSNotifications from coreservicesd in some way )
May 7 22:22:04 Charless-Mac-Pro.local MacsFanControl[12734]: LSScheduleNotificationInvalidationCallbackFunc(), server must have died or deleted our notification, notificationID=50476128 ( cf <rdar://problem/9658870> Client stops receiving LSNotifications from coreservicesd in some way )
May 7 22:22:04 Charless-Mac-Pro.local MacsFanControl[12734]: Exception caught: *** -[NSRunLoop addPort:forMode:]: port argument cannot be nil
May 7 22:22:34 --- last message repeated 48 times ---
May 7 22:22:43 Charless-Mac-Pro.local MacsFanControl[12734]: Exception caught: couldn't fork: errno 35
May 7 22:23:07 Charless-Mac-Pro.local MacsFanControl[12734]: HIToolbox: received notification of WindowServer event port death.
May 7 22:23:07 Charless-Mac-Pro.local MacsFanControl[12734]: port matched the WindowServer port created in BindCGSToRunLoop
May 7 22:23:08 Charless-Mac-Pro.local MacsFanControl[12734]: BUG in libdispatch: 12D78 - 1539 - 0x1000600c
May 7 22:23:15 Charless-Mac-Pro.local MacsFanControl[12734]: Exception caught: couldn't fork: errno 35
May 7 22:23:47 Charless-Mac-Pro.local MacsFanControl[12734]: Exception caught: couldn't fork: errno 35
May 7 22:24:08 Charless-Mac-Pro com.apple.launchd.peruser.501[159] (com.apple.mdworker.shared.04000000-0000-0000-0000-000000000000): fork() failed, will try again in one second: 35: Resource temporarily unavailable
May 7 22:24:19 --- last message repeated 11 times ---
May 7 22:24:19 Charless-Mac-Pro.local MacsFanControl[12734]: Exception caught: couldn't fork: errno 35
May 7 22:24:20 Charless-Mac-Pro com.apple.launchd.peruser.501[159] (com.apple.mdworker.shared.04000000-0000-0000-0000-000000000000): fork() failed, will try again in one second: 35: Resource temporarily unavailable
May 7 22:24:50 --- last message repeated 29 times ---
May 7 22:24:50 Charless-Mac-Pro com.apple.launchd.peruser.501[159] (com.apple.mdworker.shared.04000000-0000-0000-0000-000000000000): fork() failed, will try again in one second: 35: Resource temporarily unavailable
May 7 22:24:51 --- last message repeated 1 time ---
May 7 22:24:51 Charless-Mac-Pro.local MacsFanControl[12734]: Exception caught: couldn't fork: errno 35
May 7 22:24:52 Charless-Mac-Pro com.apple.launchd.peruser.501[159] (com.apple.mdworker.shared.04000000-0000-0000-0000-000000000000): fork() failed, will try again in one second: 35: Resource temporarily unavailable
May 7 22:25:22 --- last message repeated 29 times ---

I did save the activity monitor file before I rebooted and it shows all of the MFC processes that were running. I will upload it as attachment processes.txt.zip
Attachments
Processes.txt.zip
(4.61 KiB) Downloaded 1110 times
cfshelor
Posts: 10
Joined: 29 Apr 2013, 15:38

Re: CPU/MEM Usage and not displaying in menu bar issue

Post by cfshelor »

OK, here is something else new. I restarted MFC after the reboot and about 30 minutes of use. It is obvious in the attached screenshot of Temperature Monitor where I started it. All fans reached maximum RPM and cooled the system down fairly quickly. This is good. However, look at the top 3 lines, the dark aqua color is the NorthBridge chip, the lime green is the PCI slot 2 sensor, and the black line is the NorthBridge heat sink. MFC has the exhaust, intake, boosta, and boostb fans controlled by the Northbridge Chip sensor as: fan speed start to increase from 53 and maximum temperature 65.

What is happening is the fans are running at max RPM until the lower setting is reached and then they go to near minimum RPM. The temperature increases until it hits the maximum setting when the fans go to maximum. There is some increase in fan speed before the maximum value is reached but it is less than 1/4 of maximum RPM on the boost fans and less than 1/2 on the intake and exhaust fans. MFC has not acted like this before with these settings. Those cycles of fan max and fan min are occurring at 2 minute intervals and are driving me nuts. Time to go to manual control.
cyclic fans.png
cyclic fans.png (161.8 KiB) Viewed 20240 times
User avatar
Steven
CrystalIDEA Developer
Posts: 2294
Joined: 21 Dec 2009, 11:48
Location: CrystalIDEA headquarters
Contact:

Re: CPU/MEM Usage and not displaying in menu bar issue

Post by Steven »

cfshelor,

could you please do some more tests?

Quit the app before each test.

1. Reset all fans to automatic mode. Run for 2-3 days
2. Use 1 fan in sensor control mode. Run for 2-3 days
2. Use 2 fans in sensor control mode. Run for 2-3 days

BTW what is the version of your mac os?

Thanks
User avatar
Steven
CrystalIDEA Developer
Posts: 2294
Joined: 21 Dec 2009, 11:48
Location: CrystalIDEA headquarters
Contact:

Re: CPU/MEM Usage and not displaying in menu bar issue

Post by Steven »

MEM and CPU Usage issues are fixed in 1.0.1
Post Reply