Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Hardware > Notebooks > MacBook Pro

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 29, 2013, 09:06 AM   #1
Folmanik
macrumors newbie
 
Join Date: Aug 2007
Does my memory leaking?

i searched for a bit and i understand that the mac is different from pc in the way he uses memory, but i still don't understand why my mac uses that much memory..

i have a week old macbook pro 13 inch with 8 gb ram, one of the first apps i installed was memory clean, which suprised me by telling me i have only 3 gb of free space (it was before getting familiar with activity monitor),
so, i read about the types of memory (active, wired, etc.) but i still can't manage to understand how is it possible that a week old computer uses between 4 and 7.5 gb of memory without running too many apps..

should i worry or the is it normal?

thanks in advance!

Last edited by Folmanik; Jan 29, 2013 at 09:13 AM.
Folmanik is offline   0 Reply With Quote
Old Jan 29, 2013, 09:12 AM   #2
Crzyrio
macrumors 6502a
 
Join Date: Jul 2010
Nothing to worry about!

It just stores all those apps you have already opened and closed in memory as well, that way when you go to open that app again its much faster

If you open different apps it will start to automatically remove stuff from the memory to make room for the new app
Crzyrio is offline   0 Reply With Quote
Old Jan 29, 2013, 09:15 AM   #3
Folmanik
Thread Starter
macrumors newbie
 
Join Date: Aug 2007
thanks!

thanks a lot!!

i searched around but couldn't find a definitive answer for that..

just couldn't realize how a person with 4gb or less handles the mac..
Folmanik is offline   1 Reply With Quote
Old Jan 29, 2013, 10:55 AM   #4
old-wiz
macrumors 604
 
Join Date: Mar 2008
Location: West Suburban Boston Ma
I have several Macs with 4GB of memory and they all run just fine.
old-wiz is offline   0 Reply With Quote
Old Jan 29, 2013, 11:54 AM   #5
F1 Fan
macrumors regular
 
Join Date: Apr 2012
Admittedly I know almost nothing about this but from what I have seen others saying elsewhere OS X will try to use as much RAM as you give it to improve your experience. Once the basic needs are met any extra RAM you have is used to smooth things out in less and less major ways.
F1 Fan is offline   0 Reply With Quote
Old Jan 29, 2013, 11:57 AM   #6
GGJstudios
macrumors Westmere
 
Join Date: May 2008
Quote:
Originally Posted by Folmanik View Post
should i worry or the is it normal?
Your Mac will use whatever memory is available. That's what it's there for. The only thing you need to watch for is page outs, which indicate that you're maxing out your RAM.

To determine if you can benefit from more RAM, launch Activity Monitor and click the System Memory tab at the bottom to check your page outs. Page outs are cumulative since your last restart, so the best way to check is to restart your computer and track page outs under your normal workload (the apps, browser pages and documents you normally would have open). If your page outs are significant (say 1GB or more) under normal use, you may benefit from more RAM. If your page outs are zero or very low during normal use, you probably won't see any performance improvement from adding RAM.

Using Activity Monitor to read System Memory and determine how much RAM is being used
GGJstudios is offline   0 Reply With Quote
Old Jan 29, 2013, 12:23 PM   #7
leman
macrumors 68040
 
Join Date: Oct 2008
The question you should be asking yourself is whether you have any performance problems. RAM usage statistics by themselves mean nothing. They only become meaningful if you run into performance problems.

As mentioned above, a good way to see whether your system is struggling with RAM is to inspect the number of page-outs compared to page-ins. If the ratio of page-outs is constantly over 10%, then you really might have something hogging RAM.
leman is offline   0 Reply With Quote
Old Jan 29, 2013, 12:25 PM   #8
GGJstudios
macrumors Westmere
 
Join Date: May 2008
Quote:
Originally Posted by leman View Post
As mentioned above, a good way to see whether your system is struggling with RAM is to inspect the number of page-outs compared to page-ins. If the ratio of page-outs is constantly over 10%, then you really might have something hogging RAM.
There is no meaningful correlation between page outs and page ins. You will always have page ins, but you may not ever have page outs. Also, you can run for weeks or months, accumulating page ins, then go through a period of intense activity for only a few minutes which produces page outs. No ratio between the two is useful. The only thing that indicates a need for more RAM is the presence of significant page outs during normal workload, regardless of the page ins.
GGJstudios is offline   2 Reply With Quote
Old Jan 29, 2013, 12:46 PM   #9
swerve147
macrumors 6502a
 
