 |
 |
What's the deal with RAM REALLY?
|
 |
|
 |
|
Dedicated MacNNer
Join Date: May 2002
Location: Brooklyn, NY
Status:
Offline
|
|
Okay, I need to know what is really going on with RAM in OS X. I have 1 GB of RAM in my 800 DVI, and still almost always when I run "top" in the terminal, it says that the computer is paging in and out, and that I have around 11 MB of RAM free. Even if I quit every program but the terminal and the finder, I get up to around 120 MB, and then just leaving the computer running, doing nothing, it eventually goes down to 11 or so again. I've been told so many different things. Like, "Oh, when you quit a program, it gives the RAM back, but it won't show up in TOP." Is that true?
I would believe that except for all the paging which is an obvious sign that my computer does NOT think it has free RAM. Do I have a program with a massive memory leak that I don't know about? Any advice for a RAM lost traveller?!
Thanks,
gabe
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Dec 2002
Location: Partying down with the Ewoks, after I nuked the Death Star!
Status:
Offline
|
|
Are you sure you know how to read the information in the terminal. Paste what it says in here.
|

"Hello, what have we here?
|
| |
|
|
|
 |
|
 |
|
Registered User
Join Date: Mar 2002
Location: Europe
Status:
Offline
|
|
OSX doesn't free up RAM as it supposed to (10.1 did, but 10.2 doens't). And don't tell me it's used as caching and freed up when necessary, that's bullshit (when I open the same apps that were opened before ,they take EXTRA memory. When I open up a few apps it STILL pages out. (even when I have theoretically 700+ MB of free RAM). IMO memory management needs a revamp in the coming OSX version.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: May 2002
Location: Brooklyn, NY
Status:
Offline
|
|
Originally posted by Landos Mustache:
Are you sure you know how to read the information in the terminal. Paste what it says in here.
Hi,
Thanks for you reply. I just restarted and removed MYSql and my Wacom Tablet driver from the startup items folder. When it was bad, I was reading two things. The PhysMem line. It's the 5th one down. At the end where it says (At the moment) 278 M used, 746 M free. Soon enough it will read 1010 M used, 14 M free.
I'll post it as soon as it happens.
gabe
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: May 2002
Location: Brooklyn, NY
Status:
Offline
|
|
Okay, About 6 hours later, here's what I have:
[CODE]
Processes: 58 total, 2 running, 56 sleeping... 196 threads 23:54:24
Load Avg: 0.84, 0.58, 0.41 CPU usage: 4.3% user, 34.8% sys, 60.9% idle
SharedLibs: num = 124, resident = 28.8M code, 2.08M data, 9.41M LinkEdit
MemRegions: num = 5671, resident = 105M + 11.5M private, 141M shared
PhysMem: 71.7M wired, 356M active, 578M inactive, 1006M used, 18.5M free
VM: 2.69G + 68.9M 12243(0) pageins, 5868(0) pageouts
PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
993 top 10.3% 0:01.74 1 14 18 356K 336K 652K 13.6M
986 tcsh 0.0% 0:00.02 1 10 15 344K 672K 808K 5.73M
985 login 0.0% 0:00.40 1 12 33 244K 388K 576K 13.7M
950 mount_webd 0.0% 0:00.08 7 36 31 312K 712K 444K 17.0M
943 Direct Con 0.0% 1:19.38 3 85 216 11.3M 13.1M 20.4M 95.5M
925 httpd 0.0% 0:00.02 1 8 78 160K 1.47M 636K 15.1M
798 Sherlock 0.0% 0:06.97 11 123 178 4.66M 6.72M 8.22M 85.9M
547 httpd 0.0% 0:00.03 1 8 78 180K 1.47M 708K 15.1M
514 Safari 0.0% 1:13.13 6 231 489 22.9M 28.5M 30.2M 156M
499 Terminal 0.0% 0:18.13 4 71 173 1.41M- 9.66M 7.11M- 80.5M-
461 TeXShop 0.0% 1:19.64 3 96 142 3.34M 8.19M 5.27M 85.0M
457 iTunes 0.0% 9:33.49 8 152 352 9.45M 13.9M 16.6M 104M
450 Mail 0.0% 0:55.60 4 114 161 4.40M 9.45M 8.48M 81.8M
447 AppleSpell 0.0% 0:01.62 1 30 22 456K 1.23M 1.36M 15.0M
445 Adium 0.0% 4:03.59 9 159 293 6.63M 40.9M 14.2M 140M
427 UniversalA 0.0% 0:25.18 2 57 78 760K 5.22M 2.09M 74.1M
426 PTHiTunesN 0.8% 0:40.62 2 65 145 1.93M 8.25M 5.83M 79.7M
425 DMRMapperA 0.0% 0:03.92 6 505 70 1.21M 1.29M 2.21M 51.2M
423 Finder 0.0% 0:52.31 4 95 189 4.04M 27.4M 15.1M 105M
422 SystemUISe 0.0% 0:10.94 2 152 151 1.55M 6.20M 4.19M 76.8M
421 aped 0.0% 0:00.26 1 30 22 208K 692K 808K 14.0M
420 Dock 0.0% 0:23.71 3 122 141 1.23M 18.0M 14.0M 88.4M
414 pbs 0.0% 0:03.88 2 27 30 1.24M 932K 1.98M 15.1M
411 httpd 0.0% 0:00.07 1 8 82 200K 1.46M 784K 16.1M
407 httpd 0.0% 0:01.02 1 18 77 24K 1.47M 1.26M 15.1M
404 TabletDriv 0.0% 0:36.96 2 130 63 276K 4.82M 2.00M 70.6M
403 DirectoryS 0.0% 0:00.99 3 56 140 788K 3.02M 3.21M 21.0M
390 perl 0.0% 0:00.36 1 8 35 2.18M 448K 484K 3.68M
365 loginwindo 0.0% 0:12.88 5 179 196 2.69M 17.0M 15.2M 79.8M
360 cron 0.0% 0:00.17 1 8 18 76K 332K 140K 13.8M
358 xinetd 0.0% 0:00.00 1 10 15 60K 444K 260K 1.45M
356 inetd 0.0% 0:00.01 1 8 14 44K 312K 112K 1.28M
354 cupsd 0.0% 0:01.79 1 8 18 144K 476K 400K 2.94M
344 automount 0.0% 0:00.02 2 22 22 132K 416K 544K 14.7M
335 nfsiod 0.0% 0:00.00 1 8 13 8K 312K 80K 1.27M
334 nfsiod 0.0% 0:00.01 1 8 13 8K 312K 80K 1.27M
333 nfsiod 0.0% 0:00.00 1 8 13 8K 312K 80K 1.27M
332 nfsiod 0.0% 0:00.00 1 8 13 8K 312K 80K 1.27M
326 sshd 0.0% 0:00.28 1 8 17 112K 568K 244K 1.83M
324 coreservic 0.0% 0:01.77 3 91 104 1.49M 19.5M 20.8M 38.0M
320 ntpd 0.8% 0:02.39 1 8 16 104K 476K 284K 1.52M
292 lookupd 0.0% 0:01.68 2 31 46 556K 500K 1012K 15.1M
287 netinfod 0.0% 0:00.92 1 7 27 372K 424K 540K 1.91M
267 mDNSRespon 0.0% 0:00.16 2 33 21 536K 352K 824K 14.1M
264 crashrepor 0.0% 0:00.00 1 16 15 52K 304K 152K 13.3M
253 syslogd 0.0% 0:00.19 1 7 14 80K 316K 164K 1.28M
180 autodiskmo 0.0% 0:00.24 32 55 92 352K 740K 576K 32.3M
176 Window Man 3.4% 6:55.39 3 347 971 23.5M+ 85.7M- 96.6M+ 225M+
172 ATSServer 0.8% 2:01.87 2 60 232 2.73M 5.51M 5.42M 44.6M
156 SecuritySe 0.0% 0:00.27 1 39 23 272K 952K 872K 14.9M
136 TabletDriv 0.0% 0:00.00 2 33 18 68K 304K 128K 14.0M
111 configd 0.0% 0:22.73 3 120 160 968K 1.21M 1.79M 16.4M
80 dynamic_pa 0.0% 0:00.00 1 10 15 64K 304K 108K 1.29M
76 update 0.0% 0:05.27 1 7 13 48K 300K 104K 1.26M
51 kextd 0.0% 0:02.85 2 18 23 632K 660K 792K 15.5M
2 mach_init 0.0% 0:00.15 2 192 15 92K 328K 192K 1.80M
1 init 0.0% 0:00.00 1 9 12 68K 312K 276K 1.28M
0 kernel_tas 23.3% 5:29.12 28 0 - - - 61.4M 627M
0 idle_threa 61.5% 6:07:43
[\CODE]
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Apr 2001
Location: Long Beach, CA
Status:
Offline
|
|
you have a LOT of apps running. Note that 6k pageouts is only 24MB. That's since you've booted. That's not exactly a big deal. On the other hand, I've had 7k pageouts in 7 days on 640MB of RAM.
Your memory hogs:
Direct Connect
Sherlock
Safari
Terminal
TeXShop
iTunes
Mail
Adium
PTHiTunes...
various other things that you shouldn't kill...
Window Manager
kernel
etc...
my window manager is only pulling a third of the memory that yours is. You must have quite a few windows open (I have a lot open).
Everything you do at once all adds up. If it's actively running, it's actively using memory.
|

ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Dec 2001
Location: Promised Land
Status:
Offline
|
|
Originally posted by Zimwy:
Okay, About 6 hours later, here's what I have:
Code:
Processes: 58 total, 2 running, 56 sleeping... 196 threads 23:54:24
Load Avg: 0.84, 0.58, 0.41 CPU usage: 4.3% user, 34.8% sys, 60.9% idle
SharedLibs: num = 124, resident = 28.8M code, 2.08M data, 9.41M LinkEdit
MemRegions: num = 5671, resident = 105M + 11.5M private, 141M shared
PhysMem: 71.7M wired, 356M active, 578M inactive, 1006M used, 18.5M free
VM: 2.69G + 68.9M 12243(0) pageins, 5868(0) pageouts
I don't see what your problem is. Everything looks fine to me. You have 356M committed to actual use, and then 578M that is used for caching. Then you have 18.5M actually free. All of this is normal. If your machine needs more memory for an app, it will come from the cache.
Paging is normal, the OS will page out when it needs to. You only need to worry about paging if the number in the parentheses is continually a non-zero value.
Here is my machine after 49 days of uptime.
Code:
Processes: 56 total, 2 running, 54 sleeping... 134 threads 12:15:46
Load Avg: 0.31, 0.21, 0.23 CPU usage: 15.0% user, 35.0% sys, 50.0% idle
SharedLibs: num = 146, resident = 35.9M code, 3.10M data, 10.9M LinkEdit
MemRegions: num = 7349, resident = 156M + 11.8M private, 387M shared
PhysMem: 122M wired, 648M active, 723M inactive, 1.46G used, 42.0M free
VM: 3.91G + 89.9M 210104(0) pageins, 102915(0) pageouts
I have more memory than you, but otherwise it looks pretty much the same.
|
|
G5 2.5 DP/2GB RAM/NVidia 6800 Ultra
PowerBook Al 1Ghz/768MB RAM
6gb Blue iPod Mini
|
| |
|
|
|
 |
