Quick poll, what are you running, and what's your memory consumption? Here's me:
Currently running: Firefox, Spotify, Mail, Calendar, Terminal, Mongo (mongo using 100mb).
Memory Used: 3.75 GB
For instance I have KDE4 running on Linux with Firefox, Amarok, Kopete, Konsole and all other default services (ssh etc). Used memory is 1.1GB.
I've ML running with Firefox, Terminal.app, Activity Monitor in addition to the defaults. Any my used memory is 3.92GB. Wired is 1.75GB and Swap used is 11MB!
My experience with Windows 7 is also lot better than ML - it tends to be bit more than Linux but in the same ballpark.
Edit: To put this in perspective - I just realized that my work laptop (that I RDP into and never reboot) with all possible bloatware loaded and running - Word, Outlook, RDP, Lync 2010, Java Backup process, Enterprisey stuff, Firefox with couple tabs etc. is taking up only 2.83 GB! Apple really has a memory usage problem with OS X.
It's far more interesting to see what happens in a low-memory situation.
If I've got a 4gig machine, and running 5 apps takes up 3.8 gig, trying to run another app with necessitate swapping/paging some of the existing apps around to accommodate my new app. If those initial 5 apps only took up, say, 2.8g, I'd have less chance of hitting 'low-memory' situations in the first place.
I say this as someone with 16g mbp and SSD who still hits beach balls and unexplained pauses on a daily basis. Fewer than I used to, but it gets annoying. Not quite as annoying as win95/2k blue screens of 12+ years ago, but getting my ire up.
I turned off Dashboard where I had a couple of unused widgets active running in the background (used Dashboardkiller app from MacUpdate) because I haven't used any of those widgets in months. Suddenly all of my mysterious memory/paging issues on Lion disappeared. Swap and page-outs decreased significantly. Machine is running like the first fresh install. Give it a try.
Edit: I'm running Lion 10.7.4
Chrome (only 8 tabs right now), Rdio, Sparrow, Coda, Terminal, Notational Velocity.
Page-outs refer to a file-backed page being committed to disk; these are perfectly normal and expected (program writes to a file, kernel eventually commits to disk). Every OS guarantees that file-backed pages be committed within some reasonably short period of time to reduce the risk of lost data in the event of a power outage (the sync interval).
A high page-out rate doesn't necessarily imply memory pressure; it may simply mean some program running on the system is writing to files frequently. However, memory pressure may temporarily increase the page-out rate if the sync interval hasn't yet kicked in.
Swap-outs, on the other hand, relate to anonymous memory pages (i.e. the heap). Swap-outs, in contrast to page-outs, are generally bad and indicate severe memory pressure.
1) Open two Terminal windows.
2) Run top in one of them.
3) Note the pageout number.
4) In the other, type echo foo > bar.txt
5) Refer again to pageout number.
You will see that it did not increase, even though the system just wrote to a file. This will be the case even if you wait a while.On OS X, the reported pageouts are dirty memory pages being tossed, not writes of files to the filesytem.
Your definition also does not match the historical distinction between swapping and paging and the distinction you draw is idiosyncratic. Originally, swapping referred to swapping out all of a process's memory, while paging is done in chunks. No system has true "swap" in this original sense any more, so the terms "swap" and "page" are now basically interchangeable.
OS X may admittedly be different. It's unfortunate that it doesn't expose more counters to help show what's really going on.
As for "reported pageouts are dirty memory pages being tossed" - where are they being tossed to, if not the filesystem?
I have never heard "Page-outs refer to a file-backed page being committed to disk."
I think you are confusing it with a file cache or buffer cache commit interval.
A page out is when a page of memory is written to disk ("paged out") so you can use more live memory than you have physical RAM. Fun fact: the kernel is smart enough to not page out the page in code.
That's a distinction without a difference - the file/buffer cache stores memory pages. They are simply file-backed pages.
The data section is the actual compiled bits of the program: the machine instructions themselves. The stack and heap are memory used by the program at run-time.
Completely separate from that, on a Linux system, there is the VFS buffer-cache system. When you write to a "file", you are actually writing to VFS buffer cache memory, and the OS then flushes that dirty page of VFS cache to disk, at which point the write is committed.
Your description of page-outs sounds as though you are describing the operation of the VFS buffer cache flushing its dirty pages to disk.
In my college education (1998 to 2003), we used the terms swap-out and page-out interchangeably.
However, I have heard some people make the distinction of using page-outs/ins to specifically refer to just the data section of an app being written to / read from disk, with term swap-outs/ins referring to the same operation on the stack and heap.
But I've never encountered the term "page-outs" being used to refer to dirty file-backed storage pages being flushed to disk. Is this an old-school hacker thing? Or did I misunderstand and create a straw man?
Doesn't sound right to me; if the power goes, you're rebooting into a fresh memory image, not recovering to the memory state in the current pagefile.
Eagerly synching back to disk is surely more about making sure you have a minimal amount of dirty pages in RAM at any time, so that in the event that you need to use a lot of RAM for something else you don't have to wait until the backing store updates before the page space in RAM is free... no?
Edit: Oh, I see - you're saying that 'page out' refers to writing a page of data back to disk through a memory-mapped file - it's basically just a disk write, and has nothing to do with memory pages or pagefiles. Hmm... is that terminology distinction universal?
Just curious: is that "short period of time" usually in order of seconds or minutes? (I know different OSes have different defaults; I just want to know a ballpark figure!)
The first time I installed a box with ReiserFS, I recall being alarmed by my box "ticking" every 5 seconds.
This is on a MBP with 8 GB RAM.
I never had any memory-related performance issues in Lion, (maybe because I have an SSD), but I always end up with a big pagefile of stale data.
The OP (and others, including myself) have observed a noticeable drop in the delays caused by frequent paging in and out. I checked and my pagefile is the same size as on Lion. Perhaps ML is still paging frequently, but if so, they've found a way to do it so that I'm not noticing it. Everything just feels faster compared to Lion.
unless you disabled it deliberately through a 3rd party tool or command line, your macbook will dump all of RAM to disk as soon as it sleeps - this is your "safe sleep" recovery if power drops too low. It doesn't wait around for low power to dump it out, it does it as soon as you close the lid.
The upgrade was fast and easy, definitely not something I expected and I had backed up my machine to do an install from scratch, but not required at all.
And, "no matter which OS" is definitely incorrect. I've done an in-place upgrade of an OpenBSD system for the better part of six years (twelve upgrades, twice a year). The _recommended_ approach on that platform is to do _in place_ - not clean install. It's how you maintain library compatibility with all your legacy apps.
As for actual on-battery use - yes, the battery life is noticeably improved over Lion.
On Lion at least I noticed that if I left my USB HD in, and closed the lid on battery it killed it, every time. There was an Apple Support thread confirming that.
Parallels gets abysmally slow for me when TimeMachine starts up.
If your VM image is being backed up that could be a problem. I keep my VM images on an external drive mainly for overall i/o performance reasons. They're not backed up but then all the data I care about is still on my main drive and safe. If you can tolerate the risk, you could try excluding the VM image directory from time machine and see if that makes a difference.
I can't upgrade yet because I disabled HFS+ journaling and nothing seems to be able to re-enable it (the installer requires journaling to be enabled).
[1] http://d43.me/blog/1205/the-cause-for-all-your-mac-os-x-mous...
otool -o /Applications/Xcode.app/Contents/MacOS/Xcode
.....
Contents of (__DATA,__objc_imageinfo) section
version 0
flags 0x6 OBJC_IMAGE_SUPPORTS_GC
That's for Xcode 4.4. So yes, it's still being built for Garbage Collection.I imagine that as they drop support for older platforms and have the time, they'll slowly remove reliance on gc.
By not switching to lion and waiting for ML you dodged a bullet.
Hackintoshes :/
The one that allows hardware accel on a single screen is actually the right one for the card. The hex editing is to change the display outputs to enable the second head.
There are some memory models which appear to behave in a way which is relatively psychologically pleasing, and some which do not.
When users are using a program, there are certain times when they have a reasonable expectation that the machine is going to need some time to complete a task ("click and wait"). There are other times when they have no such expectation, and if the machine makes them wait, they get annoyed.
It isn't about the total time they have to wait, its about whether that waiting occurs when they expect it to or not.
Further, when they start to experience these unexpected, annoying pauses, they have a certain expectation that adding more RAM to the system should solve the problem, and when it doesn't, their annoyance only intensifies.
Having used both Linux and OS X as a desktop, I'm going to claim that the Linux VM behavior is pleasing in the ways described above, and the OS X behavior is not.
My understanding is that this is due to just one underlying behavior of the VM: When experiencing memory pressure, Linux (generally) favors evicting filesystem cache over swapping out stack/heap memory to disk, and OS X does not.
I have zillions of apps open.
1GB wired, 3.25GB active, 1GB inactive, 2.55 free
757,197 Page Ins
0 Page Outs
It's confusing... If I haven't "swapped out" (page out) anything to disk, then how come I've "swapped in" (page in) 750,000 pages from the disk?The changes in Mountain Lion have been subtle, but I really love the upgrade. I performed a full disk backup which took the longest amount of time. The actual install (2012 MacBook Air) took like 15-20 minutes. If anyone is in doubt, definitely do yourself the favor and upgrade. Typically I am hesitant to do major OS upgrades due to things like python or ruby breaking most of my local websites ... everything works great!
I had to modify some apache2 settings (I use the built-in webserver for PHP development) but that was about it. Oh also, apache is still there. A lot of people think that it's gone because the preferences pane is missing, but it's still hiding within the belly of the beast.
I feel like I can throw anything at this. I've never multitasked like this before.
“free memory is wasted memory” vs “inactive memory is never released”
“Purge is the worst thing you could do” vs “Purge solves the issue”
We have the kernels's source[1] and DTrace. Let's get some real data?
Subtle changes and I'm happy with them. Probably the next year, we'll see some subtle improvements on the backend.
I've found new bug in ML, whenever I switch users, Mountain Lion seems to think I've a desktop much smaller than what I actually have. And sometimes the "virtual" desktop isn't even positioned at 0,0 on my actual desktop. :-/