Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.mac.system > #50623 > unrolled thread

Example of "inactive" memory management

Started byJF Mezei <jfmezei.spamnot@vaxination.ca>
First post2013-10-24 22:27 -0400
Last post2013-10-27 09:23 -0400
Articles 20 on this page of 21 — 7 participants

Back to article view | Back to comp.sys.mac.system


Contents

  Example of "inactive" memory management JF Mezei <jfmezei.spamnot@vaxination.ca> - 2013-10-24 22:27 -0400
    Re: Example of "inactive" memory management nospam <nospam@nospam.invalid> - 2013-10-24 23:09 -0400
      Re: Example of "inactive" memory management JF Mezei <jfmezei.spamnot@vaxination.ca> - 2013-10-25 01:08 -0400
    Re: Example of "inactive" memory management dempson@actrix.gen.nz (David Empson) - 2013-10-25 16:26 +1300
      Re: Example of "inactive" memory management nospam <nospam@nospam.invalid> - 2013-10-24 23:29 -0400
        Re: Example of "inactive" memory management dempson@actrix.gen.nz (David Empson) - 2013-10-25 16:54 +1300
          Re: Example of "inactive" memory management nospam <nospam@nospam.invalid> - 2013-10-25 01:07 -0400
          Re: Example of "inactive" memory management JF Mezei <jfmezei.spamnot@vaxination.ca> - 2013-10-25 02:21 -0400
            Re: Example of "inactive" memory management nospam <nospam@nospam.invalid> - 2013-10-25 03:01 -0400
            Re: Example of "inactive" memory management Alan Browne <alan.browne@FreelunchVideotron.ca> - 2013-10-25 16:31 -0400
    Re: Example of "inactive" memory management Kevin McMurtrie <mcmurtrie@pixelmemory.us> - 2013-10-24 21:09 -0700
      Re: Example of "inactive" memory management nospam <nospam@nospam.invalid> - 2013-10-25 01:07 -0400
        Re: Example of "inactive" memory management Kevin McMurtrie <mcmurtrie@pixelmemory.us> - 2013-10-24 23:34 -0700
          Re: Example of "inactive" memory management nospam <nospam@nospam.invalid> - 2013-10-25 04:05 -0400
      Re: Example of "inactive" memory management Alan Browne <alan.browne@FreelunchVideotron.ca> - 2013-10-25 16:33 -0400
        Re: Example of "inactive" memory management billy@MIX.COM - 2013-10-25 21:11 +0000
          Re: Example of "inactive" memory management Alan Browne <alan.browne@FreelunchVideotron.ca> - 2013-10-25 17:56 -0400
        Re: Example of "inactive" memory management dempson@actrix.gen.nz (David Empson) - 2013-10-26 13:12 +1300
          Re: Example of "inactive" memory management Alan Browne <alan.browne@FreelunchVideotron.ca> - 2013-10-25 20:50 -0400
            Re: Example of "inactive" memory management Bob Harris <nospam.News.Bob@remove.Smith-Harris.us> - 2013-10-26 21:14 -0400
              Re: Example of "inactive" memory management Alan Browne <alan.browne@FreelunchVideotron.ca> - 2013-10-27 09:23 -0400

Page 1 of 2  [1] 2  Next page →


#50623 — Example of "inactive" memory management

FromJF Mezei <jfmezei.spamnot@vaxination.ca>
Date2013-10-24 22:27 -0400
SubjectExample of "inactive" memory management
Message-ID<5269d702$0$1286$c3e8da3$50776f34@news.astraweb.com>
I have mentioned a few times lately some unexpected Snow Leopard memory
management.

here is a screen shot of Activity Monitor

http://www.vaxination.ca/temp/activity_monitor.png

Free: 51.8 MB
Wired: 1.01 GB
Active: 7.30 GB
Inactive: 3.63 GB
Used: 11.94 GB

So, if inactive contains immediatly disposable memory, why is it still
taking up 3.6 gigs when there is basically no free memory left and there
is active paging to disk going on ?

[toc] | [next] | [standalone]


#50627

Fromnospam <nospam@nospam.invalid>
Date2013-10-24 23:09 -0400
Message-ID<241020132309068888%nospam@nospam.invalid>
In reply to#50623
In article <5269d702$0$1286$c3e8da3$50776f34@news.astraweb.com>, JF
Mezei <jfmezei.spamnot@vaxination.ca> wrote:

