Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Mac OS and the fly likes My MBP is slow Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "My MBP is slow" Watch "My MBP is slow" New topic
Author

My MBP is slow

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9353
    
    2

How can I make my MBP more responsive? As soon as I have the following Softwares up and running, looks like my MBP slows down a bit and becomes un responsive:

IntelliJ, Tomcat, mongoDB, Firefox

Can you suggest me some ways that I can do on my MBP to make it a bit faster? I have the standard 13" MBP with an i5 processor and 4GB of RAM.


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61102
    
  66

Have you used any profiling tools to see what's taking up the most resources? One of the easiest to use is Activity Monitor.

IntelliJ is a wonderful IDE, but it is a beast that will eat all available resources.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9353
    
    2

I can't refrain from using IntelliJ as it is the IDE for my project and this machine is meant for my projects.

I would try having a look at the Activity Monitor.
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11435
    
  85

I would also recommend judicious use of Firefox. I am not recommending another browser - I use Firefox as my main browser myself - but rather I recommend regular restarts and closing tabs and closing windows regularly.

Opening up multiple windows chews up far more memory than opening up the same number of tabs. And large numbers of tabs will also take a fair chunk of you memory. Then there are the occasional web pages that chew up inordinate amounts of CPU and/or memory, and Firefox does not always reclaim all the resources they requested.

I use MenuMeters, and the little pie chart in the menu bar () is invaluable. When it shows that I am getting to the point where everything is being swapped I restart Firefox (usually bringing up exactly the same tabs once restarted) and I almost always regain a huge chunk of memory. That is the only chart I kept the same though - I find the CPU useful, but I don't use line graph mode, the same with most of the other charts.


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4650
    
    5

Get more memory.
4GB is simply not enough to do any developing with modern tools.

And as others have said, Firefox and Java IDE's need a lot of resources of all kinds, CPU, RAM, disk space, disk IO rates, etc.

My MBP is 16 months or so old, quad-core @2gHz, 8GB of ram. I regularly run Netbeans, Glassfish, MySql, Apache, chrome, firefox, thunderbird and a couple of other things. Nearly all of the time, its fast enough that I don't wait for it.

I can, of course, swamp it with a bad SQL query or some lame algorithms in my Beans.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61102
    
  66

I have 8G and it's always maxed. I couldn't imagine trying to shoehorn all that into 4G.



IntelliJ is using 1.25 G of that.
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4650
    
    5

Bear Bibeault wrote:I have 8G and it's always maxed. I couldn't imagine trying to shoehorn all that into 4G.


And of course, no one can shoehorn all that in 4GB, so instead the OS goes to use Virtual Memory and that beats on the disk.

I just bought 32GB of memory for $200 (not for a MBP), but even with the Apple tax, memory is cheap these days.

Crucial has 16GB of MBP memory for $143. That is so cheap, I'm tempted to get it for mine. I'd have to throw away the current 8GB, but more memory, always more memory.
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11435
    
  85

All what? I didn't see anything excessive in the original poster's topic.

I normally have Eclipse, DbVisualizer, Firefox, and Tomcat running while I am developing stuff for JForum. Until I moved my database instance to the server I was also running a PostgreSQL instance on my MacBook Pro. All within 4 Gb RAM. Normally not a problem. Every so often I restart Firefox, but that is it.

Officially my MacBook Pro only supports 4 Gb RAM. I have seen some after market suppliers saying it can go up to 6 GB. I may try it out - it is cheap enough for the experiment.

Back to the original topic - another thing I don't often think about (because it is kind of a "do it once" type deal) is to remove all the plugins you are not using in IntelliJ and/or Firefox. They all take up memory and make the system less responsive.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9353
    
    2

Andrew Monkhouse wrote:All what? I didn't see anything excessive in the original poster's topic.

I normally have Eclipse, DbVisualizer, Firefox, and Tomcat running while I am developing stuff for JForum. Until I moved my database instance to the server I was also running a PostgreSQL instance on my MacBook Pro. All within 4 Gb RAM. Normally not a problem. Every so often I restart Firefox, but that is it.

Officially my MacBook Pro only supports 4 Gb RAM. I have seen some after market suppliers saying it can go up to 6 GB. I may try it out - it is cheap enough for the experiment.

Back to the original topic - another thing I don't often think about (because it is kind of a "do it once" type deal) is to remove all the plugins you are not using in IntelliJ and/or Firefox. They all take up memory and make the system less responsive.