Join Date: Jan 2013
When monitoring your page outs make sure you're monitoring your normal usage over a longer period of time to get a good sampling of your RAM usage. A single, simple rogue process like Flash mis-utlization on a webpage can easily cause your RAM to be over-utilized and page-outs to shoot through the roof.
__________________
15 in. MacBook Pro with Retina display mid 2012 (2.6/16/512) | iPhone 6 Plus AT&T
swerve147 is offline   0 Reply With Quote
Old Jan 29, 2013, 12:53 PM   #10
sniffs
macrumors member
 
Join Date: Jan 2013
What's odd is that I got a brand new MBP with 4GB of ram.. I noticed that I rarely went above 3GB usage, even running Outlook all day and Firefox and some little apps in my finder bar..

I upgraded to 16GB of ram and now noticed that instantly my mac is using 7-9GB of ram.. It's very strange and I don't know why..

Another thing I noticed is that the amount of ram installed correlates to the size of your "sleepimage" .. mine went from 4GB to 16GB so now it's eating up another 12GB of disk space..
sniffs is offline   0 Reply With Quote
Old Jan 29, 2013, 12:55 PM   #11
GGJstudios
macrumors Westmere
 
Join Date: May 2008
Quote:
Originally Posted by sniffs View Post
Another thing I noticed is that the amount of ram installed correlates to the size of your "sleepimage" .. mine went from 4GB to 16GB so now it's eating up another 12GB of disk space..
That's normal, as the contents of RAM are copied to the sleepimage before your Mac sleeps.
GGJstudios is offline   0 Reply With Quote
Old Jan 29, 2013, 12:55 PM   #12
1member1
macrumors 6502
 
Join Date: Sep 2012
It's ok unless you feel some downgrade in your performance.
I got 8gb as well sometimes 4 or 5GB taken and i'm just growing the web, listening to music and chat with people.

OSX use your memory way different and there are more things in the management of the operating system that will feel different from windows.
1member1 is offline   0 Reply With Quote
Old Jan 29, 2013, 12:56 PM   #13
leman
macrumors 68040
 
Join Date: Oct 2008
Quote:
Originally Posted by GGJstudios View Post
There is no meaningful correlation between page outs and page ins. You will always have page ins, but you may not ever have page outs. Also, you can run for weeks or months, accumulating page ins, then go through a period of intense activity for only a few minutes which produces page outs. No ratio between the two is useful. The only thing that indicates a need for more RAM is the presence of significant page outs during normal workload, regardless of the page ins.
This is basically what I said, didn't I? Of course the proper window of observation is the most important thing here.

And of course the ratio of page outs to page ins is meaningful: this directly represents the proportion of page misses - which is exactly the thing that leads to reduced performance.
leman is offline   0 Reply With Quote
Old Jan 29, 2013, 12:56 PM   #14
robvas
macrumors 68000
 
Join Date: Mar 2009
Location: USA
Quote:
Originally Posted by sniffs View Post
What's odd is that I got a brand new MBP with 4GB of ram.. I noticed that I rarely went above 3GB usage, even running Outlook all day and Firefox and some little apps in my finder bar..

I upgraded to 16GB of ram and now noticed that instantly my mac is using 7-9GB of ram.. It's very strange and I don't know why..
It's just not purging items from RAM like it does when you have less memory. The idea is that if you need to access those objects again, they are still in RAM. But if you need the space for something new, the system allows them to be overwritten.
robvas is offline   0 Reply With Quote
Old Jan 29, 2013, 12:59 PM   #15
GGJstudios
macrumors Westmere
 
Join Date: May 2008
Quote:
Originally Posted by leman View Post
And of course the ratio of page outs to page ins is meaningful: this directly represents the proportion of page misses - which is exactly the thing that leads to reduced performance.
No, it's not meaningful. You could have 1GB of page outs with 5GB of page ins or 50GB of page ins. Both page ins and page outs are cumulative since the last restart, so some may restart daily, while others may restart after several months. The fact remains that at some point, you're maxing out the RAM. The user needs to determine if that occurred during normal workload or not, regardless of how long since the last restart.
GGJstudios is offline   0 Reply With Quote
Old Jan 29, 2013, 01:12 PM   #16
leman
macrumors 68040
 
Join Date: Oct 2008
Quote:
Originally Posted by GGJstudios View Post
No, it's not meaningful. You could have 1GB of page outs with 5GB of page ins or 50GB of page ins. Both page ins and page outs are cumulative since the last restart, so some may restart daily, while others may restart after several months. The fact remains that at some point, you're maxing out the RAM. The user needs to determine if that occurred during normal workload or not, regardless of how long since the last restart.
This is why I said that you have to control the observation window. This can be done by zeroing the counters (restarting) and then inspecting the ratio again after having performed a representative workflow session. Sorry if I didn't make myself more clear.

Another possibility is just not to restart at all for a very long time. Because the counters are cumulative, the statistical signal will 'smooth itself out' given enough time (as we can assume that untypical memory load situations only occur rarely).
leman is offline   0 Reply With Quote
Old Jan 29, 2013, 01:29 PM   #17
sniffs
macrumors member
 
Join Date: Jan 2013
Quote:
Originally Posted by robvas View Post
It's just not purging items from RAM like it does when you have less memory. The idea is that if you need to access those objects again, they are still in RAM. But if you need the space for something new, the system allows them to be overwritten.
Ah ok.. that makes complete sense. Thanks.
sniffs is offline   0 Reply With Quote
Old Jan 29, 2013, 06:14 PM   #18
Folmanik
Thread Starter
macrumors newbie
 
Join Date: Aug 2007
thanks a lot!

but when you say to watch over the page in/page out to see if it get's over 1GB or 10%, after how long should i watch the activity monitor?

cause i guess that after 1 day you'll have less then after 1 month..


for now, after 1 week without restart i have 2.5GB of page out..
Folmanik is offline   0 Reply With Quote
Old Jan 30, 2013, 06:25 AM   #19
Folmanik
Thread Starter
macrumors newbie
 
Join Date: Aug 2007
correction,
after 3 days i have 3gb of page out (and 55 of page in if it matters)

is it ok?
you're saying "more than 1 gb" but in what period?

thanks
Folmanik is offline   0 Reply With Quote
Old Jan 30, 2013, 09:28 AM   #20
dusk007
macrumors 68030
 
Join Date: Dec 2009
Quote:
Originally Posted by GGJstudios View Post
No, it's not meaningful. You could have 1GB of page outs with 5GB of page ins or 50GB of page ins. Both page ins and page outs are cumulative since the last restart, so some may restart daily, while others may restart after several months. The fact remains that at some point, you're maxing out the RAM. The user needs to determine if that occurred during normal workload or not, regardless of how long since the last restart.
You aren't make any more sense. This is why he said ratio. If you have 50GB page ins your system was probably up a long time and the 1GB page outs most definitely wasn't "normal" usage.
If the window is very small and you are only at 5GB than it is at least indicative that there might be an issue with 20% page outs. It could be an exception or it could keep growing like that.
The page ins are the most primitive way of showing how long the system has been up. How many page outs that don't really matter may have occured.
20% vs 2% is quite a difference. Wouldn't you say?

5% page outs vs page ins is definitely not a problem. I got way more at 10% (108 vs 10GB) and the only time they actually happen is when I throw the VM on at which time there is plenty that can be swapped out without any loss in responsiveness.
Generally swapping isn't much of a problem if the only cause is too many residing apps and not one big one or if you constantly use everything that is open. If you have an SSD it is even less of a problem because swapping is so fast.

Forget more than 1GB. Just go with the ratio. Under 10% you are definitely fine. About 20% you may want to look at more ram if it isn't too expensive. Much over 20% and you really need more RAM.
I would watch for at least a full day of work. The longer the better.
__________________
15" MBP 2013 2.3/750M, 16GB/512GB
dusk007 is offline   1 Reply With Quote
Old Jan 30, 2013, 12:11 PM   #21
GGJstudios
macrumors Westmere
 
