Register FAQ/Rules Forum Spy Search Today's Posts Mark Forums Read

Welcome to the Mac Forums forums. Please read the FAQ if you have questions. Register to participate.

 
Go Back   Mac Forums > Apple Hardware > Desktops > Mac Pro, Power Mac
TouchArcade.com - iPhone Game Reviews and News

Reply
 
Thread Tools Search this Thread  
Old Feb 22, 2008, 11:05 AM   #1
firstyearprof
macrumors member
 
Join Date: Apr 2007
inactive RAM = 5GB?

Hi,

I have a 2008 Mac Pro 3.0, 18GB RAM. From the "top" command in terminal, I'm showing 5GB of inactive RAM. I've read that such RAM is apple's way of keeping RAM in reserve in case the same application needs it in the future, but that it will give that RAM to another application as needed (or something like that).

HOWEVER, yesterday I was using an application that got up to about 12GB RAM, *and then it started swapping to hard drive* (the pageouts went from 0 to 327000), all the while that 5GB inactive RAM just sat right where it was.

I had been expecting my application to be able to access this inactive RAM once it ran out of free RAM rather than swapping to hard drive. What gives? I can't believe that the Leopard OS is this inefficient with memory allocation, so I'm guessing I'm not understanding something. Any ideas?
firstyearprof is offline   Reply With Quote
Old Feb 22, 2008, 11:10 AM   #2
richthomas
macrumors 601
 
richthomas's Avatar
 
Join Date: Feb 2007
Location: /Aussieland/home
im not sure but heres a good article from Apple that explains Mac OS X's memory management.

i think inactive RAM in only used if a new process requests it. so if your using the same RAM hungry app the inactive RAM wont be used.

BTW 18 GB! SWEEET! you should allocate some of it as a super fast scratch disk.
__________________
♫Gee Officer Krupke, krup you!♫
15" MacBook Pro Core Duo 2 GHz, 2 GB, 250 GB 7200.4; 23" Cinema Display; Snow Leopard
Core i5 2.66 GHz, 4GB, 1.5 TB, 4870 1GB
Nokia E63
richthomas is offline   Reply With Quote
Old Feb 22, 2008, 11:16 AM   #3
edesignuk
Demi-God (Moderator emeritus)
 
edesignuk's Avatar
 
Join Date: Mar 2002
Location: Great(?) Britain
What was the application? Some applications themselves are only able to address certain amounts of memory.
__________________
Search before you post: MRoogle
edesignuk is offline   Reply With Quote
Old Feb 22, 2008, 11:18 AM   #4
kittiyut
macrumors regular
 
Join Date: Oct 2007
Quote:
Originally Posted by firstyearprof View Post
Hi,

I have a 2008 Mac Pro 3.0, 18GB RAM. From the "top" command in terminal, I'm showing 5GB of inactive RAM. I've read that such RAM is apple's way of keeping RAM in reserve in case the same application needs it in the future, but that it will give that RAM to another application as needed (or something like that).

HOWEVER, yesterday I was using an application that got up to about 12GB RAM, *and then it started swapping to hard drive* (the pageouts went from 0 to 327000), all the while that 5GB inactive RAM just sat right where it was.

I had been expecting my application to be able to access this inactive RAM once it ran out of free RAM rather than swapping to hard drive. What gives? I can't believe that the Leopard OS is this inefficient with memory allocation, so I'm guessing I'm not understanding something. Any ideas?
Which brand of RAM are you using ? (Hope not APPLE !!) And what are the temperature of each ? I noticed that on mine, DIMM 1 & 2 on the top riser are the hottest - at first I thought it was the RAM, but when I switch them to the bottom riser, the temp dropped and the replacement rose. I guess it is the position and/or being utilized more?

richthomas: how do set superfast scratch drive to use the extra RAM? I too have 18 GB and not fully utilizing them all.
kittiyut is offline   Reply With Quote
Old Feb 22, 2008, 11:21 AM   #5
richthomas
macrumors 601
 
richthomas's Avatar
 
Join Date: Feb 2007
Location: /Aussieland/home
Quote:
Originally Posted by kittiyut View Post
…richthomas: how do set superfast scratch drive to use the extra RAM? I too have 18 GB and not fully utilizing them all.
use this hint. you will need to mount it every time you want to use it.
__________________
♫Gee Officer Krupke, krup you!♫
15" MacBook Pro Core Duo 2 GHz, 2 GB, 250 GB 7200.4; 23" Cinema Display; Snow Leopard
Core i5 2.66 GHz, 4GB, 1.5 TB, 4870 1GB
Nokia E63
richthomas is offline   Reply With Quote
Old Feb 22, 2008, 11:23 AM   #6
firstyearprof
Thread Starter
macrumors member
 
Join Date: Apr 2007
To answer:

The application is R (open source statistics) 64 bit. It should be able to access a virtually unlimited amount of RAM.

I have OWC RAM. My temps were a major concern (getting up to 176F !!) until recently - after putting them through a day of big time work, they now never get above 155F.

Anyway - I think this is a leopard issue... to wit: WHY IS LEOPARD ALLOWING INACTIVE MEMORY TO SIT THERE WHEN AN APPLICATION NEEDS IT?
firstyearprof is offline   Reply With Quote
Old Feb 22, 2008, 12:36 PM   #7
kittiyut
macrumors regular
 
Join Date: Oct 2007
Quote:
Originally Posted by richthomas View Post
use this hint. you will need to mount it every time you want to use it.
Thanks for the link. However, when I try to mount the disk, I get permission denied???? Any suggestions?
kittiyut is offline   Reply With Quote
Old Feb 22, 2008, 01:45 PM   #8
firstyearprof
Thread Starter
macrumors member
 
Join Date: Apr 2007
I get it now I think

Hi all,

I think I understand what's going on. It is explained here:
http://developer.apple.com/documenta...outMemory.html

BEGIN QUOTE:

The active list contains pages that are currently mapped into memory and have been recently accessed.

The inactive list contains pages that are currently resident in physical memory but have not been accessed recently. These pages contain valid data but may be released from memory at any time.

The free list contains pages of physical memory that are not associated with any address space of VM object. These pages are available for immediate use by any process that needs them.

When the number of pages on the free list falls below a threshold (determined by the size of physical memory), the pager attempts to balance the queues. It does this by pulling pages from the inactive list. If a page has been accessed recently, it is reactivated and placed on the end of the active list. If an inactive page contains data that has not been written to the backing store recently, its contents must be paged out to disk before it can be placed on the free list. If an inactive page has not been modified and is not permanently resident (wired), it is stolen (any current virtual mappings to it are destroyed) and added to the free list. Once the free list size exceeds the target threshold, the pager rests.

END QUOTE


If I understand correctly, the page outs are not always a symptom of using virtual memory rather than RAM. Rather, when inactive memory is requested, it is given to the active application, but whatever is stored in inactive memory needs to be paged out to hard disk first - it is then given to the application.

So I guess that when my application requested more memory than was free, the OS first paged out the memory to the hard drive and then gave it to the application (it must have been a tiny amount given that I didn't notice the inactive memory decrease).

Does this make sense?
firstyearprof is offline   Reply With Quote
Old Feb 24, 2008, 06:34 AM   #9
richthomas
macrumors 601
 
richthomas's Avatar
 
Join Date: Feb 2007
Location: /Aussieland/home
Quote:
Originally Posted by kittiyut View Post
Thanks for the link. However, when I try to mount the disk, I get permission denied???? Any suggestions?
use the disk number terminal quotes back after the first command. for example mine was disk4... yours maybe different.
__________________
♫Gee Officer Krupke, krup you!♫
15" MacBook Pro Core Duo 2 GHz, 2 GB, 250 GB 7200.4; 23" Cinema Display; Snow Leopard
Core i5 2.66 GHz, 4GB, 1.5 TB, 4870 1GB
Nokia E63
richthomas is offline   Reply With Quote
Old Feb 24, 2008, 08:51 AM   #10
Infrared
macrumors 65816
 
Infrared's Avatar
 
Join Date: Mar 2007
Quote:
Originally Posted by firstyearprof View Post
If I understand correctly, the page outs are not always a symptom of using virtual memory rather than RAM. Rather, when inactive memory is requested, it is given to the active application, but whatever is stored in inactive memory needs to be paged out to hard disk first - it is then given to the application.

So I guess that when my application requested more memory than was free, the OS first paged out the memory to the hard drive and then gave it to the application (it must have been a tiny amount given that I didn't notice the inactive memory decrease).

Does this make sense?
Yeah, I think you got it more or less. What is happening to the real
memory used by your application (Real Memory column in Activity
Monitor and RSIZE column from 'top')? Is it hitting a 12GB ceiling?
I'd expect your memory-intensive application to be given pages stolen
from other less active applications (i.e., pages that were marked as
inactive and subsequently moved to the free pool).
Infrared is offline   Reply With Quote

Reply

Mac Forums > Apple Hardware > Desktops > Mac Pro, Power Mac

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:20 PM.

Mac News | Mac Rumors | iPhone Game Reviews | iPhone Apps

Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright 2002-2009, MacRumors.com, LLC