What is 'inactive memory'?

ricof

macrumors member
Original poster
Nov 29, 2009
57
0
The Garden of England
and does it reduce the available memory?

According to istat, its showing about 1.22gb as inactive. What does this mean? Is it normal or is there something wrong with my system?

Cheers
 

bozz2006

macrumors 68030
Aug 24, 2007
2,530
0
Minnesota
and the reason for it is if you restart the program again, it won't have to read all the info for startup processes from the hard disk. try this, open a program that takes a while to load, like photoshop, or Word, or even itunes. note how long it takes to start. go about some business, then shut the program down. now restart it. note how much less time it takes for the application to load.
 

m85476585

macrumors 65816
Feb 26, 2008
1,222
4
So shouldn't the OS drop inactive memory if more is called for, instead of swapping it? If I using almost all my RAM and I open up VMWare, instead of decreasing inactive memory, it seems to get swapped, making everything really slow. This is the reason I upgraded to 6gb (and I almost never have a problem with it swapping anymore, but 4gb should be plenty if this ram isn't needed any more).
 

melchior

macrumors 65816
Nov 17, 2002
1,202
53
So shouldn't the OS drop inactive memory if more is called for, instead of swapping it? If I using almost all my RAM and I open up VMWare, instead of decreasing inactive memory, it seems to get swapped, making everything really slow. This is the reason I upgraded to 6gb (and I almost never have a problem with it swapping anymore, but 4gb should be plenty if this ram isn't needed any more).
the kernel isn't psychic, it doesn't know which bit of memory your going to want next, so it takes the conservative route. also vmware forces the memory to remain active, so os x cannot manage that memory. it is possible to flush inactive memory. or it used to be, anyway.
 

maccompaq

macrumors 65816
Mar 6, 2007
1,152
3
Thanks for the replies. How can I go about flushing the inactive memory and would it give me any noticable performance gain?

Cheers
To flush the memory, you have to reboot your Mac. A warm boot works fine.
 

m85476585

macrumors 65816
Feb 26, 2008
1,222
4
It would only give you a performance increase if stuff is being swapped to the disk, or if you have a high number of page outs (check activity monitor). Otherwise flushing inactive RAM will decrease performance for anything that benefits from using that as a cache, for example, recently closed programs if you want to start them up again.
 

samadam

macrumors newbie
Jul 14, 2007
8
0
In general, Mac OS was written by some pretty smart computer scientists, and they have it in mind to make your computer go faster. So I'd trust their memory management setup, tbh. No worries mate; it's all normal.
 

Nugget

macrumors 68000
Nov 24, 2002
1,737
567
Houston Texas USA
How can I go about flushing the inactive memory and would it give me any noticable performance gain?
Generally speaking, you want as much inactive memory as possible and as little free memory as possible. Flushing inactive memory will harm performance in most cases since it's likely that a non-zero amount of that memory will be eventually re-used.
 

pesc

macrumors regular
Jan 20, 2006
159
0
I think the activity monitor should be redesigned. Free memory should be renamed "Wasted memory" (since it is an unused resource) and Inactive memory should be renamed "Available memory".

Wasted memory should be displayed with a brown color in the pie chart. Available memory should be green.
:rolleyes:
 

chrono1081

macrumors 604
Jan 26, 2008
7,432
1,401
Isla Nublar
I agree the apple memory thing is kind of confusing and not enough info is given on apples website.

