Re: memory requirements of closed vs quit apps



On Thu, 20 Nov 2008 11:45:50 +0000, chris <ithinkiam@xxxxxxxxx> wrote:
Jaimie Vandenbergh wrote:
On Thu, 20 Nov 2008 10:27:15 +0000, chris <ithinkiam@xxxxxxxxx> wrote:

I must admit I'm in the 'annoyed' camp too. I do find it odd that the
majority of programs remain open when all their windows are closed. With
the amount of resources modern apps use it seems wasteful and
inefficient to keep things like preview, thunderbird, firefox, etc
running when they aren't being used.

If their windows are closed, they use bugger all memory - and are
further displaced out to swapfile after a time.

Really?!

Really. I do seem to be wrong though. I was only thinking of document
windows, unlike eg iTunes which doesn't change much, but that matches
what you've chosen to test (fortunately!).

Let see; using Activity Monitor with firefox (with three
windows and a few tabs open), thunderbird and preview (one small eps
file open) running, closed and quit:

TotAppMem Wired Active Inactive Used Free
Win Open 264 155 428 265 899 174
Win Closed 266 155 415 287 857 166
App Quit - 151 274 166 591 433

Best to use the memory page on Activity Monitor, and watch the
individual apps Real and Virtual memory entries. Wired and Active
are... not useful figures for anything, so far as I can see.

So, it seems, for those apps anyway, that closing an app's windows makes
no difference to memory usage at all. Where did you get the idea than
running apps use no memory?

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.

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...

(In passing, Windows XP is an absolute arse for swapping stuff out as
much as possible over time, even with multiple gigs memory free, so I
prefer this behaviour! Waiting 20 seconds for a quad 3GHz Xeon with
4gig, 2.5gig free, to swap everything including the desktop back from
screen saver is feckin' ridiculous. I disabled swap, much better!)

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?

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.

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?

In
general, it is, but not when you leave everything 'open'.

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

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.

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

Cheers - Jaimie
--
Okay, it works now. Or at least it malfunctions in all the expected ways.
-- Mark Edwards, asr
.



Relevant Pages

  • Re: Workspace/desktop switching
    ... or even CPU time on a remote machine (won't help if it's local, ... opening/closing individual app windows in actual computer ... Zope products (web apps). ... directory, 3) swap desktops, swap tabs, click "refresh" wait ...
    (Debian-User)
  • Re: win xp sp3
    ... to boot and open apps. ... I have software called advanced windows care v-2 personnal I use ... along with it's memory cleaner. ... Microsoft MVP - Windows Desktop Experience ...
    (microsoft.public.windowsxp.general)
  • Re: win xp sp3
    ... the link you want Larry ... MS MVP-IE, Mail, Security, Windows Desktop Experience - since 2002 ... along with it's memory cleaner. ... For example if your apps don't need some of it, ...
    (microsoft.public.windowsxp.general)
  • Re: win xp sp3
    ... the link you want Larry ... MS MVP-IE, Mail, Security, Windows Desktop Experience - since 2002 ... along with it's memory cleaner. ... For example if your apps don't need some of it, ...
    (microsoft.public.windowsxp.general)
  • Re: Free RAM space
    ... My computer can only hold 512 Mbytes of RAM. ... Wanting to minimize the amount of memory Windows uses is a counterproductive ... then give it back when your apps later need it. ...
    (microsoft.public.windowsxp.general)