> I have mentioned a few times lately some unexpected Snow Leopard memory
> management.
> 
> here is a screen shot of Activity Monitor
> 
> http://www.vaxination.ca/temp/activity_monitor.png
> 
> Free: 51.8 MB
> Wired: 1.01 GB
> Active: 7.30 GB
> Inactive: 3.63 GB
> Used: 11.94 GB
> 
> So, if inactive contains immediatly disposable memory, why is it still
> taking up 3.6 gigs when there is basically no free memory left and there
> is active paging to disk going on ?

it's from apps that you may have quit, among other things.

if you relaunch one of those apps, it won't need to hit the disk to
reload it, as it's already in memory. that's why launching an app the
second time is significantly faster than the first.

if you launch a different app, the inactive memory is immediately
reallocated to the new app.

there's no reason to mark it as free because if it's needed, it's
available to be reallocated and in some cases, it already *has* what
you want in it.

[toc] | [prev] | [next] | [standalone]


#50641

FromJF Mezei <jfmezei.spamnot@vaxination.ca>
Date2013-10-25 01:08 -0400
Message-ID<5269fcdb$0$17050$c3e8da3$dd9697d2@news.astraweb.com>
In reply to#50627
On 13-10-24 23:09, nospam wrote:

> it's from apps that you may have quit, among other things.
> 
> if you relaunch one of those apps, it won't need to hit the disk to
> reload it, as it's already in memory. that's why launching an app the
> second time is significantly faster than the first.

But meanwhile, apps that are running are forced to page out/in to disk
because that memeory from former apps isn't being released. Something fishy.

[toc] | [prev] | [next] | [standalone]


#50631

Fromdempson@actrix.gen.nz (David Empson)
Date2013-10-25 16:26 +1300
Message-ID<1lbb00c.17ljti419r9tovN%dempson@actrix.gen.nz>
In reply to#50623
JF Mezei <jfmezei.spamnot@vaxination.ca> wrote:

> I have mentioned a few times lately some unexpected Snow Leopard memory
> management.
> 
> here is a screen shot of Activity Monitor
> 
> http://www.vaxination.ca/temp/activity_monitor.png
> 
> Free: 51.8 MB
> Wired: 1.01 GB
> Active: 7.30 GB
> Inactive: 3.63 GB
> Used: 11.94 GB
> 
> So, if inactive contains immediatly disposable memory, why is it still
> taking up 3.6 gigs when there is basically no free memory left and there
> is active paging to disk going on ?

Because Inactive memory also includes memory which has not been used
recently but is not "disposable". It therefore has to be paged to disk
before it can be freed for something else.

This is the sort of memory which Mavericks will be compressing before it
gets to the point where it needs to page something to disk.

-- 
David Empson
dempson@actrix.gen.nz

[toc] | [prev] | [next] | [standalone]


#50632

Fromnospam <nospam@nospam.invalid>
Date2013-10-24 23:29 -0400
Message-ID<241020132329523644%nospam@nospam.invalid>
In reply to#50631
In article <1lbb00c.17ljti419r9tovN%dempson@actrix.gen.nz>, David
Empson <dempson@actrix.gen.nz> wrote:

> Because Inactive memory also includes memory which has not been used
> recently but is not "disposable". It therefore has to be paged to disk
> before it can be freed for something else.

depends what's in it. if it's a recently launched app, it's already on
disk so there's no need to write it back out. if it's relaunched before
another app uses the memory, there's no need to read it back in.

[toc] | [prev] | [next] | [standalone]


#50634

Fromdempson@actrix.gen.nz (David Empson)
Date2013-10-25 16:54 +1300
Message-ID<1lbb2bn.177oh11wbiev6N%dempson@actrix.gen.nz>
In reply to#50632
nospam <nospam@nospam.invalid> wrote:

> In article <1lbb00c.17ljti419r9tovN%dempson@actrix.gen.nz>, David
> Empson <dempson@actrix.gen.nz> wrote:
> 
> > Because Inactive memory also includes memory which has not been used
> > recently but is not "disposable". It therefore has to be paged to disk
> > before it can be freed for something else.
> 
> depends what's in it. if it's a recently launched app, it's already on
> disk so there's no need to write it back out. if it's relaunched before
> another app uses the memory, there's no need to read it back in.

As per what JF said earlier, he's getting page outs, therefore
_something_ is being written to disk.

The paging activity is most likely to be parts of Inactive memory which
contain modifiable data, which is being paged out to disk after all the
disposable bits (including read-only application code) has already been
freed.

Some Active memory could also be getting paged out, but I'd expect all
the Inactive memory to be freed or paged out before that happened.

-- 
David Empson
dempson@actrix.gen.nz

[toc] | [prev] | [next] | [standalone]


#50639

Fromnospam <nospam@nospam.invalid>
Date2013-10-25 01:07 -0400
Message-ID<251020130107295017%nospam@nospam.invalid>
In reply to#50634
In article <1lbb2bn.177oh11wbiev6N%dempson@actrix.gen.nz>, David Empson
<dempson@actrix.gen.nz> wrote:

> > > Because Inactive memory also includes memory which has not been used
> > > recently but is not "disposable". It therefore has to be paged to disk
> > > before it can be freed for something else.
> > 
> > depends what's in it. if it's a recently launched app, it's already on
> > disk so there's no need to write it back out. if it's relaunched before
> > another app uses the memory, there's no need to read it back in.
> 
> As per what JF said earlier, he's getting page outs, therefore
> _something_ is being written to disk.

yes, but without seeing his machine it's impossible to tell exactly
what is going on.

[toc] | [prev] | [next] | [standalone]


#50652

FromJF Mezei <jfmezei.spamnot@vaxination.ca>
Date2013-10-25 02:21 -0400
Message-ID<526a0de5$0$46032$c3e8da3$88b277c5@news.astraweb.com>
In reply to#50634
On 13-10-24 23:54, David Empson wrote:

> Some Active memory could also be getting paged out, but I'd expect all
> the Inactive memory to be freed or paged out before that happened.


I do not see free active memory growing as inactive goes down. And I
don't see inactive going down either.

Note that my inactive has now dropped to 2.8gigs. But my reading of the
simplistic explanation on Apple's web site does not match what Activity
Monitor shows.

[toc] | [prev] | [next] | [standalone]


#50660

Fromnospam <nospam@nospam.invalid>
Date2013-10-25 03:01 -0400
Message-ID<251020130301345753%nospam@nospam.invalid>
In reply to#50652
In article <526a0de5$0$46032$c3e8da3$88b277c5@news.astraweb.com>, JF
Mezei <jfmezei.spamnot@vaxination.ca> wrote:

> I do not see free active memory growing as inactive goes down. And I
> don't see inactive going down either.

inactive moves to active as needed. it doesn't go to free then active.

> Note that my inactive has now dropped to 2.8gigs. But my reading of the
> simplistic explanation on Apple's web site does not match what Activity
> Monitor shows.

then you need to read more.

[toc] | [prev] | [next] | [standalone]


#50696

FromAlan Browne <alan.browne@FreelunchVideotron.ca>
Date2013-10-25 16:31 -0400
Message-ID<pqCdneQHNJmYSPfPnZ2dnUVZ_u-dnZ2d@giganews.com>
In reply to#50652
On 2013.10.25, 02:21 , JF Mezei wrote:
> On 13-10-24 23:54, David Empson wrote:
>
>> Some Active memory could also be getting paged out, but I'd expect all
>> the Inactive memory to be freed or paged out before that happened.
>
>
> I do not see free active memory growing as inactive goes down. And I
> don't see inactive going down either.
>
> Note that my inactive has now dropped to 2.8gigs. But my reading of the
> simplistic explanation on Apple's web site does not match what Activity
> Monitor shows.


You also don't know in what order things are occurring, so hard to 2nd 
guess what the mem manager is doing and why.

Since Mavericks I have seen 0 swaps.  Whereas ML on the same system 
(despite gobs of memory) did swap occasionally.

Also seems to map virtual memory more tightly than previous versions as 
it matched the physical memory (on this Mac).

-- 
"Quotation, n: The act of repeating erroneously the words of another."
                                                 -Ambrose Bierce

[toc] | [prev] | [next] | [standalone]


#50637

FromKevin McMurtrie <mcmurtrie@pixelmemory.us>
Date2013-10-24 21:09 -0700
Message-ID<mcmurtrie-303469.21093024102013@c-61-68-245-199.per.connect.net.au>
In reply to#50623
In article <5269d702$0$1286$c3e8da3$50776f34@news.astraweb.com>,
 JF Mezei <jfmezei.spamnot@vaxination.ca> wrote:

> I have mentioned a few times lately some unexpected Snow Leopard memory
> management.
> 
> here is a screen shot of Activity Monitor
> 
> http://www.vaxination.ca/temp/activity_monitor.png
> 
> Free: 51.8 MB
> Wired: 1.01 GB
> Active: 7.30 GB
> Inactive: 3.63 GB
> Used: 11.94 GB
> 
> So, if inactive contains immediatly disposable memory, why is it still
> taking up 3.6 gigs when there is basically no free memory left and there
> is active paging to disk going on ?

Virtual memory is severely de-tuned in 10.7 and 10.8.  10.6 or 10.9 will 
fix that.

[toc] | [prev] | [next] | [standalone]


#50640

Fromnospam <nospam@nospam.invalid>
Date2013-10-25 01:07 -0400
Message-ID<251020130107305080%nospam@nospam.invalid>
In reply to#50637
In article
<mcmurtrie-303469.21093024102013@c-61-68-245-199.per.connect.net.au>,
Kevin McMurtrie <mcmurtrie@pixelmemory.us> wrote:

> Virtual memory is severely de-tuned in 10.7 and 10.8.  10.6 or 10.9 will 
> fix that.

bullshit.

i have had no problems nor has anyone else i know. you're the only
person making this claim, with zero basis to back it up.

[toc] | [prev] | [next] | [standalone]


#50661

FromKevin McMurtrie <mcmurtrie@pixelmemory.us>
Date2013-10-24 23:34 -0700
Message-ID<mcmurtrie-E4A631.23341624102013@c-61-68-245-199.per.connect.net.au>
In reply to#50640
In article <251020130107305080%nospam@nospam.invalid>,
 nospam <nospam@nospam.invalid> wrote:

> In article
> <mcmurtrie-303469.21093024102013@c-61-68-245-199.per.connect.net.au>,
> Kevin McMurtrie <mcmurtrie@pixelmemory.us> wrote:
> 
> > Virtual memory is severely de-tuned in 10.7 and 10.8.  10.6 or 10.9 will 
> > fix that.
> 
> bullshit.
> 
> i have had no problems nor has anyone else i know. you're the only
> person making this claim, with zero basis to back it up.

That's because you and the people you know don't have the skills to test 
it or diagnose it.

10.7 and 10.8 limits each process to a certain fraction of total RAM.  
That's why big applications swap like crazy and run slowly even when 
there's gigabytes of idle memory lying around.  That's why people are 
screwing around with 'purge' and other voodoo.  That's why people are 
dumping huge amounts of money into SSDs and RAM upgrades that wouldn't 
be needed with ANY other OS.  Take a look around on support groups and 
you'll find many people wondering why their computer swaps so much.

If virtual memory is so perfect in 10.8, then you must be pretty angry 
that they reverted that restriction with 10.9.

[toc] | [prev] | [next] | [standalone]


#50662

Fromnospam <nospam@nospam.invalid>
Date2013-10-25 04:05 -0400
Message-ID<251020130405154999%nospam@nospam.invalid>
In reply to#50661
In article
<mcmurtrie-E4A631.23341624102013@c-61-68-245-199.per.connect.net.au>,
Kevin McMurtrie <mcmurtrie@pixelmemory.us> wrote:

> > > Virtual memory is severely de-tuned in 10.7 and 10.8.  10.6 or 10.9 will 
> > > fix that.
> > 
> > bullshit.
> > 
> > i have had no problems nor has anyone else i know. you're the only
> > person making this claim, with zero basis to back it up.
> 
> That's because you and the people you know don't have the skills to test 
> it or diagnose it.

more bullshit.

> 10.7 and 10.8 limits each process to a certain fraction of total RAM.  
> That's why big applications swap like crazy and run slowly even when 
> there's gigabytes of idle memory lying around.

even more bullshit.

i regularly run xcode, photoshop, lightroom and other large apps, often
at the same time and without any major issue (or even minor issue for
that matter).

i have not noticed excessive swapping or slowdown in any of them, nor
had anyone else i know.

i don't know what is causing problems with your system but it's not
what you think it is.

> That's why people are 
> screwing around with 'purge' and other voodoo.  

people use purge because they don't understand how vm works. they see
free memory as being low and think something's wrong, but there isn't
anything wrong at all. they don't understand what each memory category
is for or how it all works (nor do you from what i can tell).

> That's why people are 
> dumping huge amounts of money into SSDs and RAM upgrades that wouldn't 
> be needed with ANY other OS. 

nonsense. people are getting ssd because it's significantly faster than
a hard drive. only recently has it become cost effective. before that
they dumped money into raid arrays.

windows users use ssd and raid too, and they are not affected by your
imaginary os x issues.

more memory has always been beneficial, for any platform. nothing
unique about that either.

> Take a look around on support groups and 
> you'll find many people wondering why their computer swaps so much.

people wonder a lot of things, that doesn't mean they're true, and how
do you know they have the skills to properly test it anyway?

what *is* a problem are memory leaks, notably safari, which keeps using
more and more memory, eventually causing the system to thrash. 

vm is working properly, it's the apps that aren't.

> If virtual memory is so perfect in 10.8, then you must be pretty angry 
> that they reverted that restriction with 10.9.

there was no restriction. 

the only real difference is compressed memory in mavericks (shades of
ram doubler 20 years ago), which should be imperceptible and so far i'm
not noticing anything bad about it,

[toc] | [prev] | [next] | [standalone]


#50697

FromAlan Browne <alan.browne@FreelunchVideotron.ca>
Date2013-10-25 16:33 -0400
Message-ID<pqCdnecHNJkESPfPnZ2dnUVZ_u8AAAAA@giganews.com>
In reply to#50637
On 2013.10.25, 00:09 , Kevin McMurtrie wrote:
> In article <5269d702$0$1286$c3e8da3$50776f34@news.astraweb.com>,
>   JF Mezei <jfmezei.spamnot@vaxination.ca> wrote:
>
>> I have mentioned a few times lately some unexpected Snow Leopard memory
>> management.
>>
>> here is a screen shot of Activity Monitor
>>
>> http://www.vaxination.ca/temp/activity_monitor.png
>>
>> Free: 51.8 MB
>> Wired: 1.01 GB
>> Active: 7.30 GB
>> Inactive: 3.63 GB
>> Used: 11.94 GB
>>
>> So, if inactive contains immediatly disposable memory, why is it still
>> taking up 3.6 gigs when there is basically no free memory left and there
>> is active paging to disk going on ?
>
> Virtual memory is severely de-tuned in 10.7 and 10.8.  10.6 or 10.9 will
> fix that.

Seems true.  In 10.7 and 10.8 VM would map to hundreds of GB despite 6 
or 24 GB of physical memory.

In 10.9 it maps to the physical memory of my iMac (24 GB) no matter how 
aggressively I load up the memory (several dozen apps running and a 10 
GB ramdisk).  No swapping either.

As I write this - with a lot loaded and large RAMDisk and WinXP running 
under fusion I'm at 23.5 GB and still no swap used.

-- 
"Quotation, n: The act of repeating erroneously the words of another."
                                                 -Ambrose Bierce

[toc] | [prev] | [next] | [standalone]


#50712

Frombilly@MIX.COM
Date2013-10-25 21:11 +0000
Message-ID<l4emp4$jmg$1@reader2.panix.com>
In reply to#50697
Alan Browne <alan.browne@freelunchvideotron.ca> writes:

> In 10.9 it maps to the physical memory of my iMac (24 GB) no matter how 
> aggressively I load up the memory (several dozen apps running and a 10 
> GB ramdisk).  No swapping either.
> 
> As I write this - with a lot loaded and large RAMDisk and WinXP running 
> under fusion I'm at 23.5 GB and still no swap used.

This, and Kevin's observations, are encouraging news.  I'm interested
in what vm_stat says, though.  Would you mind posting the results of it?
Run the terminal emulator and issue the command...

Billy Y..
-- 
        sub     #'9+1   ,r0             ; convert ascii byte
	add     #9.+1   ,r0             ; to an integer
	bcc     20$                     ; not a number

[toc] | [prev] | [next] | [standalone]


#50715

FromAlan Browne <alan.browne@FreelunchVideotron.ca>
Date2013-10-25 17:56 -0400
Message-ID<ZqOdnWEROZFpdffPnZ2dnUVZ_vGdnZ2d@giganews.com>
In reply to#50712
On 2013.10.25, 17:11 , billy@MIX.COM wrote:
> Alan Browne <alan.browne@freelunchvideotron.ca> writes:
>
>> In 10.9 it maps to the physical memory of my iMac (24 GB) no matter how
>> aggressively I load up the memory (several dozen apps running and a 10
>> GB ramdisk).  No swapping either.
>>
>> As I write this - with a lot loaded and large RAMDisk and WinXP running
>> under fusion I'm at 23.5 GB and still no swap used.
>
> This, and Kevin's observations, are encouraging news.  I'm interested
> in what vm_stat says, though.  Would you mind posting the results of it?
> Run the terminal emulator and issue the command...

