Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have an MBP 8.1, early 2011, 13 inch, Mountain Lion. Whenever I leave it on for more than a couple hours, I get serious execution lag on every command. For example:

I click something (a link, button, command, even a tab in the browser) and the rainbow wheel of death shows up. After a couple seconds, my command gets executed. I click on another app, and the app does the same before warming up for use - rainbow wheel of death, couple seconds of stall, revival, work. Text edit and preview are sickeningly slow in opening the very smallest documents, so I've had to stop using them completely - the forced version control of 10.8. is not helping in the least. Whenever I do anything I get this rainbow wheel of death lag prior to execution, and what's interesting is the fact that

a) The CPU usage NEVER spikes above 10% (I have it on scree at all times)

b) I actually have free RAM while doing this

I can find no processes hogging up the machine, and there are no fatal errors in the console showing up.

I use it for web development, so I have the following apps open at all times: a Java (I know, death to any machine) IDE running (PhpStorm), Chrome, Sparrow for mail, Twitter client and TotalTerminal.

That's all the apps I'm running. Any ideas?

I'm willing to try anything except sending it to an Apple store for diagnostics and service.

Edit: Additional info: This is a mint condition MBP, formatted a mere three months ago to Lion and upgraded to Mountain Lion some weeks ago. It has 4GB of RAM.


Final edit: I have installed Ubuntu alongside OSX, on the same hard drive. I have also installed all the apps I use on OSX. Ubuntu FLIES, the difference is enormous. Not a single lag, in clicking, rendering, indexing, nothing. Conclusion: OSX just sucks.

share|improve this question
    
How large is your page file (swap file) when this happens? –  duci9y Aug 30 '12 at 9:15
    
64, 64, 128, 256, 512, 1GB, 1GB, 1GB, 1GB, 1GB, so I guess a total of 6GB –  Swader Aug 30 '12 at 9:23
    
That’s not accurate. Some swap files are leftovers from the previous purge. The correct way to check for swap usage is to open Activity Monitor > System Memory. There will be a field named Swap used. –  duci9y Aug 30 '12 at 12:20
    
That field says 6.24GB –  Swader Aug 30 '12 at 12:25
1  
let us continue this discussion in chat –  duci9y Aug 30 '12 at 12:43

1 Answer 1

Let me explain to you how RAM works. Data is loaded into RAM first, in blocks called "pages". That is called a “Page in”. When a piece of memory is just paged in, it is in Active or Wired Memory. Wired memory is the memory used by the Core System and Active Memory is memory used by other applications.

When a page in Active Memory is no longer being used, it becomes Inactive Memory. The data still stays in RAM because an app may request it later, at which point it becomes Active Memory again.

When your RAM starts to fill up, the oldest pages in the Inactive Memory region are “Paged out”, which means that they are written to the Swap. Your system is slowing down because of this. Your RAM is full, so the system is paging out things to the disk. The disk is slower than the RAM, so your system slows down as data is paged in and out.

You must find out the app(s) using up your RAM with a combination of trial and error and using the Activity Monitor to check the memory usage of each app. Most likely, the problem is a memory leak in an app.

share|improve this answer
    
I see. Any best ways to approach this? I do know that Java KILLS any OSX installation, but there's no working around it, I need it to run my IDE. The thing is, when I look at activity monitor and sort by mem usage, there are no serious transgressions. Chrome is the most serious offender, followed by my IDE at 500MB, but that's it, all others are far below. –  Swader Aug 30 '12 at 13:08
    
You are probably looking at RAM usage. What we want is swap usage. I am trying to find out how to do that. –  duci9y Aug 30 '12 at 13:09
    
Ok you have to sort by the Virtual Memory column, I think. –  duci9y Aug 30 '12 at 13:12
    
Yeah, Chrome and PhpStorm are definitely the worst offenders, but those are absolutely essential for my work. Still, both of them together don't exceed 2.5GB of virtual memory, that should not be such an issue. –  Swader Aug 30 '12 at 13:14
    
Don’t forget the other little things. Also, I’m not sure is sorting the VMem column is the correct way to diagnose. How many tabs do you have open in Chrome? –  duci9y Aug 30 '12 at 13:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.