|
 |
|
Registered User
Join Date: Mar 2002
Location: Europe
Status:
Offline
|
|
What the hell is caching supposed to do ?
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2002
Location: Winnipeg
Status:
Offline
|
|
cacheing creates space for regularly used data so that it's on hand instead of constantly grabbing it from your HD which is slower.
Uhh question for people who do know about OS X's RAM ussage well...
IF I have 640 megs of RAM in a 12 inch power book that I'm planning on buying... will I honestly be often taxing that out and sending OS X back to the hard drive for more data?
I mean I heard people complaining about the 640 meg limit but I thought they were just nuts... is this honestly gona cause me problems? All I'm planning on ever doing is Fireworks and Dreamweaver MX, Flash, some FreeHand, iTunes, perhaps iMovie and iDVD now and then...
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Mar 2000
Location: New York, NY, USA
Status:
Offline
|
|
Originally posted by Superchic[k]en:
cacheing creates space for regularly used data so that it's on hand instead of constantly grabbing it from your HD which is slower.
Uhh question for people who do know about OS X's RAM ussage well...
IF I have 640 megs of RAM in a 12 inch power book that I'm planning on buying... will I honestly be often taxing that out and sending OS X back to the hard drive for more data?
I mean I heard people complaining about the 640 meg limit but I thought they were just nuts... is this honestly gona cause me problems? All I'm planning on ever doing is Fireworks and Dreamweaver MX, Flash, some FreeHand, iTunes, perhaps iMovie and iDVD now and then...
It depends on your application load, and if the apps are memory hogs. Assuming that none of those programs have memory leaks or are known as memory hogs (and I don't know, so I'm guessing) you should be okay with 640 megs.
With 1 Gig I often have two browsers, mail, Sherlock, iTunes, a firewall, terminal, console, System Prefs and some other small apps running before I launch Photoshop or Classic and other stuff and I'm fine.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Mar 2000
Location: New York, NY, USA
Status:
Offline
|
|
For sake of comparison, this is me after seven days uptime:
Code:
Processes: 58 total, 3 running, 55 sleeping... 221 threads 16:19:30
Load Avg: 0.86, 0.65, 0.50 CPU usage: 58.2% user, 10.9% sys, 30.9% idle
SharedLibs: num = 7, resident = 2.12M code, 304K data, 516K LinkEdit
MemRegions: num = 6155, resident = 164M + 15.9M private, 127M shared
PhysMem: 79.8M wired, 275M active, 377M inactive, 731M used, 293M free
VM: 2.68G + 3.62M 23196(0) pageins, 1164(0) pageouts
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Apr 2001
Status:
Offline
|
|
I mean I heard people complaining about the 640 meg limit but I thought they were just nuts... is this honestly gona cause me problems? All I'm planning on ever doing is Fireworks and Dreamweaver MX, Flash, some FreeHand, iTunes, perhaps iMovie and iDVD now and then...
640 Megs is plenty to run OS X in.
Wade
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: May 2002
Location: Brooklyn, NY
Status:
Offline
|
|
Hey guys,
Wow, thanks for all the replies. Yeah, I know it's not that odd, but I had no windows open in any of the programs, and the computer had been on for about 3 hours. At most. Then, if I quit EVERYTHING, nothing changes. Should I really be watching the Inactive part of the TOP readout?
gabe
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Aug 2001
Status:
Offline
|
|
Dual 867, 512MBs of ram:
Code:
Processes: 48 total, 2 running, 46 sleeping... 129 threads 16:30:34
Load Avg: 0.48, 0.20, 0.04 CPU usage: 19.4% user, 8.3% sys, 72.4% idle
SharedLibs: num = 118, resident = 30.5M code, 2.88M data, 8.50M LinkEdit
MemRegions: num = 3931, resident = 66.4M + 9.59M private, 70.3M shared
PhysMem: 50.0M wired, 106M active, 122M inactive, 278M used, 234M free
VM: 1.84G + 68.1M 17856(0) pageins, 1585(0) pageouts
PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
999 top 8.2% 0:01.96 1 14 17 200K 380K 492K 13.6M
998 tcsh 0.0% 0:00.04 1 10 20 344K 644K 780K 5.73M
997 login 0.0% 0:00.35 1 12 33 244K 432K 564K 13.7M
996 Terminal 44.0% 0:02.57 4 63 127 1.71M+ 8.14M 6.45M+ 71.6M+
995 iChat 0.0% 0:01.19 2 83 123 1.66M 6.24M 4.34M 67.9M
994 Mail 0.0% 0:03.61 4 101 147 3.70M 10.1M 10.1M 74.9M
991 Safari 0.0% 2:10.15 7 237 704 41.2M 22.7M 61.0M 160M
974 slpd 0.0% 0:00.25 8 35 31 184K 556K 592K 17.8M
971 lookupd 0.0% 0:00.51 2 32 53 404K 564K 936K 14.9M
726 Finder 0.0% 0:15.14 4 89 188 3.08M 27.1M 12.3M 99.7M
704 cupsd 0.0% 0:16.37 1 8 30 1.21M 804K 1.51M 3.96M
613 SecurityAg 0.0% 0:01.29 3 79 109 1.35M 7.52M 4.18M 69.1M
431 AppleSpell 0.0% 0:00.18 1 16 26 456K 1.08M 1.23M 15.0M
415 iChatAgent 0.0% 0:01.22 4 60 35 596K 1.74M 2.09M 49.3M
414 UniversalA 0.9% 1:25.81 2 56 78 728K 5.59M 2.09M 66.1M
Up one day (almost exactly). I get a bunch of pageouts running warcraft III, but not too many otherwise.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jul 2001
Location: New York, NY
Status:
Offline
|
|
What you're not understanding and what the others are trying to convey is that you shouldn't be so concerned with the numbers in top.
Bottom line? Your memory is being used well, stop worrying about it.
|
|
cpac
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Nov 2000
Location: Seattle, WA, USA
Status:
Offline
|
|
Both of my OS X box usually gobble up all the RAM except the last 20 MB or so after a day or two. I'm pretty sure this is normal and good. If you have 1GB of RAM, shouldn't the computer use it all? OS X is smart enough to know when another app needs more RAM and allocate it properly. Otherwise the OS uses the extra RAM for caching. This can be obviously seen by opening an app, then quitting it and restarting it again. It will launch much faster the second time because the information was cached in RAM. If you open up enough apps to fill your available RAM the cache is flushed making room for the running apps.
I don't have technical knowledge of this, but I'm pretty sure that is how it is supposed to work.
-matt
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Apr 2001
Location: Capital city of the Empire State.
Status:
Offline
|
|
What's with this magic figure of 640 MB? I have 768 MB in my G3 iMac, and I get page-outs pretty regularly.
Of course I also run a ton of stuff all at the same time. 
Processes: 79 total, 4 running, 75 sleeping... 248 threads 20:24:38
Load Avg: 1.93, 1.41, 1.22 CPU usage: 63.0% user, 33.2% sys, 3.8% idle
SharedLibs: num = 119, resident = 27.9M code, 2.49M data, 8.97M LinkEdit
MemRegions: num = 20218, resident = 296M + 30.0M private, 128M shared
PhysMem: 82.9M wired, 385M active, 182M inactive, 650M used, 118M free
VM: 3.99G + 70.7M 39319(0) pageins, 6375(0) pageouts
|
|
/mal
"I sentence you to be hanged by the neck until you cheer up."
MacBook Pro 15"/2.4 GHz Intel Core 2 Duo/4 GB DDR2 SDRAM/200 GB Hitachi HD/8x SuperDrive/Mac OS X 10.6.1
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2002
Location: Winnipeg
Status:
Offline
|
|
640 = 128 on mother board and another 512 in the user acessable RAM slot.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jul 1999
Location: Maynard, MA
Status:
Offline
|
|
cpac is right on the money. I think too many people are looking at this the way they looked at windows memory management or OS9 memory management. UNIX memory management is quite different...and better, IMHO.
|

"An argument isn't just saying 'No it isn't'!" "Yes it is!" "NO IT ISN'T!"
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: May 2002
Location: Brooklyn, NY
Status:
Offline
|
|
Oh. Nobody ever told me not to look at it the same way as OS 9 memory management.  I'm just supposed to TRUST it? eesh, scary.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Dec 2001
Location: Promised Land
Status:
Offline
|
|
Originally posted by Zimwy:
Oh. Nobody ever told me not to look at it the same way as OS 9 memory management. I'm just supposed to TRUST it? eesh, scary.
No, you don't have to "just trust it". Darwin (including the kernel) is open source. Read the code. There is also plenty of documentation on Mach and BSD available on the Internet. There are also books on the BSD kernel (McKusick's is the best). So if you don't want to "just trust it" do some research. The details of Mach/BSD kernel mem. mngmt can't be covered in this forum.
The information is out there, but you can't expect people to find and interpret it for you.
If you don't want to trust what (multiple) others have said, then find out for yourself.
I'm not trying to be an a**hole; I'm just trying to point out that this forum is not an appropriate place for a kernel memory mngmt dissertation.
|
|
G5 2.5 DP/2GB RAM/NVidia 6800 Ultra
PowerBook Al 1Ghz/768MB RAM
6gb Blue iPod Mini
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Sep 2002
Status:
Offline
|
|
My ibook 600, 12.1, 640 megs ram
Processes: 42 total, 3 running, 39 sleeping... 109 threads 16:12:55
Load Avg: 0.71, 0.36, 0.23 CPU usage: 80.0% user, 20.0% sys, 0.0% idle
SharedLibs: num = 96, resident = 23.3M code, 2.70M data, 7.86M LinkEdit
MemRegions: num = 3246, resident = 45.1M + 7.57M private, 69.8M shared
PhysMem: 56.9M wired, 87.3M active, 143M inactive, 287M used, 353M free
VM: 1.46G + 62.4M 8732(0) pageins, 0(0) pageouts
Seem decent to me, no pageouts etc., of course i haven't done much but surf and read mail, ichat etc. since my last restart.
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Nov 1999
Location: Cape Cod, MA
Status:
Offline
|
|
If you feel you need more RAM just buy as much as can fit in your machine, its so insanely cheap and really does make a difference.
I have a gig and the cost was cheaper than the price of putting gas in my truck for a month.
Tip of the year: BUY RAM!!!
(Last edited by sek929; Feb 24, 2003 at 06:43 AM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Mar 2001
Location: Salamanca, EspaƱa
Status:
Offline
|
|
Originally posted by someone_else:
I'm not trying to be an a**hole; I'm just trying to point out that this forum is not an appropriate place for a kernel memory mngmt dissertation.
Sure it is.
|
|
I could take Sean Connery in a fight... I could definitely take him.
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Apr 2002
Location: Illinois
Status:
Offline
|
|
80036 pageouts in 7 days, damn this app just made me feel good about getting this eMac. (My old iMac regularly did that many pageouts in a day)
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|