Join Date: May 2008
Quote:
Originally Posted by dusk007 View Post
If you have 50GB page ins your system was probably up a long time and the 1GB page outs most definitely wasn't "normal" usage.
A high amount of page ins could indicate a long uptime, but it can also be driven by the apps, documents, etc. in use. You could have 50GB of page ins after a month, or after a few hours. The time frame isn't reflected in the amount of page outs. You may have operated for weeks with 10GB of page ins, then launched a memory intensive app that burned through 40GB of page ins in a few hours.

Quote:
Originally Posted by dusk007 View Post
The page ins are the most primitive way of showing how long the system has been up.
Exactly. A much more accurate method is to simply look at uptime.

Quote:
Originally Posted by dusk007 View Post
5% page outs vs page ins is definitely not a problem.
That depends on the amount of page outs. If the page outs are 70MB, the user won't notice it. If the page outs are 15GB, the user will likely notice an impact on performance. That's because the amount of page outs, and the amount of time the system is waiting on HDD read/write events, directly impact performance, whether that amount represents 5% or 50% of page ins.

Quote:
Originally Posted by dusk007 View Post
Forget more than 1GB. Just go with the ratio.
Again, the ratio is meaningless. Performance isn't impacted because a ratio was reached. Performance is impacted when significant page outs occur, regardless of the amount of page ins or the ratio. The same amount of time is spent waiting for 5GB worth of page outs, whether those page outs are 2% or 20% of page ins. The impact on performance is the same.
GGJstudios is offline   0 Reply With Quote
Old Jan 30, 2013, 02:28 PM   #22
dusk007
macrumors 68030
 
Join Date: Dec 2009
The uptime doesn't really tell you anything more.
If it happens so rarely that it doesn't show in the in/out ratio than it most likely just doesn't matter. The ratio tells you how much it actually means, how much more RAM would probably get you.
Uptime won't help you there in an significant way.

Quote:
Performance is impacted when significant page outs occur, regardless of the amount of page ins or the ratio.
A page out in a modern OS doesn't impact performance in the least. Only if you have a really slow HDD but most of the time there is enough inactive stuff mirrored in the swap long before you actually run out of space. The system usually doesn't stall while it waits until stuff is successfully swapped out. That would be a memory management designed by an idiot or one with swap turned off. The performance hit occurs when the stuff is read back in or when it is so much so fast that it is overwhelmed (rarely happens with consumer workload i.e. many apps/files... rather than one memory monster professional app). The ratio gives an idea how often that swap is used and thus an idea how much use one can get out of more RAM.
Most of the time swapping works really fast and is only noticeable by short stalls or slow downs. If that doesn't happen often what difference does it make.

The total of page outs is quite meaningless without lots more data about how long one used the system, what did he do, one app or many. Page ins is simply the work the memory system had since restart. If page outs are a high percentage of that many of those page ins come from swap and that hurts.
If swap is only as big as the page outs, it is only stuff that isn't used; written once and forgotten.
If the OS can keep all the important stuff in main memory page ins will always grow much faster than page outs. Only if it cannot it has to page out often and page in again. This are the cases when the ratio will go higher and this indicates a problem more clearly and accurately than anything else you can read from activity monitor. It is imo the simplest and most accurate advice one can give. Everything more accurate it complicated and requires some actual monitoring, or creates non objectively valid data. Some people here think they need more RAM after they see a bit of swap.
__________________
15" MBP 2013 2.3/750M, 16GB/512GB
dusk007 is offline   0 Reply With Quote
Old Jan 30, 2013, 02:50 PM   #23
GGJstudios
macrumors Westmere
 