I just ordered 8 gig of ram for my machine (in my sig) because I wasn't sure if I was using up all the ram or not. (12mb free, 850mb inactive, 25 - 400mb page outs) I hope I didn't waste my money :(.

I usually run Maya, Unity3D, Corel Painter and XCode at once. (As well as a few others).
 

Freyqq

macrumors 601
Dec 13, 2004
4,014
166
I agree the apple memory thing is kind of confusing and not enough info is given on apples website.

I just ordered 8 gig of ram for my machine (in my sig) because I wasn't sure if I was using up all the ram or not. (12mb free, 850mb inactive, 25 - 400mb page outs) I hope I didn't waste my money :(.

I usually run Maya, Unity3D, Corel Painter and XCode at once. (As well as a few others).
free + inactive = available ram
 

Freyqq

macrumors 601
Dec 13, 2004
4,014
166
Thanks for the replies. How can I go about flushing the inactive memory and would it give me any noticable performance gain?

Cheers
flushing inactive memory would decrease performance because if you open a program that was in inactive memory, it would no longer be present after you had flushed it

The general idea is that free ram is essentially wasted because it isn't being used for something. Therefore, it is loaded up with programs that you have used recently in case you were to open them again. Windows does something similar.
 

Dr-Ludvig

macrumors newbie
Dec 2, 2009
16
0
Denmark
Hmm, now i've been using my macbook pro all day, having used lots of different programs, and not rebooted once, yet my inactive memory is only 53 MB? While free is at 500 MB? How can that be? I know i've maxed my memory earlier when doing photoshop, so it's no because i simply havent used more..
Anyone knows why mine doesnt use the inactive memory?
 

ricof

macrumors member
Original poster
Nov 29, 2009
57
0
The Garden of England
In general, Mac OS was written by some pretty smart computer scientists, and they have it in mind to make your computer go faster. So I'd trust their memory management setup, tbh. No worries mate; it's all normal.
Cheers mate, i'll leave it alone.

Thanks for all the replies.
 

maflynn

Moderator
Staff member
May 3, 2009
63,851
30,367
Boston
In general, Mac OS was written by some pretty smart computer scientists, and they have it in mind to make your computer go faster. So I'd trust their memory management setup, tbh. No worries mate; it's all normal.
Except the OP wanted to know what it was. There's no harm in asking and also asking to see what possible steps can be taken to boost performance.

As smart as the folks at apple are, it doesn't preclude the idea that we users can glean even more speed out of the system. While this subject precludes such advice, as there are no real steps to improve performance with inactive memory. There's no harm in asking or posting such questions here. That's why forums here at Macrumors exists.
 

aznsmith

macrumors newbie
Dec 20, 2009
17
0
hdd thrashing?

I have an issue, which might make me upgrade to 4gb of ram on my umbp.

Situation:
Often my Free memory will decrease to near 0mb, when that happens the OS will freeze with the spinning pinwheel for several minutes. Inactive memory is held at around 528mb. I can hear hard drive activity and when it finally stops, at least half of my Active memory becomes Free memory.

My guess is that the Active memory is transferred into Virtual memory.
Shouldn't Inactive memory be at a lower priority and be transferred into Virtual memory instead of Active memory?

The only apps i usually have running are safari, mail, and itunes.
Safari uses almost 400mb of ram and about 1gb of virtual memory with only 2 tabs open for sites like macrumors and newegg.
 

m85476585

macrumors 65816
Feb 26, 2008
1,222
4
Inactive memory *should* be freed up, but for some reason OS X doesn't always. I had the same problem, and I had to upgrade to 6gb to run VMWare without closing everything else. I think upgrading your RAM, rebooting, or closing open programs are your only options.

Safari 4.04 only uses 170mb for macrumors and newegg for me. If your safari has been open for a while, it might have a memory leak, so you night need to restart it.

I don't think virtual memory really means much. The virtual memory numbers are more accurate in SL (in leopard, even the smallest programs had like 1gb), but activity monitor is showing my total VM size at 118GB.
 

justit

macrumors 6502a
Dec 1, 2007
640
1
I was afraid of that :'(

I think I just wasted $467
More memory is always better. My 10GB RAM Mac Pro made working on it liberating as I didn't have to think about keeping an eye on memory usage. I got spoiled just keeping everything open.

If your safari has been open for a while, it might have a memory leak, so you night need to restart it.
Safari is one of the most bloated pieces of software in OSX. Having 10GB of ram didn't stop the beachballs. And on my MBP 4GB the same problem persists. I really hope the rumors of it moving to the browser in the near future are true.
 

pesc

macrumors regular
Jan 20, 2006
159
0
...when that happens the OS will freeze with the spinning pinwheel for several minutes.
It could be that OS X is creating new swapfiles.

In finder, use the menu option "Go to folder" and specify /var/vm

Here you can see your swapfiles. Does the create date match the time when the system froze for a minute?

Creating a new swapfile takes some time. Especially if the disk is filling up and lacks large continuous space.