You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Guide: How to solve Yosemite memory leaks and CPU usage

I post this hoping to help those users who, like me, are experiencing high CPU usage and massive memory leaking with OS X core services and apps, leading to slow performance and battery drain.


I've tried everything mentioned, but found the right combination of steps to follow. I've tried this with seven different Apple computers, including mine, and has worked well so far. I applied this method yesterday to give these process a 24 hour window to fail again, so far everything good.


First step: disconnect any external or secondary monitors, if any is present. The video memory allocation leak can also happen if you have a system with an integrated card, like Intel, with no external monitors attached.


Second step: Shut down your machine and enter Safe Mode (press shift once you turn on your computer again, more info below). Once you're there, fix your disk permissions.


Guide of how to access Safe Mode: OS X: What is Safe Boot, Safe Mode?


Third step: From Safe Mode turn off your machine again and reset your System Management Controller (SMC). There are different methods, depending on machine, to do this. To know what method applies to yours read the following guide.


Intel-based Macs: Resetting the System Management Controller (SMC)


Fourth step: Once your machine completes a full boot after resetting the SMC turn it off again and reset your PRAM (THIS IS THE MOST IMPORTANT STEP, BUT THE PREVIOUS ONES ARE ESSENTIAL FOR THIS ONE TO WORK). The PRAM stores small bits of data that indicate our Apple computer how to interact with the devices connected to it, including monitors and video cards. It also affects software.


To reset it you should hold the OPTION, COMMAND, P and R keys in your keyboard immediately after turning on your machine again.You'll hear the start up chime, continue pressing the keys until the machine boots and the chime starts A SECOND TIME, then release. IF YOUR YOSEMITE INSTALLATION LOCKS UP AT A BLACK SCREEN AFTER THIS, DONT PANIC! It's normal, just turn off your computer and let it boot again.


More info about PRAM: OS X Mavericks: Reset your computer’s PRAM


Voila, reconnect your external displays and enjoy your system.


Message was edited by: Luis_Mercado

MacBook Air, OS X Yosemite (10.10)

Posted on Oct 23, 2014 10:45 AM

Reply
557 replies

Oct 25, 2014 10:39 AM in response to stevenhaines

Glad it helped and thanks for the words.


And, about your question, to my very limited knowledge windowserver is acting up thanks to incompatibilities with the settings files found in PRAM's cache. PRAM gets populated with small files that tell your computer how to manage certain devices, including video card. With every OS X upgrade these settings could differ between versions, but sometimes, at installation, these are not flushed correctly, leading the new OS X to be forced to use the old settings.


As OS X GUI is handled in hardware level these problems trigger an excessive amount of memory and CPU in order to render the GUI. Thats why I propose this exact order, so when you reset your PRAM it will get populated again from an almost clean state because you already fixed your files and reset your SMC.

Oct 25, 2014 11:17 PM in response to Luis_Mercado

I Followed your guide faithfully but it seems to have bricked my Mid-2012 15" cMBP with nvidia 650M and an upgraded SSD/optibay combo.


after booting into safe mode. I repaired disk permissions, rebooted, reset the SMC and when I tried to reboot again I got a little circle with a line through it symbol upon attempting to boot.


I tried booting in verbose mode and got the error message "Still waiting for root device" where it hangs.

Oct 26, 2014 8:03 AM in response to Luis_Mercado

Thanks, Luis!


I have a Mid-2009 MacBook Pro (8GB RAM, 960GB Crucial M500 SSD HD with External 1920x1080 display via miniDisplayPort-to-HDMI adapter) that I upgraded to Yosemite last week. The Windowserver process was averaging 70-90% CPU and was slowing down my system to the point of frustration. I've been searching for solutions for a week now. Turning off transparency in the Accessibility control panel helped a tiny bit. Removing Little Snitch from the menubar helped a little more, but Windowserver was still at around 60% for no discernable reason. Then I found your post today.


I followed the steps (though I repaired permissions in Recovery mode rather than Safe mode) but other than that, the process went smoothly and afterwards (with everything connected back as before) Windowserver is back to normal levels of 1-2%. Amazing!


Thanks for your post and for your explanation. I think this MacBook originally shipped with 10.5, so it's been upgraded a number of times, but I've never had to reset the SMC and only zapped the PRAM a couple times over the years. Never had a problem like this before and it was driving me crazy. Seems to be taken care of now. Thanks again!

Oct 26, 2014 11:10 AM in response to Luis_Mercado

Hi Louis,


Thank you very very very much. I used your solution on my MacBook Pro Retina 13inch, and my Imac which was severely slowing down after reboot because of the window server process eating memory and creating virtual memory that is huge as 30gb.


I hope Apple will solve the problem soon.

Thank you and i will spread the word.


Greet from Belgium, Patrick

Guide: How to solve Yosemite memory leaks and CPU usage

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.