os x memory readout ... snafu
comments | Posted in osx | snafu | thoughts on Friday, September 28 2007 21:12:00 GMT
Somebody please explain how there can be so much blue (Inactive Memory) when there is very little Yellow (Active Memory) in the image to the left. Calling top also reveals little further useful information.
From Apple's Doc page Inactive Memory is:
This information is no longer being used and has been cached to disk, but it will remain in RAM until another application needs the space. Leaving this information in RAM is to your advantage if you (or a client of your computer) come back to it later.
Ok so it was used, but where? My Wired memory (Red) was a constant size, and my Active Memory was also fairly consistant. Its one thing to say "we used it" but in my opinion these graph readouts are fair too static to show any fine-grain meaningful detail and are ultimately slightly misleading.
I guess my quandery is that I dont see how:
Yellow_Area + Red_Area = Blue_Area
I'm familiar with Java and Unix memory models where I allocate memory needed for a datastructure (or perhaps a default size for every datastructure like a Hash size of 50 in Java) and only request as much as needed, and then reclaim it perdoically thru either GCing or usage of a desctructor through the lifecycle of my application.
So, if programs are humming along at a decent clip and doing work and freeing their allocations when completed I might expect:
Yellow_Area + Red_Area <= Blue_Area
If a program was consuming memory like crazy (!?!) I might expect:
Yellow_Area + Red_Area >> Blue_Area
with a bit of blue always being eaten up.
I think it's somewhat illogical or confusing to see relatively static sizes for Red and Yellow and an ever-increasing slice of blue. If perhaps, another possibility is a series of applications constantly freeing their bottom frames of memory, I would expect to see quick fluxuations in the slices of Red and Yellow (such as a blitter effect). But the readout of these images are so passively updated I just dont see valid trend data for the resulted graph output ...
So, is the Blue area by default then always just going to bubble up and cover the whole graph similar to the oceans of the world? I question the usefulness of this rendered output if its not updated fast enough to be useful in tracking the overall system process(es) memory usage within the last few seconds. Perhaps it's only good as a measure of saying "at the end of the day ... my system is performing ok ... and it didn't grind to halt". But if thats the case ... why have the pie chart???