Why does Panther need so much RAM to operate?

Dane D.

macrumors 6502a
Original poster
Apr 16, 2004
645
8
ohio
Why does Panther need so much RAM to operate? Checked the RAM usage with iTattle 1.6 and shows me that the OS is using about 170 MB of RAM. Whats up with that? Can I minimize OS usage (a la the extensions manager in OS 9)? If so, how? My machine is an eMac 1.25, purchased in Feb. 2005. I have one 256MB chip and another 512 MB chip ordered.
 

wordmunger

macrumors 603
Sep 3, 2003
5,124
2
North Carolina
I don't know why it seems to take so much memory on your system, but I have Panther running on two Cubes with 256 MB of ram and a clamshell iBook with 192 MB. Works fine. The clamshell can be a little slow at times, but it's a 233 MHz machine, so that's to be expected.
 
Comment

auxplage

macrumors 6502
Nov 11, 2004
331
1
Virginia Beach
Well as soon as I turn on my eMac if I go to Activity Monitor, 280mb is being used up. This is right after rebooting. OS X likes to use all available RAM for speed improvement. If your computer is on long enough with even 2GB, it will all be taken up it seems after due time.
 
Comment

tristan

macrumors 6502a
Jul 19, 2003
765
0
high-rise in beautiful bethesda
Good question. Right now I have Safari, Mail, and Word open, and when I go to activity monitor (in utilities) it says that I have 361 megs free of physical memory, of the 768 megs total that I have. So those three apps alone, plus the OS, are taking up 407 megs of memory. Ouch!

And that's just with one safari window open and a short word doc. If I open more stuff, it can get down to zero, and then it starts swapping and getting choppy. And that's with 768 megs of RAM, which is the most RAM I've ever had in a computer in my life - my last PC had 256.

Let's not even talk about virtual memory - supposedly my kernel and finder and dock alone are taking up 1 gig of virtual memory. I can't even imagine how.

What can I say - OSX is a RAM hog. Luckily RAM's still pretty cheap. Unfortunately, my TiBook can only handle 256 more megabytes (1 gig total) before it's maxed out.

If you want to know whether you have enough RAM in general, use Activity Monitor to check periodically how much you have free. Click on the System Memory section. You can set it to be an icon and hang out in the dock.
 
Comment

MisterMe

macrumors G4
Jul 17, 2002
10,650
29
USA
tristan said:
Good question. Right now I have Safari, Mail, and Word open, and when I go to activity monitor (in utilities) it says that I have 361 megs free of physical memory, of the 768 megs total that I have. So those three apps alone, plus the OS, are taking up 407 megs of memory. Ouch!

And that's just with one safari window open and a short word doc. If I open more stuff, it can get down to zero, and then it starts swapping and getting choppy. And that's with 768 megs of RAM, which is the most RAM I've ever had in a computer in my life - my last PC had 256.

Let's not even talk about virtual memory - supposedly my kernel and finder and dock alone are taking up 1 gig of virtual memory. I can't even imagine how.

What can I say - OSX is a RAM hog. Luckily RAM's still pretty cheap. Unfortunately, my TiBook can only handle 256 more megabytes (1 gig total) before it's maxed out.

If you want to know whether you have enough RAM in general, use Activity Monitor to check periodically how much you have free. Click on the System Memory section. You can set it to be an icon and hang out in the dock.
My, my, my. This issue has been explained many times before. MacOS X is not MacOS 9 and it is not Windows. It is designed to maximize the use of available RAM. Unused RAM is wasted RAM.
 
Comment

Logik

macrumors 6502a
Apr 24, 2004
616
0
MisterMe said:
My, my, my. This issue has been explained many times before. MacOS X is not MacOS 9 and it is not Windows. It is designed to maximize the use of available RAM. Unused RAM is wasted RAM.
bingo, OS X has a very aggressive cacheing system that maximizes the ram usage so that it makes your experience faster. the more ram you give it the more it'll use. Now if you see constant slow downs and disk swapping usage THAT is more to worry about, but i'm doubting you will get much of that with 512mb and doing basic email, word, etc. Face it 512 is minimum any new machine should have. However i ran my Powerbook with 256 for about 3 months and it worked beautifully despite the lack of ram, but i did notice that once i had xcode, firefox, itunes and a few other apps open i'd see swapping occassionally. However it wasn't THAT bad. I honestly only noticed the ability to run MORE apps with the upgrade to 768, no real speed difference, just the ability to use more apps at once. You have nothing to worry about in regards to ram, it's going to use what you give it. Windows only loads what it needs, but when it needs something you get a slow down, OS X loads what it thinks you MIGHT need and then when and if you do it's faster because it's already loaded.
 
