Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I've been working with computers since I was 9, I'm now 24...

So? I've been working with computers longer than you and I'm older than you. Therefore I must be right. :rolleyes: Strangely enough, though, I've never had any issues with OS X's memory management and I haven't heard of anyone else who has either, until now. To claim that the memory management in a Unix environment is "horrible" and "for bloggers and students" is so silly that I have to question what you actually learned while supposedly working with computers for 15 years. Nothing technical, apparently....

--Eric
 
Wow...

1: I specified 512mb to Parallels... "Obviously" - Who even says something like that after I specified 512 in Parallels... Whats dedicated in the Parallels setup is 1gb, 512mb for the VM.

Based on my experiences with OS emulation (yes, I know all you Mac Geeks, Parallels and Virtual PC are different), you may be having a problem of just not enough RAM set aside for Parallels.

As far as memory management goes, there is one sure-fire test: try booting Parallels before you boot the rest and see if that makes a difference. If it does, than memory management is the problem. If not, then it's something else. Like...

2: Explain Flash, Illustrator, Photoshop, Dreamweaver, Final Cut, etc, etc as far as not having enough memory goes...

As I'm sure you know, Photoshop is an EXTREME memory hog. Try limiting the allocated memory to it to 50% or less, that may help.

3: I'm not saying if inactive is better than free, only that apps have proven to need Free ram when starting up, not inactive ram (which has been specific in this thread as allocated ram) which is where the bottleneck comes up... A bottleneck is a bottleneck, no matter what techincal docs say, no matter what Apple says, but only the fact that applications can't start when practically NOTHING is open.

Seriously, wow. You guys will get cocky, repeating exactly what others say, and go to lengths to say things like "obviously" and "blinding" when you don't even know me and all I'm doing is saying exactly what's happening to my machine... Still drone like responses only a personal jab, just like the commercials.

Oh the hilarity I'm finding in this thread... Leave it up to the guy that "believes in himself" to go beyond a stated fact and assume. This thread is getting out of control due to the fact that none of you guys simply can't say "nothing is perfect" or "odd behavior, it normally doesn't do that" but only "YOU'RE WRONG". This is just fun at this point. Someone quoting, insulting, all in the defense of something they had nothing to do with. Zealots around? And yes, this is me just toying with the situation.

Ok, look, you're likely to get a lot of attitude here, true. But much, much less than the Windows or Unix/Linux forums, I've found. And while 9-24 is pretty impressive, keep in mind some of us here are much older and have been working with computers since the same age (for me, that is 8-31, and I am HARDLY the oldest on here). Most of us want to help if we can, so just be patient and ignore the trolls. :)
 
As far as memory management goes, there is one sure-fire test: try booting Parallels before you boot the rest and see if that makes a difference. If it does, than memory management is the problem. If not, then it's something else.

I don't think that would be definitive.... the poster has already said that restarting the machine allows Parallels to launch with no problems -- the issue comes up apparently only after other OSX programs have been launched (or launched and closed Im not sure which), and the memory has been filled with inactive space. The OP says that, unlike every other OSX program which can commandeer the inactive memory automatically, their Parallels can not, and errors on launch.

It's unclear whether this is only while there are open OSX programs, or whether this still happens after all other OSX programs have been quit.
 
It's still unclear to me whether or not Parallels has been left running after boot/when problems arise or whether it is being loaded at that point. But you're right, it wouldn't be 100% conclusive (though better for diagnosing than the current information).
 
To be clear and stray from the "fun" side of this post...

1. 4gb ram.
2. Parallels is NOT the only application to tell me not enough ram. Parallels runs fine after boot or if there is FREE MEMORY for it, but NOT INACTIVE. Other programs follow this trend on my MCP.
Common programs running vary but not limited to Flash, Photoshop, Dreamweaver, Coda, Text Edit, Adium, Parallels, Transmission, Firefox, Safari, and After Effects.
3 .I am SPECIFICALLY trying to discuss OSX memory management and whether or not I have a problem, not Unix, whether that's where the core of the memory management came from, but what Apple has done to it since...
4. I never said I knew anything more than anybody else because I have been using computers since 9 and am now 24, I only used it as a reference to my base of knowledge. So whoever made a post just to make a negative out of that... If I am older than you in one way or another you just showed it.