Last 3 rows say it all...

Mach Virtual Memory Statistics: (page size of 4096 bytes)
Pages free:                             4655968.
Pages active:                            967525.
Pages inactive:                           84876.
Pages speculative:                       140211.
Pages throttled:                              0.
Pages wired down:                        440797.
Pages purgeable:                          14153.
"Translation faults":                 242895279.
Pages copy-on-write:                    3043753.
Pages zero filled:                    196759730.
Pages reactivated:                         2990.
Pages purged:                             89438.
File-backed pages:                       256161.
Anonymous pages:                         936451.
Pages stored in compressor:                 485.
Pages occupied by compressor:               503.
Decompressions:                              37.
Compressions:                               546.
Pageins:                                5056982.
Pageouts:                                     0.
Swapins:                                      0.
Swapouts:                                     0.


-- 
"Quotation, n: The act of repeating erroneously the words of another."
                                                 -Ambrose Bierce

[toc] | [prev] | [next] | [standalone]


#50722

Fromdempson@actrix.gen.nz (David Empson)
Date2013-10-26 13:12 +1300
Message-ID<1lbclz7.85k5nkvcgo0iN%dempson@actrix.gen.nz>
In reply to#50697
Alan Browne <alan.browne@FreelunchVideotron.ca> wrote:

> On 2013.10.25, 00:09 , Kevin McMurtrie wrote:
> > In article <5269d702$0$1286$c3e8da3$50776f34@news.astraweb.com>,
> >   JF Mezei <jfmezei.spamnot@vaxination.ca> wrote:
> >
> >> I have mentioned a few times lately some unexpected Snow Leopard memory
> >> management.
> >>
> >> here is a screen shot of Activity Monitor
> >>
> >> http://www.vaxination.ca/temp/activity_monitor.png
> >>
> >> Free: 51.8 MB
> >> Wired: 1.01 GB
> >> Active: 7.30 GB
> >> Inactive: 3.63 GB
> >> Used: 11.94 GB
> >>
> >> So, if inactive contains immediatly disposable memory, why is it still
> >> taking up 3.6 gigs when there is basically no free memory left and there
> >> is active paging to disk going on ?
> >
> > Virtual memory is severely de-tuned in 10.7 and 10.8.  10.6 or 10.9 will
> > fix that.
> 
> Seems true.  In 10.7 and 10.8 VM would map to hundreds of GB despite 6
> or 24 GB of physical memory.

That doesn't indicate anything useful. The "VM size" in earlier systems
is calculated by adding up the total VM address space of every process,
including hypothetical reservations which have never been accessed, and
counting shared libraries in the VM space of each process even though
they all map to one shared copy of the library in real memory.

It bears no useful relationship to what is going on with real memory or
paging activity.

Mavericks has a completely different meaning for what Activity Monitor
reports as "virtual memory" size. I haven't investigated what it
actually means now, but so far I've only seen it matching the physical
memory size. It might actually be useful now.

I suspect it is something like total physical memory plus total used
space in swap files and memory mapped files which have been paged out
(or haven't been paged in).

> In 10.9 it maps to the physical memory of my iMac (24 GB) no matter how
> aggressively I load up the memory (several dozen apps running and a 10
> GB ramdisk).  No swapping either.
> 
> As I write this - with a lot loaded and large RAMDisk and WinXP running
> under fusion I'm at 23.5 GB and still no swap used.


-- 
David Empson
dempson@actrix.gen.nz

[toc] | [prev] | [next] | [standalone]


#50727

FromAlan Browne <alan.browne@FreelunchVideotron.ca>
Date2013-10-25 20:50 -0400
Message-ID<3emdnbQaid9tjPbPnZ2dnUVZ_sudnZ2d@giganews.com>
In reply to#50722
On 2013.10.25, 20:12 , David Empson wrote:
> Alan Browne <alan.browne@FreelunchVideotron.ca> wrote:
>
>> On 2013.10.25, 00:09 , Kevin McMurtrie wrote:
>>> In article <5269d702$0$1286$c3e8da3$50776f34@news.astraweb.com>,
>>>    JF Mezei <jfmezei.spamnot@vaxination.ca> wrote:
>>>
>>>> I have mentioned a few times lately some unexpected Snow Leopard memory
>>>> management.
>>>>
>>>> here is a screen shot of Activity Monitor
>>>>
>>>> http://www.vaxination.ca/temp/activity_monitor.png
>>>>
>>>> Free: 51.8 MB
>>>> Wired: 1.01 GB
>>>> Active: 7.30 GB
>>>> Inactive: 3.63 GB
>>>> Used: 11.94 GB
>>>>
>>>> So, if inactive contains immediatly disposable memory, why is it still
>>>> taking up 3.6 gigs when there is basically no free memory left and there
>>>> is active paging to disk going on ?
>>>
>>> Virtual memory is severely de-tuned in 10.7 and 10.8.  10.6 or 10.9 will
>>> fix that.
>>
>> Seems true.  In 10.7 and 10.8 VM would map to hundreds of GB despite 6
>> or 24 GB of physical memory.
>
> That doesn't indicate anything useful.

It does indicate that there have been huge changes.  It mystified me 
that they would map the VM over such a wide space in the past. There was 
nothing wrong with that per se - but there was no real need for it either.

> The "VM size" in earlier systems
> is calculated by adding up the total VM address space of every process,
> including hypothetical reservations which have never been accessed, and
> counting shared libraries in the VM space of each process even though
> they all map to one shared copy of the library in real memory.
>
> It bears no useful relationship to what is going on with real memory or
> paging activity.

I never said different.  Just noting that it seemed "lazier" in the past 
and tighter in the new.

>
> Mavericks has a completely different meaning for what Activity Monitor
> reports as "virtual memory" size. I haven't investigated what it
> actually means now, but so far I've only seen it matching the physical
> memory size. It might actually be useful now.

It might also mean they've realized that on computers with sufficient 
memory (or not) that they can map things more closely.  Whether this 
actually pays off in performance is another thing.

OTOH - 10.8 with 24 GB of memory - most of it free and available - and I 
still got swaps.  No reason for it - there were gobs of memory available.

Not one since installing 10.9.

> I suspect it is something like total physical memory plus total used
> space in swap files and memory mapped files which have been paged out
> (or haven't been paged in).

Haven't had a single swap out in 3 days... And I've loaded the memory 
with apps and data like crazy trying to force it... below.

>
>> In 10.9 it maps to the physical memory of my iMac (24 GB) no matter how
>> aggressively I load up the memory (several dozen apps running and a 10
>> GB ramdisk).  No swapping either.
>>
>> As I write this - with a lot loaded and large RAMDisk and WinXP running
>> under fusion I'm at 23.5 GB and still no swap used.


-- 
"Quotation, n: The act of repeating erroneously the words of another."
                                                 -Ambrose Bierce

[toc] | [prev] | [next] | [standalone]


#50846

FromBob Harris <nospam.News.Bob@remove.Smith-Harris.us>
Date2013-10-26 21:14 -0400
Message-ID<nospam.News.Bob-B5A684.21144526102013@news.eternal-september.org>
In reply to#50727
In article <3emdnbQaid9tjPbPnZ2dnUVZ_sudnZ2d@giganews.com>,
 Alan Browne <alan.browne@FreelunchVideotron.ca> wrote:

> On 2013.10.25, 20:12 , David Empson wrote:
> > Alan Browne <alan.browne@FreelunchVideotron.ca> wrote:
> >
> >> On 2013.10.25, 00:09 , Kevin McMurtrie wrote:
> >>> In article <5269d702$0$1286$c3e8da3$50776f34@news.astraweb.com>,
> >>>    JF Mezei <jfmezei.spamnot@vaxination.ca> wrote:
> >>>
> >>>> I have mentioned a few times lately some unexpected Snow Leopard memory
> >>>> management.
> >>>>
> >>>> here is a screen shot of Activity Monitor
> >>>>
> >>>> http://www.vaxination.ca/temp/activity_monitor.png
> >>>>
> >>>> Free: 51.8 MB
> >>>> Wired: 1.01 GB
> >>>> Active: 7.30 GB
> >>>> Inactive: 3.63 GB
> >>>> Used: 11.94 GB
> >>>>
> >>>> So, if inactive contains immediatly disposable memory, why is it still
> >>>> taking up 3.6 gigs when there is basically no free memory left and there
> >>>> is active paging to disk going on ?
> >>>
> >>> Virtual memory is severely de-tuned in 10.7 and 10.8.  10.6 or 10.9 will
> >>> fix that.
> >>
> >> Seems true.  In 10.7 and 10.8 VM would map to hundreds of GB despite 6
> >> or 24 GB of physical memory.
> >
> > That doesn't indicate anything useful.
> 
> It does indicate that there have been huge changes.  It mystified me 
> that they would map the VM over such a wide space in the past. There was 
> nothing wrong with that per se - but there was no real need for it either.

Because you have many code and data segments that need to be 
mapped into the program.  There is the program code, the program 
data, the program stack, dynamically allocated memory (sometimes 
called the HEAP), program initiated memory mapped segments (could 
be backed by swap, or memory mapped files), and the shared 
libraries (each one having its own code segment and data segment).

It is best if you map the shared libraries at the exact same 
address for every running program, to avoid having to have complex 
address fix-up code executed executed for each shared library each 
time a program is loaded.

Placing shared libraries at fixed locations in Virtual memory 
creates addressing holes.  Virtual address holes do not take up 
much real memory.  A lot depends on how Mac OS X decides to 
structure it virtual memory page tables.

You have to reserve enough virtual address space for the stack, as 
the stack can grow, and it it is bounded by used virtual addresses 
it will be limited on exactly how much it can grow, which can 
affect the ability of the program to run.

In Mac OS X versions up to and including Mountain Lion, just 
measured the virtual address used as 0 to the maximum virtual 
address mapped.  It does not take into account how many virtual 
addresses were mapping holes or mapping code or data.

For the most part, virtual address space usage, is mostly of 
interest to a very few operating system kernel developers (as a 
Digital UNIX, Tru64 UNIX, HP-UX, Linux, Solaris, AIX, Windows 
kernel level file system developer, I do not even care about 
virtual addresses :-) ).

Real memory usage is more interesting to regular users, as that 
affects performance, along with whether or not excessive page out 
activity is happening (as disk I/O is expensive).

Virtual memory usage, even if you ignore the holes, is still not 
really useful, as some of the address is backed by files on disk, 
such as the code from your program, the code for the shared 
libraries, and the data for memory mapped files.  What is left of 
the non-hole virtual address space is either currently in RAM, or 
in a /var/vm/swapfile.  The RAM part is tracked as Real Memory.  
In Mountain Lion and earlier the exact amount in swapfile(s) is 
not reported.  That might be useful, but not virtual memory as a 
whole.

> > The "VM size" in earlier systems
> > is calculated by adding up the total VM address space of every process,
> > including hypothetical reservations which have never been accessed, and
> > counting shared libraries in the VM space of each process even though
> > they all map to one shared copy of the library in real memory.
> >
> > It bears no useful relationship to what is going on with real memory or
> > paging activity.
> 
> I never said different.  Just noting that it seemed "lazier" in the past 
> and tighter in the new.
> 
> >
> > Mavericks has a completely different meaning for what Activity Monitor
> > reports as "virtual memory" size. I haven't investigated what it
> > actually means now, but so far I've only seen it matching the physical
> > memory size. It might actually be useful now.
> 
> It might also mean they've realized that on computers with sufficient 
> memory (or not) that they can map things more closely.  Whether this 
> actually pays off in performance is another thing.
> 
> OTOH - 10.8 with 24 GB of memory - most of it free and available - and I 
> still got swaps.  No reason for it - there were gobs of memory available.
> 
> Not one since installing 10.9.
> 
> > I suspect it is something like total physical memory plus total used
> > space in swap files and memory mapped files which have been paged out
> > (or haven't been paged in).
> 
> Haven't had a single swap out in 3 days... And I've loaded the memory 
> with apps and data like crazy trying to force it... below.
> 
> >
> >> In 10.9 it maps to the physical memory of my iMac (24 GB) no matter how
> >> aggressively I load up the memory (several dozen apps running and a 10
> >> GB ramdisk).  No swapping either.
> >>
> >> As I write this - with a lot loaded and large RAMDisk and WinXP running
> >> under fusion I'm at 23.5 GB and still no swap used.

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.sys.mac.system


csiph-web