Comment

daveL

macrumors 68020
Jun 18, 2003
2,425
0
Montana
MisterMe said:
My, my, my. This issue has been explained many times before. MacOS X is not MacOS 9 and it is not Windows. It is designed to maximize the use of available RAM. Unused RAM is wasted RAM.
Which is the same virtual memory behavior present in all modern Unix/Linux systems. Search the forums for a detailed explanation.
 
Comment

mattraehl

macrumors 6502
Feb 26, 2005
384
1
virtual memory

tristan said:
Let's not even talk about virtual memory - supposedly my kernel and finder and dock alone are taking up 1 gig of virtual memory. I can't even imagine how.
Activity Monitor is telling you how much virtual memory has been allocated to each application, not how much it is actually using. It's like saying 'You can address up to this much memory, if needed.' Obviously, if the application wants to use all of it, there won't be enough physical memory (RAM), and the hard drive will be used. Don't worry about virtual memory.
 
Comment

jim.

macrumors 6502
Dec 22, 2004
308
0
C-ville, VA
It amazes me how prevalent threads like this are on most any Unix-ish OS board. It is almost up there with the people who detect big "memory leaks" only using top and Activity Monitor.

I guess that some people just won't learn about how memory is used and released, and will just continue to complain...

Negativity aside, the caching in OSX is pretty darn good. It seems to have more visible (read: feels faster) results than in linux when the developers were switching memory management ad nauseum during the early 2.6 cycle.

Jim
 
Comment

tristan

macrumors 6502a
Jul 19, 2003
765
0
high-rise in beautiful bethesda
Don't "My,my,my" me. I am a unix guy and I know all about virtual memory management and all that. I was running Nextstep back in '93.

I also know that when my free memory gets close to zero, which it does when I open a lot of apps, my PB trashes like a mad, and will sometimes even hang for thirty seconds while it tries to get its act together (if the number of apps is truly monstrous). And I know that every time I open an app, that free memory number goes down, and gets a little closer to that zero mark (effectively about 10 or 11 megs).

If that smacks of negativity to you, then you're the memory pollyanna, my friend.
 
Comment

bankshot

macrumors 65816
Jan 23, 2003
1,259
74
Southern California
jim. said:
It amazes me how prevalent threads like this are on most any Unix-ish OS board. It is almost up there with the people who detect big "memory leaks" only using top and Activity Monitor.

I guess that some people just won't learn about how memory is used and released, and will just continue to complain...
You have a good point about not understanding how virtual memory works, and when it's actually in use vs. simply allocated. A tiny program can demonstrate this fallacy:

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

int main(){
  unsigned long size = 1024 * 1024 * 3;
  char *junk = (char *)malloc(size*1024);
  sleep(10);
  return 0;
}
Copy this into a file called mem.c, compile it with the command make mem and run it (./mem &), then switch to Activity Monitor. You'll see that it's supposedly using 2 gigs of virtual memory. You can run any number of instances of the program simultaneously and you'll never run out of memory, virtual or real.

I ran 30 instances of the program simultaneously with no ill effects on my system. The Unix command top (Activity Monitor for the command line) reported:

Code:
MemRegions: num = 13078, resident =  194M + 13.0M private,  117M shared
PhysMem:  94.1M wired,  137M active,  307M inactive,  539M used,  100M free
VM: 67.6G +    0B   2118533(0) pageins, 2614924(0) pageouts

  PID COMMAND      %CPU   TIME   #TH #PRTS #MREGS RPRVT  RSHRD  RSIZE  VSIZE
15178 top          0.0%  0:00.29   1    16    24   372K   488K   748K  27.1M
15175 mem          0.0%  0:00.01   1    11    21    80K   396K   356K  2.03G
15174 mem          0.0%  0:00.01   1    11    21    80K   396K   356K  2.03G
15173 mem          0.0%  0:00.01   1    11    21    80K   396K   356K  2.03G
15172 mem          0.0%  0:00.01   1    11    21    80K   396K   356K  2.03G
.... and so on