And most importantly I have had MANY die-hard osx fans also complain that serious multi tasking is faster on Windows for most Mac models.

Seriously, why are people acting like knocking anything to do with OSX is like knocking their way of life... It's a computer, it's not perfect in the sense that it can never be perfect for 100% of people that ever use it. If you really think OSX is the end all be all of memory management since pretty much EVERYONE has not even hinted at something to be desired, come out to my apt in Chicago, use my computer while doing my daily tasks, then reboot into Vista and see how productive you are doing the same thing...

I wouldn't of even had fun with this post if I didn't get such backlash for suggesting, with logic, that the memory management is not perfect.

Anyhow, I hope the details clear thing up, since a lot of posters here love to assume and other things of that nature to prove a point rather than approach the simplest answer possible; OSX isn't perfect for every user and just because it's great for your 4 app multi tasking needs it should suite everyone else. I only say the latter part of the sentence because it is the reaction of almost every mac fan I have ever met, this forum being no different.

And again, I've been using OSX since it came out, just never as my main OS, always kept heavy hitting stuff in Windows, and per my user experience, I'm glad I did. I just finished putting Vista 64 Ultimate on the MacBook Pro and will be using that as my main OS... I know, crazy, Windows on a MacBook that has about 90% of the same internals of other, less crazed laptops out there... A full PC conversion if you will.

Crap, I ended up getting to the fun part of this post... Sorry. And yeah, i know, I said I was done, but then people posted logical statements.

As far as attitude, this is by far the most I've ever gotten in any forum... Windows users accept that it is not perfect and not due all to design but due to what it is capable of and what it has to consider as the largest spread OS in mainstream computers. Windows = GM and Apple = Lotus. Different companies with different products and should be assessed that way, only comparable when products are in the same arena, since the companies are not. There is a reason Apple is so hesitant to release OSX to the general public... Say bye bye to quick product development internally and quality control along with a bunch of other stuff. But with that in mind Apple zealots try to directly compare to justify how cool they seem to feel with a mac, despite it's imperfections, they will always insult, act dumb, or just not have an opinion in place of a upward pointed nose... Again, I'm talking about mac zealots here, not mac users.
 
The problem as I see it, WDYW, is that I (and I would guess most other respondents in this thread), have used Flash, Photoshop, Dreamweaver etc etc heavily just like you, with major multitasking, and have NOT run into the described error... even after (in my case just as one example) 24 days without rebooting. (just for fun, I opened 20 programs - all of the MS Office and Adobe CS2 suites plus others - 12 Gb of applications on my machine with 1.5 Gb RAM - still going strong no errors re: Inactive vs Free RAM)

As evidence, look at all the people who have posted their PageOut numbers ... where a large number of PageOuts guarantees that they have been running for weeks or months with little or no Free RAM.

So I am thinking, if you have continual problems along these lines, it is something specific to your setup, rather than a general failure of the OSX memory management.

Perhaps it is related to one of the programs or processes you habitually have open, or an interaction between two of them, I don't know (Transmission and Parallels or the combo of those two would be the first place I'd look). But I'm guessing it is not purely an OS problem.

If there was a systemic problem with releasing Inactive memory, then I would have expected to run into it myself, or have seen posts about it... but I haven't, not once.


As far as attitude, this is by far the most I've ever gotten in any forum.

Well, what you have posted runs counter to both the conventional wisdom AND the personal experience of the other posters here. If someone had said "The sun didn't come up today, everyone prepare for ruin and the end of the world." It may have been completely true for a resident of Castle Rock WA on May 19, 1980. But everyone else would look at their local conditions and argue the point vigorously.
 
The problem as I see it, WDYW, is that I (and I would guess most other respondents in this thread), have used Flash, Photoshop, Dreamweaver etc etc heavily just like you, with major multitasking, and have NOT run into the described error... even after (in my case just as one example) 24 days without rebooting. (just for fun, I opened 20 programs - all of the MS Office and Adobe CS2 suites plus others - 12 Gb of applications on my machine with 1.5 Gb RAM - still going strong no errors re: Inactive vs Free RAM)

Exactly my point, I can run the whole of Final Cut Studio and work away in Motion at the same time as doing things in Final Cut Pro and never have a sniff of an error. Sure it runs slightly slow seeing as I only have 2GBs of RAM but it still works.

As evidence, look at all the people who have posted their PageOut numbers ... where a large number of PageOuts guarantees that they have been running for weeks or months with little or no Free RAM.

Another good point. Most people here have uptime's on their computers of 10 days + most of the time. No problems with RAM allocation for myself.

It really would help me if you could post your logs so we can try and find the cause of your problems, rather than us just arguing back and forth over who has the worst attitude.
 
Sorry for the bump, but I have 12mb free ram and 2gigs inactive, and my computer is running hot and slow as ****. I'd like to switch these numbers around if possible, without paying for an app like ifreemem. Anyone have any ideas?
 
Why?

Sorry for the bump, but I have 12mb free ram and 2gigs inactive, and my computer is running hot and slow as ****. I'd like to switch these numbers around if possible, without paying for an app like ifreemem. Anyone have any ideas?

It takes time to erase the handles to the programs in the RAM not in use. If you really want to clear it you have to write to each and every byte as well.

I can't see why there is any heat penalty from what is written to RAM. It costs no more in heat or time no matter what is written to it.

Before blaming the OS have a look at process table by opening a terminal window and running top and watch what is eating your memory. All the little widgets, gadgets and the junk hard drives and services install to run all the time come at price in memory and machine cycles. Just look up their names on Google and see what they do an how to get rid of them after you have a good back up or two.

There isn't a way to optimize a computer for every use. But I like Apple memory management system pretty well. When the first search on a data file takes 40 seconds and the second one less than 1 second for me they have it right.

Apps ported form Windows don't always fair so well. Some still suffer form left overs from the days of paged memory. The leftovers from workarounds to handle large data sets is still a ghost that haunts us in some of them.

After reading Apple has legacy code problems as well and probably old programmers with old ways don't help much either.
Gordon
 
Sorry, I don't have time to read all of the post, but here goes.

It is likely that Parallels requires a contiguous memory chunk to run properly. Eg, it is not using virtual memory. But I don't know enough about how Parallels works, but if it were using a non virtual memory alloc it would likely have to have a kernel driver of some sort loaded.

In any case, the memory management is perfect in OSX!

I develop in OSX and use vmware with with multiple VE's running at a time with no problem. At any given time I have 4 to 8 gigs swap files going, and only about 3 to 10 megs free ram while working. It just works.

So, if you are having a problem then your install is busted and something hidden is taken your ram, or your ram is bad, or your computer is bad. But something is wrong, and it is not the OS.

-Zeek
 
Wow, a whole lot of attempting to prove your case with anything other than "This OS is ****ing genius and it is DESIGNED to slow your computer down if you open up a lot of programs and then later only want to use 1!"

I was searching google for a way to clear my inactive RAM when I found this gem of a thread. Obviously, he is having a problem as such:

1) His computer has been on a while and then he closes programs and tries to load up a slightly memory intensive program (parallels fyi)

2) He understands the way in which the dazzlingly brilliant personal gift of god OS handles the memory, and will keep it around for you to quickly use it later, but when something else comes along it will quickly switch it for you.

3) Yet when he restarts his computer, now with his RAM freshly cleaned and unmolested by his ****** ram assignment methods that apparently he set in place and not the OS, nor by the multitude of porn videos he will watch later that day, his slightly memory intensive program (again, this is parallels fyi) opens easily!


What else are you guys saying happens when he restarts his computer besides his RAM getting cleared out?

Here is a quote from one of the articles you guys linked to but probably did not read.

"Paging Virtual Memory Out

The kernel continuously compares the number of physical pages in the free list against a threshold value. When the number of pages in the free list dips below this threshold, the kernel reclaims physical pages for the free list by swapping inactive pages out of memory. To do this, the kernel iterates all resident pages in the active and inactive lists, performing the following steps:

1. If a page in the active list is not recently touched, it is moved to the inactive list.
2. If a page in the inactive list is not recently touched, the kernel finds the page’s VM object.
3. If the VM object has never been paged before, the kernel calls an initialization routine that creates and assigns a default pager object.
4. The VM object’s default pager attempts to write the page out to the backing store.
5. If the pager succeeds, the kernel frees the physical memory occupied by the page and moves the page from the inactive to the free list."

