Re: Xc4 memory sanity
Re: Xc4 memory sanity
- Subject: Re: Xc4 memory sanity
- From: Simon Wilson <email@hidden>
- Date: Fri, 01 Apr 2011 17:31:37 +0200
I'm not running Xcode 4, but I've been putting up with similar memory usage with Xcode 3.x for a while now: Activity Monitor reports 'reasonable' memory utilization for Xcode (400-600MB, although this may not match everyone's definition of 'reasonable') but available memory steadily decreases until my 4GB MacBook Pro reports 3GB active/wired, 25% inactive and 0% free.
It's totally unclear where all this memory is going as Xcode doesn't *appear* to be the culprit and no other applications are using anywhere near as much memory (with the exception of Safari which likes to make itself comfortable in 250-500MB with only 3 tabs open.)
At this point the machine starts performing like a dog, even though the remaining inactive memory is theoretically available to any process that wants it. Starting my app from Xcode takes 10-20 seconds (normally 2-3) and starting the debugger takes even longer. And forget starting Photoshop to do some quick design work...
In every case restarting Xcode would result in > 2GB memory being freed up -- pretty clear indication to me that Xcode is somehow using way more memory than reported solely for Xcode.app in Activity Monitor. I got used to having to restart Xcode 1-2 times per day to keep performance reasonable.
I then did two things: a) upgraded from 4GB to 6GB with a kit from OWC, and b) transitioned to Clang. Things are now much, much better. I can run Xcode for several days at a time and, while memory usage is still high, much more free memory is available and performance remains decent.
Interestingly, we reverted to GCC temporarily and performance once again took a dive due to higher memory load.
I have posted to this mailing list before regarding memory usage, but the general tone of the replies was unhelpful, suggesting that the issue at hand was actually my understanding of the information presented by Activity Monitor.
My advice? Avoid wrestling with Xcode by upgrading your RAM to as much as the hardware will allow. Note that even the late 2008 MBPs support 6GB (http://www.macsales.com) even though Apple doesn't say so.
> I'm on a 4 GB MBP 17" early 2009. That's not an unreasonable development machine.
In my experience I would consider 4GB too little for Xcode development on anything other than small projects. My next MBP upgrade will include as much RAM as the hardware permits. The 8GB limitation with the 2011 MacBook Pros makes me wonder if such a machine is a good long-term investment or whether it would be better to wait until a future generation supports 16GB.
On an aside: the Apple developers I know run maxed-out Mac Pros with 16GB or more of RAM. Perhaps Apple doesn't consider your MacBook Pro a reasonable development machine at all...?
Cheers,
Simon
On Apr 1, 2011, at 16:54 PM, arri wrote:
Hi,
I'm seeing the exact same problem:
RAM is wasted at a rate of something like 2.0GB per hour in my case.
XCodes' reported RAM-usage is not even very dramatic (± 500MB for a
small project). But the amount of free memory steadily decreases until
after about an hour it's close to 0 and the system start swapping like
crazy. After another hour or so, with all RAM completely filled-up (4Gb)
and 3GB of swapfiles i have to just restart the machine to do anything
usefull apart from waiting for beachballs.
Is this a know issue?
Or is it just fritz and me?
gr
arri
- Show quoted text -
On Fri, Mar 25, 2011 at 4:48 PM, Fritz Anderson <email@hidden> wrote:
> Xcode 4 uses up memory very, very quickly. Think the Flash plugin, but much more aggressive.
>
> Now, I've heard sunny reactions to this sort of thing: Fills up RAM? Splendid! I paid good money for that memory, and I want every bit of it used!
>
> "All of RAM" is good. "More than all of RAM" is a disaster. Xcode make my computer thrash. Launching new applications, switching to running ones, even doing much with Xcode, takes a quarter of a minute. I can't move views in a XIB by less than 50 pixels, because the editor catches up with a drag only occasionally.
>
> I'm on a 4 GB MBP 17" early 2009. That's not an unreasonable development machine. Quitting Xcode frees up 2 GB (plus who-knows-how-much swap).
>
> What can I do to rein this thing in?
>
> — F
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden