Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

VinegarTasters

macrumors 6502
Nov 20, 2007
278
71
So what kind of program would work like that without resetting the icons on launchpad or other OS X areas? I did find an app to "free memory" as their are apparently many, but I don't like how it resets EVERYTHING.

That is a good question. The new model of Mountain Lion programming model forces you to tell the OS what to do. If you don't tell it, it doesn't know what to do, and will treat you program like iOS does. All the old programs don't have these code to tell Mountain Lion. So you can wait for them to update to a newer version so they behave better under the new model. You probably need a program with root privilege that can undo what Mountain Lion is doing... trying to be like an iOS device.

iOS devices has about 64GB Flash at most (most people get the 16GB). They are also using Flash (like ssd), which is many times faster than regular harddrives. So what happens is that you get tiny programs that are constrained into the 256MB to 512MB RAM (about a quarter to half of 1GB), that are easily dumped (and fast too) into the flash, and loaded.

Now they are trying to use this methodology on OSX, which usually has 8GB or 16GB of RAM, and are running on harddrives (many many times slower than flash because it is mechanical with a rotating disk) that are 500GB in size no problem. I am hoping they took into consideration performance. Or will it be like the NeXT computer forcing everyone to use writable optical drives, without considering whether performance is critical, not because it is the next best thing. Or Corel trying to move wordperfect into Java. So you have programs like iMovie which can easily take up over 8GB of RAM that are "save state" into the "memory", taking up either valuable active memory or inactive memory depending on how you closed the program. Soon no matter how much memory you have it doesn't matter. All programs that ran before probably has these "stubs" hanging around (like iOS, where you double click and see a list of previous run applications) either in active or inactive memory (taking up virtual or real memory). So the OS is constantly swapping back and forth trying to deal with these memory guzzler apps (not like iOS apps that only has at most half of gigabyte).

So what does this mean? Probably in the future MacBooks will run on ARM chips, and a version of iOS, using iOS methodology. Probably because they are the breadwinners now, and dictate how the OSX's direction run... so in the future they can be merged.

So to answer your question, you probably need a new program made in Mountain Lion, has root privilege, understands the new methodology, and can wipe the inactive memory out.
 

theSeb

macrumors 604
Aug 10, 2010
7,466
1,893
none
A lot of facepalm in this thread. Vinegar taster, what paid agenda are you part of? I hope that it's you actually upvoting your own posts and that it's not someone else agreeing with you.

iOS methodology? Thanks for the laughs.

iOS devices has about 64GB Flash at most (most people get the 16GB). They are also using Flash (like ssd), which is many times faster than regular harddrives.

No, it's actually not. The flash memory in smart phones is nothing like a SSD drive or flash memory in a computer. It's quite slow actually, even compared to a good, old-fashioned mechanical hard drive.

So what does this mean? Probably in the future MacBooks will run on ARM chips, and a version of iOS, using iOS methodology. Probably because they are the breadwinners now, and dictate how the OSX's direction run... so in the future they can be merged.
I don't think you understand the relationship between iOS and OS X at all.

LLVM does use a VM on Mac.

No. LLVM can be used to create a virtual machine, but it has very little to do with traditional virtual machines that you've mentioned, like Java and .NET. LLVCM / Clang compiled code does not run in a virtual machine on OS X or iOS.

VinegarTasters said:
some stuff about ARC and Garbage Collection

ARC is not garbage collection like in Java. Garbage collection in Java runs periodically, during runtime, which reduces end-user performance. ARC in Cocoa is done during in compilation so it does not cost any run time cycles - it is a static type of memory management since the compiler basically checks through the code and inserts retain and release statements where necessary. Apps with dynamic GC normally use more memory and slow down when GC is invoked. The disadvantage of static GC, like ARC, is that it cannot catch retain cycles (A retains B and B retains A, hence why we use strong and weak pointers in Obj C for parent - child and child - parent relationships)