Join Date: May 2008
Quote:
Originally Posted by dusk007 View Post
The ratio tells you how much it actually means, how much more RAM would probably get you.
There is nothing in a page in/page out ratio that will indicate how much more RAM will improve performance. Nothing.
Quote:
Originally Posted by dusk007 View Post
A page out in a modern OS doesn't impact performance in the least.
A single page out, no. For significant page outs, that is clearly false, as is well-documented all over the web.
Quote:
Originally Posted by dusk007 View Post
Only if you have a really slow HDD
Even a fast SSD is not as fast as RAM, so significant paging activity will impact performance in every case, just not as noticeably with a SSD vs a HDD.
Quote:
Originally Posted by dusk007 View Post
The system usually doesn't stall while it waits until stuff is successfully swapped out. That would be a memory management designed by an idiot or one with swap turned off. The performance hit occurs when the stuff is read back in
Writing and reading to a swapfile are both much slower than RAM speed, so the performance is impacted either way. Any time data is being written to or read from a HDD or SSD, the system is not performing as fast as it would if paging activity had not occurred.
Quote:
Originally Posted by dusk007 View Post
The total of page outs is quite meaningless without lots more data about how long one used the system, what did he do, one app or many.
Page outs indicate that at some point since the last restart there was not sufficient RAM to handle memory demands. I agree that more information is needed about the source of the page outs, which is why I recommended restarting and tracking page outs under the normal workload. If the page outs occur only with a single rarely-used app, or other unusual scenario that isn't likely to be repeated often, more RAM may not be required. If page outs occur regularly during normal activity, more RAM may be helpful. Tracking page ins or a ratio does not provide any useful information in making a determination whether more RAM is needed.
GGJstudios is offline   0 Reply With Quote
Old Jan 30, 2013, 03:21 PM   #24
dusk007
macrumors 68030
 
Join Date: Dec 2009
Quote:
There is nothing in a page in/page out ratio that will indicate how much more RAM will improve performance. Nothing.
That is supposed to mean approximately. It gives you an idea about whether there is an issue or not. Nothing? Seriously?
Quote:
Page outs indicate that at some point since the last restart there was not sufficient RAM to handle memory demands.
It may also only indicate that some thresholds have been reached where memory management though that some memory should be preemptively swapped so that there is enough space to page in stuff when needed. If you run for a long time and only with very low page outs that is probably the only kind that ever occurred.

Most of the things you claim really only happen if you have loads of page outs with a very high ratio because otherwise if you run long enough page ins will always be huge in comparison. Once you have a ratio that is higher than 10% this other stuff like serious page outs and the performance of the SSD to actually become a problem may happen.
Quote:
Tracking page ins or a ratio does not provide any useful information in making a determination whether more RAM is needed.
It gives you a useful information whether more RAM is NOT needed. Which is all most people on such forums really need to know, because they usually worry way too much. Once the answer is a maybe one can do all the in detail monitoring.
If you have a normal workload that requires more RAM, your ratio will be higher. The correlation will definitely be there.
__________________
15" MBP 2013 2.3/750M, 16GB/512GB
dusk007 is offline   0 Reply With Quote
Old Feb 2, 2013, 12:06 PM   #25
Folmanik
Thread Starter
macrumors newbie
 
Join Date: Aug 2007
thank you all for you're help!!

btw,
turns out the thing that made me page out so bad was quite ironically an app called "memory clean" which moved my unactive memory into free memory,
my roommate bought the exact same computer and i went to check what's his "page out" stats and he had none and the "memory clean" was the only app that he never installed that i did,
so i made a restart and never used the app and walla, 0 page outs after 2 days, to make sure i used it once 2 minutes ago and now i have 200 mega of page out..

again..you are great!!!
Folmanik is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Hardware > Notebooks > MacBook Pro

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
VPN + Utorrent leaking ring Mac Basics and Help 2 Jul 30, 2013 08:01 PM
Leaking 'Upload' network speed? -BigMac- MacBook Pro 2 Jan 13, 2013 02:37 AM
MapKit leaking Stefan51278 iPhone/iPad Programming 0 Dec 9, 2012 05:56 PM
iPad: Light leaking through middle of screen?? dmillar74 iPad 8 Nov 24, 2012 05:55 PM
iPhone 5 LCD backlight leaking FlunkedFlank iPhone 4 Oct 4, 2012 08:31 PM

Forum Jump

All times are GMT -5. The time now is 07:34 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC