Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Memory management in OS X

Memory management in OS X
Thread Tools
Fresh-Faced Recruit
Join Date: Apr 2003
Status: Offline
Reply With Quote
Jan 2, 2005, 11:36 AM
 
I have some questions about memory management in OS X.
I have a G5 2.5GHz with 4.5GB ram. At the moment of this writing the memory usage is as follows:
Wired: 357MB, Active: 301MB, Inactive: 137MB, Used: 795MB, Free: 3.72GB, VM size: 6.71GB.

These are the swapfiles in the VM folder:
swapfile0=64MB
swapfile1=64MB
swapfile2=128MB
swapfile3=256MB

Why do I have so much data in swapfiles when I have so much free ram?
To me this does not look like a very good memory management. I thought the idea was to keep all data i ram as long as ram is available to keep speed at a maximum.
When I got the G5 it had 2.5GB ram and I noticed that when having many apps open at the same time (Photoshop, InDesign, Illustrtator, Freehand, Mail, iTunes, etc)
the computer started to slow down especially when swiching from one app to another. The HD became very active as the system had to read data from disk to ram
at the same time as it had to write data from ram to disk to make free space in ram. This was very slow and irritating so I installed another 2GB of ram to a total of
4.5GB to avoid this problem. But now I see that the system is still paging large amounts of data to disk.
Can anyone explain to me why this happens with so much free ram?

osxman
     
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status: Offline
Reply With Quote
Jan 2, 2005, 12:32 PM
 
The behavior you're seeing is normal. Modern operating systems always utilize some amount of virtual memory. Applications like to reserve extra amounts of memory even though they probably won't use that much, so the reserved memory is provided by virtual memory. The thing you should be paying attention to is the number of pageouts you're experiencing vs. pageins, which can be viewed by Activity Monitor. If you're seeing more pageouts than pageins, that means that the system is running low on RAM. Obviously, you shouldn't be seeing that with such a large amount available. But no matter how much RAM you have, the OS will still use virtual memory. I believe there is a way to stop the system from creating swap, but it's not recommended.

"The natural progress of things is for liberty to yield and government to gain ground." TJ
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:55 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2