HOWEVER, all of that said, let me get to my point. :D

Seems like an alarming number of people here like to dismiss any claims that OS X may not be operating at peak efficiency. It's easy to tell other people that they don't understand how it works, so they're obviously wrong. Sometimes that's the case, but I feel like many here aren't even willing to entertain the possibility that the person has a legitimate complaint.

Personally, I'm getting sick of OS X's poor memory handling. I have 640 MB of memory in my machine (which should be more than enough, according to the many who say that 256 MB or less "runs just fine") and it is slow as heck. I keep Safari, Terminal, and iTunes open always, with a smattering of other applications open at any given time.

As far as I can tell, Safari is the biggest culprit. After browsing for a few days, I have 5 windows open and a total of 11 tabs among them. Safari's virtual memory is just over 1,000 MB. I understand that this doesn't necessarily mean it's using all of that, but the performance I get suggests that it comes close. I just closed a window with 2 tabs and it took over 2 minutes for Safari to become responsive again. During this time, the disk was thrashing incredibly. Safari sits around 73 MB of real memory used, rarely changing, but according to the number of Page-ins/outs during that operation, it's paged in about 40-50 MB and out about 20 MB. Why hasn't OS X paged out other applications that I haven't used in hours or days but are still open, to give Safari more real memory? And I find Safari's memory hogging to be rather ironic, given that it started life as a "fast and light" alternative.

By way of comparison, my SGI at work runs Mozilla 1.4. I have 8 windows open and 67 tabs among them. Total memory usage of Mozilla? 48 MB. Even if you argue that graphics memory is offloaded to the window server, that's only using 71 MB, and I have a lot more going on than Mozilla on that machine.

I finally broke down and ordered a pair of 512 MB sticks yesterday to max out my home machine with 1.5 GB. I can't take it anymore. When switching users from my wife's account to mine, the whole screen often doesn't update for 20-30 seconds as the disk thrashes me back into memory. Maybe I'm a power user, but I don't think that what I do on a daily basis should suck up so much memory and cause so much disk thrashing. I spend most of my time in Terminal, with Safari for surfing and iTunes for music/iPod stuff. I'm not running huge simulations on this machine or crunching lots of data. I don't do development on it because my FreeBSD PC is so much faster at compiling. What gives??
 
Comment

jim.

macrumors 6502
Dec 22, 2004
308
0
C-ville, VA
bankshot said:
Seems like an alarming number of people here like to dismiss any claims that OS X may not be operating at peak efficiency. It's easy to tell other people that they don't understand how it works, so they're obviously wrong. Sometimes that's the case, but I feel like many here aren't even willing to entertain the possibility that the person has a legitimate complaint.
You are right. I immediately went into "rehash" mode, especially since the post in question gave me no reason to see otherwise.

It is true that OSX's mem handling can be optimized more, but that is a given for any OS. One of the things that make it different (from a BSD box, Windows box, or your SGI) is the storage of all windows as textures. If it doesn't all go into video RAM, then I would assume it would have to go into system RAM (right?). That can be a lot of data, depending on what it saves and whether it is compressed. I don't know about the paging model, but there have been some mentions here and there that a previous version (10.3.5, maybe?) may have changed OSX's LRU algorithm, which affects how programs are paged into/out of virtual memory. This could be the cause of your complaint. I run 10.3.8 with 1.25G mem, and I don't notice any thrashing. I typically have 8 programs consistently running plus whatever else I may need at the time. Others with better machines don't seem to be as "lucky" as I am.

If there really was a change in the LRU algorithm (nothing is documented about a change in memory management), and it is causing problems like this, then I hope Apple is re-evaluating it for Tiger or some future update.

Jim
 
Comment

MisterMe

macrumors G4
Jul 17, 2002
10,650
29
USA
tristan said:
Don't "My,my,my" me. I am a unix guy and I know all about virtual memory management and all that. I was running Nextstep back in '93.

I also know that when my free memory gets close to zero, which it does when I open a lot of apps, my PB trashes like a mad, and will sometimes even hang for thirty seconds while it tries to get its act together (if the number of apps is truly monstrous). And I know that every time I open an app, that free memory number goes down, and gets a little closer to that zero mark (effectively about 10 or 11 megs).

If that smacks of negativity to you, then you're the memory pollyanna, my friend.
It just amazes me how smart some people get when they are in trouble.
 
Comment

daveL

macrumors 68020
Jun 18, 2003
2,425
0
Montana
Some of this could be related to how you use your machine. At the end of the day, a lot of these memory threads seem to point to specific applications, e.g. Safari. I happen to close Safari ever day or two, so I may very well not see some the issues others have who leave multiple Safari windows open with multiple tabs all the time. Just a thought.
 
Comment

bankshot

macrumors 65816
Jan 23, 2003
1,259
74
Southern California
jim. said:
I don't know about the paging model, but there have been some mentions here and there that a previous version (10.3.5, maybe?) may have changed OSX's LRU algorithm, which affects how programs are paged into/out of virtual memory. This could be the cause of your complaint.
Hmm, that's very interesting. I'd almost be tempted to back up to 10.3.4 or whatever and see if there's a real difference in performance, but my memory is arriving on Thursday. :D Even so, it still might be worthwhile as the iBook is maxed out at 640, so that one wouldn't get any better from hardware upgrades.

I can say that I haven't had nearly this much trouble with constant swapping until fairly recently. I've been using the same machine with 640 MB of memory for 3 years now, every OS X version since 10.1.2. It's never been as bad as it has in recent months, and I don't think my usage patterns have changed significantly in all that time. This certainly suggests that the algorithm change could be a possibility. I kinda just figured it was Safari naturally bloating over time as Apple added features.
 
Comment

daveL

macrumors 68020
Jun 18, 2003
2,425
0
Montana
bankshot said:
Hmm, that's very interesting. I'd almost be tempted to back up to 10.3.4 or whatever and see if there's a real difference in performance, but my memory is arriving on Thursday. :D Even so, it still might be worthwhile as the iBook is maxed out at 640, so that one wouldn't get any better from hardware upgrades.

I can say that I haven't had nearly this much trouble with constant swapping until fairly recently. I've been using the same machine with 640 MB of memory for 3 years now, every OS X version since 10.1.2. It's never been as bad as it has in recent months, and I don't think my usage patterns have changed significantly in all that time. This certainly suggests that the algorithm change could be a possibility. I kinda just figured it was Safari naturally bloating over time as Apple added features.
If you are wiling to go back to 10.3.4, you might as well wait and try the Tiger release.
 
Comment

bankshot

macrumors 65816
Jan 23, 2003
1,259
74
Southern California
daveL said:
If you are wiling to go back to 10.3.4, you might as well wait and try the Tiger release.
Yeah, definitely looking forward to Tiger and hoping it improves in this regard. Perhaps simply the fact that they'll likely have worked on the VM subsystem will be enough to avoid this particular problem.

I still predict a July 2nd 12:00pm release of Tiger, so a couple months to experiment with Panther revisions won't be so bad... :p
 
Comment

andrewm

macrumors regular
Apr 2, 2004
132
3
Los Angeles, CA
bankshot said:
As far as I can tell, Safari is the biggest culprit. After browsing for a few days, I have 5 windows open and a total of 11 tabs among them. Safari's virtual memory is just over 1,000 MB. I understand that this doesn't necessarily mean it's using all of that, but the performance I get suggests that it comes close. I just closed a window with 2 tabs and it took over 2 minutes for Safari to become responsive again. During this time, the disk was thrashing incredibly. Safari sits around 73 MB of real memory used, rarely changing, but according to the number of Page-ins/outs during that operation, it's paged in about 40-50 MB and out about 20 MB. Why hasn't OS X paged out other applications that I haven't used in hours or days but are still open, to give Safari more real memory? And I find Safari's memory hogging to be rather ironic, given that it started life as a "fast and light" alternative.
Not to burst your bubble, but I have made daily use of both a G5 dual-processor with 2 Gb of RAM, and a G4 iBook with 1.25 Gb of RAM; after keeping Safari open for awhile it begins to slog, especially, I notice, after opening and closing a great many tabs.

Sounds like a leak with either the tab handling or WebCore, but not with the system.

Edit: I should like to add my voice to those who hope that Tiger's Safari will fix up some of these slow-downs.
 
Comment

daveL

macrumors 68020
Jun 18, 2003
2,425
0
Montana
bankshot said:
Yeah, definitely looking forward to Tiger and hoping it improves in this regard. Perhaps simply the fact that they'll likely have worked on the VM subsystem will be enough to avoid this particular problem.

I still predict a July 2nd 12:00pm release of Tiger, so a couple months to experiment with Panther revisions won't be so bad... :p
Tiger is a major upgrade of the FreeBSD/Mach kernel, so things will be changing. Whether they solve your particular complaints, who knows? BTW, the way things are going, you don't have a couple of months to wait for Tiger, regardless of whether the rumors are true. There's no way Tiger is 3 months away from release; that's a long time, given it's current state.
 
Comment

daveL

macrumors 68020
Jun 18, 2003
2,425
0
Montana
andrewm said:
Not to burst your bubble, but I have made daily use of both a G5 dual-processor with 2 Gb of RAM, and a G4 iBook with 1.25 Gb of RAM; after keeping Safari open for awhile it begins to slog, especially, I notice, after opening and closing a great many tabs.

Sounds like a leak with either the tab handling or WebCore, but not with the system.

Edit: I should like to add my voice to those who hope that Tiger's Safari will fix up some of these slow-downs.
Sounds like a vote for post #14. Of course, nobody reads the thread, so ...
 
Comment

Dane D.

macrumors 6502a
Original poster
Apr 16, 2004
645
8
ohio
Interesting replies, my bitch is that using Panther there seems to be alot of waiting. Waiting for the app to do the command entered or a new page to load. Once the process is started though, it is fast. It is something that the previous OS's didn't have. My machines have always had at least 320MB RAM, most are set at 640MB RAM. I run a small network of ten Macs at work, all are OS 9.2.2, none have virtual memory turned on. When on the eMac at home this OS 10.3.8 system lag drives me nuts. Just wanted people to know, sometimes progress really is not progress.
 
Comment

daveL

macrumors 68020
Jun 18, 2003
2,425
0
Montana
Dane D. said:
Interesting replies, my bitch is that using Panther there seems to be alot of waiting. Waiting for the app to do the command entered or a new page to load. Once the process is started though, it is fast. It is something that the previous OS's didn't have. My machines have always had at least 320MB RAM, most are set at 640MB RAM. I run a small network of ten Macs at work, all are OS 9.2.2, none have virtual memory turned on. When on the eMac at home this OS 10.3.8 system lag drives me nuts. Just wanted people to know, sometimes progress really is not progress.
BTW, what are your energy saver settings? It sounds to me as though you may be letting the disk spin down or have the processor on automatic. Just a thought; I never let my disk sleep. I fold 24x7, so I don't let anything but the screen nap.
 
Comment

Dane D.

macrumors 6502a
Original poster
Apr 16, 2004
645
8
ohio
What do you mean "It sounds to me as though you may be letting the disk spin down or have the processor on automatic."? I have it set to screensaver after 30min and sleep after that. Is there any settings in System Prefs, that can be turned off or minimized to speed things up?
 
Comment

daveL

macrumors 68020
Jun 18, 2003
2,425
0
Montana
Dane D. said:
What do you mean "It sounds to me as though you may be letting the disk spin down or have the processor on automatic."? I have it set to screensaver after 30min and sleep after that. Is there any settings in System Prefs, that can be turned off or minimized to speed things up?
System Preferences->Energy Saver: Sleep

- make sure the "Put the hard disk(s) to sleep when possible" check box is *not* checked.

System Preferences->Energy Saver: Options

- set Processor Performance: Highest (instead of Automatic).

HTH
 
Comment

tristan

macrumors 6502a
Jul 19, 2003
765
0
high-rise in beautiful bethesda
Well, honestly, ever since I went to 768 megs, I've been pretty happy with the performance. Right now I have Word, Safari, Calculator, Terminal, Mail, Limewire, and Software Update open, and it's does swap sometimes when I change apps, but only for about half a second, which is okay, and not all the time either. Back when I had 512 megs, it swapped a lot more under this kind of load, and was barely acceptable (at least for me).
 
Comment
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.