The OS has to go through this list everytime before it frees up memory from the inactive store. Which, granted, is normally not a problem, in fact it is great when you are using finder a lot and surfing the web a whole bunch and just about most other things you do most of the time when you use a computer.

BUT, if you are done crapping around on the net for the time being, and you ain't planning on using finder or spotlight a lot, and you really don't care to look at those pictures you were just looking at again today, or etc..., then why the **** doesn't it make sense to want to wipe your inactive RAM so that loading up a program that is gonna be taxing on your system to make it run smoother??? You guys are ****ing insane if you can't stop, for one second, and just try to imagine that maybe everyone doesn't use a computer like you and their gripes could be legitimate. Maybe then we can have a rational discussion or something.

Thanks to anyone that actually recommended a program that would do what he wants, I will check these out now.
 
I was searching google for a way to clear my inactive RAM ....

As been said, OSX does it. No need to do such a thing.

This is not windows. So what if one app from 2 years ago isn't optimized at the time? Parallels is a new product on the market. Probably changed since then.

People run for weeks at a time with a dozen apps open in OSX and DO NOT NEED any app to clear inactive RAM.

If you want to look for it anyway, try macupdate or versiontracker
 
As been said, OSX does it. No need to do such a thing.

This is not windows. So what if one app from 2 years ago isn't optimized at the time? Parallels is a new product on the market. Probably changed since then.

People run for weeks at a time with a dozen apps open in OSX and DO NOT NEED any app to clear inactive RAM.

If you want to look for it anyway, try macupdate or versiontracker

Thanks for more of the same. The reason I only referred to parallels in the parenthesis is because I was referring to the fact that it could be any memory heavy app. I have had trouble with all sorts of apps, games especially. But anyway, if this is the way people are going to respond then don't bother, if you want to just ignore the fact that I have a problem, and tell me I don't have a problem, you are not helping and I don't care about your opinion.

Just to be clear: I don't care about whether it is the OS's fault or whether it is ****** programming in the app. If there is an easy way to clear out the RAM, that is all I am interested in.
 
Here is a quote from one of the articles you guys linked to but probably did not read.

"Paging Virtual Memory Out

The kernel continuously compares the number of physical pages in the free list against a threshold value. When the number of pages in the free list dips below this threshold, the kernel reclaims physical pages for the free list by swapping inactive pages out of memory. To do this, the kernel iterates all resident pages in the active and inactive lists, performing the following steps:

1. If a page in the active list is not recently touched, it is moved to the inactive list.
2. If a page in the inactive list is not recently touched, the kernel finds the page’s VM object.
3. If the VM object has never been paged before, the kernel calls an initialization routine that creates and assigns a default pager object.
4. The VM object’s default pager attempts to write the page out to the backing store.
5. If the pager succeeds, the kernel frees the physical memory occupied by the page and moves the page from the inactive to the free list."

The OS has to go through this list everytime before it frees up memory from the inactive store. Which, granted, is normally not a problem, in fact it is great when you are using finder a lot and surfing the web a whole bunch and just about most other things you do most of the time when you use a computer.

I think you misunderstand what's going on here. Yes, in a sense, this is what happens "each time" as you say, but this is NOT an additional step. The kernel does this as a CONTINUAL PROCESS with EACH PAGE IN PHYSICAL RAM. In other words, these are not steps 1-5, though it certainly could happen that way.

You generally don't need to clear inactive RAM because that RAM while not "free," is free to be called by any app. It doesn't speed up the process any for that RAM to be free instead of inactive because the pages are released as its called.

The differences between an app being allocated more memory from inactive or free is negligible because it starts by releasing memory to you that has ALREADY been cached to disk. It's not writing contents to the swap when it's being released. That would be incredibly inefficient.

There are no real apps to do this because if you're a guy who can write an app to do this, you also understand that it's not worth the time and the effort.

I'm sure there's some there's some outlier group that really needs this for some strange interaction but 99% of the time I have seen this question, it's because the questioner simply doesn't understand what it means.
 
Hmm, okay I get what you are saying, but I guess I need to figure out what else it is that changes during a restart that makes running a game, or most anything else for that matter, run so much more smoothly. I downloaded ifreemem and am trying that out, so far it seems to have decreased the load time for certain things significantly, although I worry it is placebo.
 
Hmm, okay I get what you are saying, but I guess I need to figure out what else it is that changes during a restart that makes running a game, or most anything else for that matter, run so much more smoothly. I downloaded ifreemem and am trying that out, so far it seems to have decreased the load time for certain things significantly, although I worry it is placebo.

Hey, you could be one of these guys who does have a specific interaction. Don't know what's really going on in your computer, no one else here would.

I'm looking at iFreeMem's page and to be honest with you, I can't figure out exactly what it does nor how it actually improves anything.
 
Look at it like this:

FREE memory is worthless memory. It's contents is useless for the system.
INACTIVE memory is more valuable. It is free memory with contents that the system knows what it is. If the contents are needed again, the memory is just there!

When an application needs more memory it can use either free or inactive memory. The costs are the same. The system DOES NOT have to first write the contents of inactive memory to the swap file before it can be used.

Because inactive memory is more valuable than free memory the system chooses to use free memory before grabbing inactive memory.

Here is a simple C program that nukes the cache in inactive memory and makes it free. When run, the program allocates a large amount of memory and writes to it so that it has to be allocated. All free and inactive memory is used up. When the program exits, all memory becomes free since the contents are unrelated to any VM object.

I would never use this program myself since it destroys the valuable inactive memory and converts it into worthless free memory. This degrades the performance of your system. But it might give some tinkerers and memory measurbators pleasure so here it is. Enjoy!

Code:
#include <stdlib.h>
#include <string.h>

int main(int argc, char *argv[])
{
    int siz = (argc > 1 ? atoi(argv[1]) : 1024*1024)*1024;
    void *p = malloc(siz);
    if (p != NULL) {
	memset(p, 1, siz);
	memset(p, 113, siz);
    }
}

Since the people worrying about free vs inactive memory obviously are advanced users they would have no problems figuring out how to compile and run this program.

The program takes the amount of memory to nuke as argument, measured in kB. To nuke about 1GB use
$ ./prog 1000000
 
There is one reason I have found to clear as much ram as possible.

I tend to use my MBP on irregular schedules, and have found that accidently leaving it sleeping in the case causes undesirable discharges of the battery; lots of extra wear and tear on an expensive part. I set it to hibernate on lid close instead...but then was waiting up to a minute or two for ram reload from disk on every startup.

iFreemem fixes that problem nicely, just run it before you put the machine away and the next time you use the machine it'll load up from hibernation in a few seconds.

I've also noticed that when running Parallels with VM's set for large memory sizes (~2gb), they tend to load up quicker if I run iFreemem first.

That said, I haven't seen any errors such as described earlier in the thread, at least not since switching to Leopard. I can run Parallels and Adobe stuff and the WoW client, browser, etc. etc. simultaneously with no resource conflicts (save for a bit of graphics slowdown). I have seen plenty of these errors in various versions of Windows.
 
Different Issue, maybe same problem?

Computer specs:
Dual 1.8 GHz G5
1.5 GB DDR SD Ram.


Hey, so I've been having an issue with photoshop CS3. Im not sure if this has to do with inactive memory, or something completely different, but after reading all the posts it seems like it could be related?

This could be some sort of setting inside of OS X that I need to change. But I'm unsure what actually needs to be changed.

Ill be using photoshop for some large file (usually in the 250-700 MB area).

Once I'm done with the program I'll close it.

Now the next time I open photoshop, its super slow. Everything seems to be very sluggish to the point where even clicking on "File" or "Edit" menu, cause the computer to load for about 10 seconds. Im not even selecting anything from the menu, just bringing up the menu takes really long.

Nothing I can do can make this sluggishness go away unless I reset the computer. Then it works like a dream, until I close and reopen photoshop, then its messed up again.

Now don't get me wrong, I'm not bashing or blaming. I'm just curious to what setting I can possibly change to prevent photoshop from doing this sort of thing.

(I have no idea if this has anything to do with the inactive memory, or something completely different.)


Thanks in advance for any help on the subject.
 
I think your problem is probably due to not having enough RAM, rather than inactive RAM. Open up Activity Monitor click on the system memory tab and then see how many page ins and page outs you have.
 
Are you Quitting Photoshop, or just closing the window? It might make a difference.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.