And finally to address your rant about Objective C performance.

Objective C is a compiled language like C/C++, does not run in a virtual machine and isn't interpreted so as far as programming languages go, it's very much on the fast side of the room. Objective C is a clean superset of C. The big difference is the late method binding, which is similar to what C++ does. Like C++, it uses function pointer tables that are generated by the compiler and need to be read during runtime. Performance takes a slight hit in comparison to C++ here due to the more dynamic nature of Objective C's implementation with the use of the id superclass.

The general agreement though, if you do some reading, is that this difference is theoretical and not really measurable in real world performance. C is fastest, then C++ and very close behind is Objective C.
 
Last edited:

VinegarTasters

macrumors 6502
Nov 20, 2007
278
71
A lot of facepalm in this thread. Vinegar taster, what paid agenda are you part of? I hope that it's you actually upvoting your own posts and not someone else.

iOS methodology? Thanks for the laughs.



No, it's actually not. The flash memory in smart phones is nothing like a SSD drive or flash memory in a computer. It's quite slow actually, even compared to a good, old-fashioned mechanical hard drive.

I don't think you understand the relationship between iOS and OS X at all.

You can upvote your own posts? Actually I rarely pay attention to those numbers until you brought them up. I got numbed by Google + button and Facebook LIKE numbers. :)

The flash thing, you should get up to speed. MLC, TLC, SLC, they are evolving at super duper speed, faster than harddrives can keep up with. Even MicroSD has variations for cameras that can outperform harddrives, you just gotta pick the type. Cheap, slower, higher price faster.

My paid agenda is: I paid for a device, I should get the most value out of it. Preferably fast performance, and bug free.

On the OSX versus iOS. You don't notice the merging of the two? App Store, Launch Pad, Notes, Messages, Facetime, bla bla bla. In fact there was a prototype of a MacBook running on ARM. Come on... get with the times.

As for the ARC and Garbage Collection and Objective-C. You label only Cocoa as being a static type memory management. If you look through the thread I point out there are LOTS of places in OSX that uses dynamic type. The JIT of OpenGL for example. I provide proof. You can look it up. Its just a few posts up from this one. But I find it strange everytime I put something up, they get deleted. So you need to use Google Cache. Also, there are LOTS of places in OSX that uses "dynamic GC", and garbage collection. In fact, ALL programs created before Mountain Lion was released (just a few months ago!) uses Garbage Collection if they program in Objective-C (default compile state parameters). Being deprecated does not mean it is gone. You can still program using GC if you want today. ARC as I mentioned is just a bandaid fix. They should just move to C or C++. Message passing is SLOW! Most games lose 15 percent to 50 percent framerate because of message passing. That is why games are faster on Windows than OSX. They don't have objective-C underneath... They use C++.
 
Last edited:

theSeb

macrumors 604
Aug 10, 2010
7,466
1,893
none
You can upvote your own posts? Actually I rarely pay attention to those numbers until you brought them up. I got numbed by Google + button and Facebook LIKE numbers. :)

The flash thing, you should get up to speed. MLC, TLC, SLC, they are evolving at super duper speed, faster than harddrives can keep up with. Even MicroSD has variations for cameras that can outperform harddrives, you just gotta pick the type. Cheap, slower, higher price faster.
I keep up with the latest developments just fine. The latest smart phone memory just announced last month by Samsung is said to be 4 times faster than current phone flash memory.

Today even budget personal computer (PC) solid state drives (SSDs) offer read speeds of up to 230 MB/s and write speeds of up to 190 MB/s. Top-of-the-line models can record speeds of up to 492MB/sec for sequential reads and 518MB/sec for sequential writes.

But the NAND memory used in tablets and smartphones has been stuck in the slow lane, largely due to power and space (form factor) constraints. That's why the new Samsung Embedded Multimedia Card (eMMC) Pro Class 1500 is an exciting development, despite speeds that would seem pedestrian by PC standards.

The eMMC modules off sequential reads of 140 MB/s and sequential writes of up to 50 MB/s. For random reads/writes it can handle 3500/1500 IOPS (inputs and outputs per second), which Samsung claims is four times as fast as previous solutions.

That means this new memory is slower than a 7200 RPM HDD in sequential writes and faster in random reads and writes. An OCZ Vertex 3 is rated at about 60,000 IOPS.

So where does that put current smart phone flash memory? It's just not very fast at all. That's why you don't need USB 3 on a smart phone since it won't make copying things onto it or from it any faster at this point in time. USB 2 is fast enough.

My paid agenda is: I paid for a device, I should get the most value out of it. Preferably fast performance, and bug free.

On the OSX versus iOS. You don't notice the merging of the two? App Store, Launch Pad, Notes, Messages, Facetime, bla bla bla. In fact there was a prototype of a MacBook running on ARM. Come on... get with the times.
Familiar functionality and apps does not mean much and is not what the discussion is about. iOS, as an operating system and development platform, is simply a subset of OS X. Keeping the last run apps and data in memory has been a feature of OS X memory handling for as long as I've been using it. That's why an app launches so quickly when you've just closed it. This is not something introduced by IOS-ification. Apple has been pretty clear about the direction of OS X and iOS at WWDC in terms of the underlying technology and where they are heading.
 

Ledgem

macrumors 68020
Jan 18, 2008
2,042
936
Hawaii, USA
On the OSX versus iOS. You don't notice the merging of the two? App Store, Launch Pad, Notes, Messages, Facetime, bla bla bla. In fact there was a prototype of a MacBook running on ARM. Come on... get with the times.
You're talking about user interface features, many of which make sense to combine for simplicity of user experience. How do you make the jump to think that it means Apple is porting core operating system functions? Do you think they would do that just for the sake of it, even if it meant worse performance?

Believe what you want, but please stop trying to pass your beliefs off as fact.
 

wd40

macrumors newbie
Nov 5, 2007
14
0
As I said before, the after picture shows that page outs occurred since the last restart, but does not prove that they occurred at a time when there was inactive memory available. I would be happy to concede that this is happening, but I've never seen any proof.

Proof? How's this for proof:

I just restarted my mbp (running 10.8.2), fired up Chrome (which re-opened the previous state of 40+ tabs) and 65% of the way through loading all the tabs, the inactive memory jumped from under 100MBs to 3GB+.

THIS IS WHAT ALWAYS HAPPENS WHEN CHROME IS LOADED.

Once Inactive Memory shot up above 3GB, Free Memory shot down to under 20MBs. At this point, Page Outs began and are now at 1.48GB (with all tabs fully loaded). Swaps used = 3.69GB.

I'm running a 2011 MBP with 8GB RAM.

I have to restart multiple times per day and can't do design work with chrome open.

How much more proof do you need that this is happening to A LOT OF PEOPLE??

Is there a way to clear the 3GB of inactive that always appears when Chrome (or any other browser) is loaded)?? Running "FreeMemory Pro" just makes everything worse.

/sigh
 

GGJstudios

macrumors Westmere
May 16, 2008
44,556
950
Proof? How's this for proof:
That's not proof. That's only more claims. I've already specified what would qualify as proof. If you want to troubleshoot your issue, follow every step of the following instructions precisely. Do not skip any steps.
  1. Launch Activity Monitor
  2. Change "My Processes" at the top to "All Processes"
  3. Click on the "% CPU" column heading once or twice, so the arrow points downward (highest values on top).
    (If that column isn't visible, right-click on the column headings and check it, NOT "CPU Time")
  4. Click on the System Memory tab at the bottom.
  5. Take a screen shot of the entire Activity Monitor window, then scroll down to see the rest of the list, take another screen shot
  6. Post your screenshots.
 

throAU

macrumors G3
Feb 13, 2012
9,227
7,382
Perth, Western Australia
There are certain situations where it WOULD be desirable to swap, when there is still free memory available in the "inactive" pool.

Why?

If you are performing a lot of disk i/o, and you have programs in ram that are INACTIVE.

Page non-running program to disk, it will be cached in the disk cache ANYWAY during the swap out, and use its memory for cache on other more hot areas of the disk if required.


SWAP is not bad inherently. You should be concerned if your swap disk is doing a massive number of IOs and you are also currently actively swapping (number in brackets).

Seeing that your mac HAS swapped at some point is nothing to be alarmed about. Its what the VM subsystem is DESIGNED to do.

These memory reclaim apps, etc are just going to ruin the performance of OS X's disk caching.



In earlier versions of lion, apple got the numbers wrong with the VM tuning and it was trying to write things out to swap too greedily (possibly tested primarily on SSD is my bet). Later versions of Lion and ML have fixed this. Same idea, just slightly less aggressive on swapping out to favour disk caching.
 
Last edited:

wd40

macrumors newbie
Nov 5, 2007
14
0
That's not proof. That's only more claims. I've already specified what would qualify as proof. If you want to troubleshoot your issue, follow every step of the following instructions precisely. Do not skip any steps.
  1. Launch Activity Monitor
  2. Change "My Processes" at the top to "All Processes"
  3. Click on the "% CPU" column heading once or twice, so the arrow points downward (highest values on top).
    (If that column isn't visible, right-click on the column headings and check it, NOT "CPU Time")
  4. Click on the System Memory tab at the bottom.
  5. Take a screen shot of the entire Activity Monitor window, then scroll down to see the rest of the list, take another screen shot
  6. Post your screenshots.

Thanks for the response - will post screenshot shortly. Sorting by "% CPU" causes the "Process Name" list to change every second. Can I sort by "Real Mem"? That doesn't bounce around as much.
 

GGJstudios

macrumors Westmere
May 16, 2008
44,556
950
Thanks for the response - will post screenshot shortly. Sorting by "% CPU" causes the "Process Name" list to change every second. Can I sort by "Real Mem"? That doesn't bounce around as much.
Yes, it will fluctuate, but it's more helpful to sort by CPU.
 

smithrh

macrumors 68030
Feb 28, 2009
2,747
1,791
Hmmmmm.....
 

Attachments

  • 1.png
    1.png
    364.2 KB · Views: 116
  • 2.png
    2.png
    330.6 KB · Views: 122

Ledgem

macrumors 68020
Jan 18, 2008
2,042
936
Hawaii, USA
Proof? How's this for proof:

I just restarted my mbp (running 10.8.2), fired up Chrome (which re-opened the previous state of 40+ tabs) and 65% of the way through loading all the tabs, the inactive memory jumped from under 100MBs to 3GB+.

THIS IS WHAT ALWAYS HAPPENS WHEN CHROME IS LOADED.
...
I have to restart multiple times per day and can't do design work with chrome open.
I don't have this issue with Chrome, but I don't think I ever have more than 10-15 tabs open at a time. 40+ seems like an awful lot. If you close those tabs, do you still have memory issues with Chrome? If not, you may want to consider keeping your tab count low and coming up with an alternate solution (like creating a "tab" folder for your bookmarks, and then going heavily from there). If it saves you from having to restart multiple times per day, I think that would be worth it.
 

AlanShutko

macrumors 6502a
Jun 2, 2008
804
214
Most games lose 15 percent to 50 percent framerate because of message passing. That is why games are faster on Windows than OSX. They don't have objective-C underneath... They use C++.

Usually the source code for the engine and app are the same, and it's in C++. The UI might be using cocoa, but it's more common that it's using OpenGL directly with a very few mac-specific calls. The main problem with framerate is that the graphic drivers are better on Windows than Mac.

Valve, for instance, has done a lot of work with Apple and vendors to find performance bottlenecks.

http://store.steampowered.com/news/4211/
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.