Re: memory requirements of closed vs quit apps



Jaimie Vandenbergh wrote:
On Thu, 20 Nov 2008 11:45:50 +0000, chris <ithinkiam@xxxxxxxxx> wrote:
Jaimie Vandenbergh wrote:
Firefox behaves kinda strangely in these experiments.

24 tabs open for ages, starting position. 510meg real, 2gig VM.
Close those tabs. 480meg real, 2gig VM.
Close the app.
Restart blank, 55meg real, 505meg VM.
Load 24 tabs, 160meg real, 640meg VM.
Close windows, 144meg real, 556meg VM.
Load 24 tabs, 180meg real, 620meg VM.

Preview starts at blank, 5meg real, 347meg VM
Load several large things, 20meg real, 425meg VM
Close window, 12meg real, 382meg VM
Load same large things, 20meg real, 422meg VM
Close window, 12meg real, 386meg VM

It does take a few seconds to settle down though, which is curious.

I'd imagine it's the OS just trying to work out which memory needs
swapping in/out following the closing of the app.

OSX is good at keeping stuff in memory (rather than swapping it out)
as long as possible. In order to push it out to swap, you need to use
more memory for other things (cache or programs). It's a bit harder to
test though, you need something that'll use up all your ram - in my
case I've got 3gig here, so I'll have to try more experiments using
multiple virtual machines to fill that lot up...

I agree that the memory model is good in OSX; it's similar to Linux. It
doesn't change the issue of having superfluous apps running with no
windows open.

But, if you've got ten apps 'open' and you're only using two or three
cmd+tabbing between them gets painful pretty quickly and if by accident
you hit one that was swapped out, it takes a few seconds for the machine
to swap the app back in and respond. I rarely use just one app and
regularly need to swap between several, so this is an issue for my way
of working.

That's certainly true, but is a UI thing not a memory thing. The tab
list does re-order to "most recent at the left" though, so it
shouldn't be too awful?

The UI thing is exacerbated by the (default?) behaviour of apps to
remain open and use memory unnecessarily. The benefit of the memory
model you mention above is that re-loading frequently used apps is
pretty quick as they are cached in memory. So, OSX doesn't 'need' to
have apps stay open as much as, say, Windows would.

And note the swapping in, which means that it had been swapped out and
discarded from main memory, therefore isn't taking up real memory
space.

Yebbut, nobbut, yebbut, it shouldn't even /be/ in memory in my book.
Excluding cached memory....

Plus, if you're on recent (ie Intel) hardware, memory
is dirt cheap.
It may be cheap, but it's not free! IMO 1Gb of RAM should easily
adequate for running a few standard desktop apps at the same time.

For the sort of stuff most people do, you'd think 16meg would be
enough. It was back in 1995. What could have changed since then?

OK. Maybe I /am/ sounding like a dinosaur... ;), but I still think it's
ridiculous. I mean, I do heavy duty biological data analysis and number
crunching as my day job and most of the stuff I do can work in less than
2Gb of RAM. It's only when I deal with data that is multi-Gb in size
that I need to resort to our 16/32Gb machines.

Have you checked prices recently? A 1gig stick for most current Apple
machines is £13 delivered. A 2gig stick is under £25.

Oh, I know the prices. And they are stunningly cheap considering the
historical prices for RAM (e.g. 25 quid for a 1Mb stick) and I'm all for
progress (otherwise I'd still be on Windows 3.1), but come on! 2Gb of
RAM for just doing mainly mail, wordprocessing, spreadsheets, web
browsing, image viewing?! When my parents got their first PC (a laptop)
with 2gig earlier this year, my home desktop still only had 384Mb of RAM
and it did everything I asked of it. I've now a got newer machine with
1Gb and it hasn't made a drastic difference (on Linux btw).

This is on Tiger BTW. Is Leopard a bigger memory hog or not than Tiger?
I'm considering upgrading, but will I need to add another 1gig of RAM?

Much the same, as far as I can see - but it feels faster.

OK. Thanks.

If you're paying 80+quid for Leopard, put something towards more RAM
anyway, it sounds like you want it.

More than that. I think I *need* it.
.