I do not have any plugins in Firefox or in IntelliJ. From my observation, my MBP works fine but if I have all the stuff (Firefox with atleast 5 to 7 tabs open with one tab playing songs from Youtube, couple of terminal windows, IntellJ, Tomcat, mongoDB server) open and I work with them for a couple of hours, I find that my MBP turns slow and becomes unresponsive. This unresponsiveness increases and it gets to a point where I would close all my open applications and programs and stat them again. So it is this behavior that I want to understand and remedy. Any suggestions?
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

One big place I find slows down my Mac, which has 8GB, is browsers. Specifically browsers running Flash. I have to reset my Safari every week because of cache, non-released memory and Flash related memory leaks. When I uninstalled Flash, I no longer had the issue. But recently because a project I am working on will be using Flash (even to my argument against using it), I had to re-install it and I am getting my memory leaks again. So I just installed a plugin for my Safari browser called Click To Flash, which blocks Flash, but allows me to turn it on for a one time play or add ip address to allow flash.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I try and avoid doing any media related activity on the same computer I am working on. Pandora, YouTube, I won't even open iTunes while working. I have 12GB of RAM and generally don't have issues. The only time I experience slowness overall is when I have to fire up VMWare Fusion. But even then, after the machine has time to kind of settle in, it's not that bad, depending on which VM I am running and how much RAM it needs.


GenRocket - Experts at Building Test Data
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4650
    
    5

Gregg Bolinger wrote:I try and avoid doing any media related activity on the same computer I am working on.


+1

I've found that all of the browsers, when doing media, are fundamentally unstable. Probably resource/memory leaks.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9353
    
    2

I would look into upgrading my RAM to 8GB. But is that the limit that I can go on my MBP 13 inch model? It is at least what the specification says.
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4650
    
    5

Joe Harry wrote:But is that the limit that I can go on my MBP 13 inch model?


One of the things that drives me nuts about Apple and how they market the MacBook and MBP is that they don't give them unique model numbers. You can't tell without going to the Apple site and looking up the serial number.

The good news is that 8GB is a lot better than 4. You can also check the Crucial Memory site, they have a ton of experience (Crucial is the retail front of Micron (the memory) folks.)
Crucial has software you can download that will check your actual machine's capabilities. For example, they have a kit that puts 16GB in mine -- when I bought it, 8GB was all that Apple would "support"
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9353
    
    2

Crucial Memory says that my MBP is compatible with 16 GB but Apple website says that I can go only upto 8 GB. I guess I will stick with 8 GB for now. Need to take my machine to the store tomorrow or next week to get those additional GB's.
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4650
    
    5

I'd order it from Crucial, its trivial to install memory. No real need to have Apple do it and pay their prices for memory. But, you can always
do 8GB first, and see if it helps, and then do 16GB later
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9353
    
    2

Another question. How can I make my MBP boot faster? It takes almost a minute to get started. Is there a way to speed this up a bit?
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11435
    
  85

Apparently Mountain Lion is way faster in booting up.

Or to really speed things up, go for an SSD hard drive - faster boots, faster operations, longer battery life, ...
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9353
    
    2

Is there an alternative without going for an SSD drive? I could remember from my old Microsoft days, where an MSCONFIG would speed up the machine a bit. Is there something similar in Mac?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Joe Harry wrote:Another question. How can I make my MBP boot faster? It takes almost a minute to get started. Is there a way to speed this up a bit?


Stop shutting it down. There is rarely ever a need to turn off a Mac completely. Just let is sleep.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Gregg Bolinger wrote:
Joe Harry wrote:Another question. How can I make my MBP boot faster? It takes almost a minute to get started. Is there a way to speed this up a bit?


Stop shutting it down. There is rarely ever a need to turn off a Mac completely. Just let is sleep.


The only time I ever shutdown my MBP is when I get on a plane. I always just put it to sleep by setting up corners to put it to sleep or just shutting the lid.

Mark
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4650
    
    5

Joe Harry wrote: How can I make my MBP boot faster?


I never see any issue with boot speed. Mostly because I have it up for weeks at a time.
Why are you rebooting?
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11435
    
  85

One of the things you can do is look in /Library/StartupItems - these are typically things that start up before you log in, and might therefore slow down your boot process. But be careful - it is possible to remove something that turns out to be essential.

Another thing you can look at is the per-user start-up items. From System-Preferences, go to Users, select your user account, and go into Startup Items.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: My MBP is slow