Re: Why is OS X swapping with inactive memory available?
Re: Why is OS X swapping with inactive memory available?
- Subject: Re: Why is OS X swapping with inactive memory available?
- From: Jim Magee <email@hidden>
- Date: Thu, 29 May 2008 17:01:52 -0400
Please check the archives about descriptions of inactive vs. active.
The distinction doesn't mean what you assume it to mean.
In short, the kernel VM system when dealing with memory pressure scans
through in-use pages and tries to keep them in a balance between
active and inactive markings. The inactive pages are scanned for
reuse while marked as inactive. If they have been reused, they are
marked as active and some other page must move from active to inactive
state to detect if it is in active use. So, inactive is a misnomer.
It is shorthand for "possibly inactive, lets try to verify that."
As you discovered, the internal balance we (currently) strive for is
approximately 2/3 active vs 1/3 inactive (although the algorithm is
more complicated than that, it serves as a general approximation). In
addition, many things can force these out of balance, and if the VM
system isn't under memory pressure it lets these drift. It's only
when there is pressure that you tend to see them numbers get to a
pretty-close-to-fixed ratio. At that point, it's not about the ratio
of the numbers, but the specific pages tagged with each
classification, and their accesses, that matters.
--Jim
On May 28, 2008, at 3:36 PM, Thomas Backman wrote:
Nobody?
This is very annoying... I rebooted 40 minutes ago. Since then I
started a VM with 640MB RAM (in VirtualBox, rather than VMware),
iTunes, Firefox etc. Current RAM stats:
Free: 25MB
Inactive: 1.12GB
Wired: 891MB
Active: 1007MB
Page outs: 25MB (it stopped paging when I quit Firefox)
Why is it swapping with 37% of my total RAM inactive?! I just don't
get it. Stuff starts beachballing at random, etc.
I'm starting to seriously consider switching to another OS because
of this. I can't use virtual machines anymore, and that's not the
only problem, either... Needless to say it happens without them,
too, sooner or later... :(
I realize this isn't really the "OS X support" list, just figured
people here might know what's going on.
/Thomas
On May 11, 2008, at 6:51 PM, Thomas Backman wrote:
I've got a Macbook Pro C2D, with 3GB RAM, running OS X 10.5.2. Long
story short, I've got about 800MB of inactive memory, and still
it's swapping like crazy, throwing 20 second freezes into my
typing, etc. Unusable. But why is it swapping, when there is so
much memory available? I just don't get it. Isn't inactive memory
by definition easy to free? If so, why isn't it taking advantage of
it, instead of acting as if I'm actually *using* the whole 3 gigs?
I recently upgraded from 2GB to 3GB to be able to use VMware Fusion
better. Well, I can't. Despite adding 1024MB of memory, I couldn't
even increase the VM from 512 to 768MB. Where did the rest of my
new gigabyte go? I can't say it feels any faster at all.
As of right now, I've got about 1.65GB active memory, 520MB wired,
and over 800MB inactive. Despite all that inactive memory, I've got
over 500MB of page outs!
I don't pretend to understand paging very much at all, except I do
know that excessive paging (as in 500MB in 10 minutes) feels
EXTREMELY slow.
Is this by design, and if so, why...? If not, well, why does it
happen? :)
Regards,
Thomas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
@apple.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden