Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Application memory use in OS X

Application memory use in OS X
Thread Tools
Senior User
Join Date: Nov 1999
Location: Milkyway Galaxy
Status: Offline
Reply With Quote
Oct 20, 2001, 06:18 PM
 
Hello,
I would like to find out how exactly to tell how much memory different applications/process use?

In ProcessViewer, for example, it shows the percentage of memory each process uses. Then it also shows the resident memory size and virtual memory size a process takes up. When i manually multiply the percentage by the amount of real physical RAM i have, i get a number close to the resident memory size. So is resident memory size the amount of real hardware memory the process takes up?

Also, in top, are those last two column (RSIZE and VSIZE) for resident memory and virtual memory, respectively?

Lastly, how do i related memory use to how it was shown in teh About Box in OS 9? Is it resident memory size ? virtual memory size ? or something else?
Death To Extremists!
     
Mac Enthusiast
Join Date: Oct 2000
Status: Offline
Reply With Quote
Oct 21, 2001, 04:51 AM
 
I use the command-line 'top' to get that info...

So is resident memory size the amount of real hardware memory the process takes up?
Yep.

RSHRD (or something like this) is Resident shared Memory, physical memory used for shared libraries. If this wasn't, the OS would waste much more memory because many many duplicates would have to be stored separately which isn't necessary.

Wired memory is used by the kernel and cannot be paged out, because it wouldn't make sense to page out the pager

Inactive memory is not used and can be paged out without having to be rewritten to the disk (but I'm not so sure about that)

Active memory is the working part.

Try 'Memory Monitor', a nice dock utility just like 'CPU monitor'!
     
Senior User
Join Date: Nov 1999
Location: Milkyway Galaxy
Status: Offline
Reply With Quote
Oct 21, 2001, 01:18 PM
 
I want to determine if i need more memory or not. Right now, i have 384 (128 + 256). After keeping my compuer on for hours, top reports the amount of free memory is about 4.xx MB. Does this mean OS X needs more RAM?

Also, to find out total (Mac OS 9 About Box) of how much RAM a process takes up, do I or do I not add RSZIE and RSHRD? Or is RSHRD included in RSIZE?

And should i care when some of my apps uses over 150 MB VM? My VM stay at "976M + 45.4M 6118(0) pageins, 0(0) pageouts". But that is under light use, few apps.

And what is the kernel_tas process that uses gobs of ram (25M RSIZE; 251M VSIZE)?
Death To Extremists!
     
Mac Enthusiast
Join Date: Nov 2000
Status: Offline
Reply With Quote
Oct 21, 2001, 06:47 PM
 
Whether or not you NEED RAM is a tricky question. A person can always USE more RAM, but in your case, I wouldn't necessarily say you NEED it. 384 MB is a lot more than most people have.

As for the way OS X displays your use of it, don't worry. X manages memory a lot differently than any previous incarnation of Mac OS. In the Classic Mac OS, each application took only so much RAM (if it was programmed properly), and no more. You opened your applications, left them open, and you may have still had a 100 MB or so of unused RAM just sitting there for when you needed it.

In short, that way of using memory was a waste. With X, RAM doesn't go unused nearly as much. If its there, why not use it? So X uses the memory as much as it can to make everything run as smoothly as possible. If you open more applications, then it re-divides the memory, based on what needs it the most. And it keeps giving whatever application needs it the most more memory as the OS sees fit.

This difference can be somewhat startling at first... until you realize that it really is much more efficient.
     
Senior User
Join Date: Nov 1999
Location: Milkyway Galaxy
Status: Offline
Reply With Quote
Oct 21, 2001, 09:13 PM
 
Originally posted by Hobbes:
<STRONG>Whether or not you NEED RAM is a tricky question. A person can always USE more RAM, but in your case, I wouldn't necessarily say you NEED it. 384 MB is a lot more than most people have.

As for the way OS X displays your use of it, don't worry. X manages memory a lot differently than any previous incarnation of Mac OS. In the Classic Mac OS, each application took only so much RAM (if it was programmed properly), and no more. You opened your applications, left them open, and you may have still had a 100 MB or so of unused RAM just sitting there for when you needed it.

In short, that way of using memory was a waste. With X, RAM doesn't go unused nearly as much. If its there, why not use it? So X uses the memory as much as it can to make everything run as smoothly as possible. If you open more applications, then it re-divides the memory, based on what needs it the most. And it keeps giving whatever application needs it the most more memory as the OS sees fit.

This difference can be somewhat startling at first... until you realize that it really is much more efficient.</STRONG>
Hello. I am aware that the different between OS 9 memory managment and OS X memory managment is like night and day. I wanted to find out how much RAM everyhting with taking up to see adding more RAM is a worthwhile upgrade.

I know 384 is allot. but with the prices RAM modules are at now, it would be criminal to not buy more -- I just wanna know how badly I need it.

I typically leave my computer on for about a week at a time straight (with sleep mode, offcouse) , without logout either. My main apps that are always almost open are: IE, Omniweb (or some other browser), AOL Instant Messenger, & iTunes. Every so often, I then use AOL for Mac OS X [beta], Mail, Terminal, & other stuff. I also have 4 or 5 little utilites (PPP Monitor, for example) all open. My VM size often goes past 1.2 GB and and it starts hitting the disk. Eventually, top reports that I have ~ 3.xx-4.xx MB free PhysMem. This is why I presumed that my computer needed more RAM.
So should I get more or not? The prices seem great and I don't know how long their'll be this low.
Death To Extremists!
     
Senior User
Join Date: Nov 1999
Location: Milkyway Galaxy
Status: Offline
Reply With Quote
Nov 1, 2001, 01:28 PM
 
Well does anyone know the answer to my previous posts' question? Do or do i not need more memory [based on what I've said]?
Death To Extremists!
     
Fresh-Faced Recruit
Join Date: Nov 2001
Location: Ithaca, NY
Status: Offline
Reply With Quote
Nov 2, 2001, 12:06 AM
 
More than likely, you don't need any more RAM. OS X would just use the extra memory to do even more caching than it's doing now.
     
rw
Mac Enthusiast
Join Date: Dec 2000
Location: Kirkland, WA, USA
Status: Offline
Reply With Quote
Nov 2, 2001, 12:52 AM
 
Originally posted by mactropolis:
<STRONG>Well does anyone know the answer to my previous posts' question? Do or do i not need more memory [based on what I've said]?</STRONG>
I just went from 256 MB to 640 MB, and the difference is tremendous. (This is on a 500 MHz iMac, so not a high-performance machine.) Before, I typically had 5 to 8 swapfiles. Now, it stays around 2. (You can check this by typing "ls /var/vm" in the Terminal.) This means much less virtual memory swapping, less waiting for apps to respond, far fewer spinning beachballs, even using IE. Apps run perceptibly smoother. Even scrolling in OmniWeb is almost not jerky.

As a previous poster noted, OS X tries to use almost all the RAM available, but even so, the "top" utility often now shows sizable amounts of free memory. (At the moment, 44 MB.)

I no longer cringe when I have to use Classic, knowing that performance of other apps will decline. In fact, Classic may be open right now -- I don't remember. I can give Virtual PC Test Drive gobs of memory (not that it matters -- it still runs poorly) and still have memory to spare.

All this for $45. If I find a buyer for the 128 MB RAM module I replaced, I'll even get some of that back. (Not likely, though. Pretty soon we'll be getting 128 MB sticks in Cracker Jacks boxes. A while back, our local CompUSA was literally giving them away for free.)

The short answer (now that I've made you read the long one ) is that I'm sure you won't regret doing without 3 or 4 pizzas next month for the sake of buying some memory.

[ 11-02-2001: Message edited by: rw ]
Dang! I forgot to uncheck the "Show Signature" button again!
     
Senior User
Join Date: Nov 1999
Location: Milkyway Galaxy
Status: Offline
Reply With Quote
Nov 2, 2001, 05:09 PM
 
Originally posted by rw:
<STRONG>

I just went from 256 MB to 640 MB, and the difference is tremendous. (This is on a 500 MHz iMac, so not a high-performance machine.) Before, I typically had 5 to 8 swapfiles. Now, it stays around 2. (You can check this by typing "ls /var/vm" in the Terminal.) This means much less virtual memory swapping, less waiting for apps to respond, far fewer spinning beachballs, even using IE. Apps run perceptibly smoother. Even scrolling in OmniWeb is almost not jerky.

As a previous poster noted, OS X tries to use almost all the RAM available, but even so, the "top" utility often now shows sizable amounts of free memory. (At the moment, 44 MB.)

I no longer cringe when I have to use Classic, knowing that performance of other apps will decline. In fact, Classic may be open right now -- I don't remember. I can give Virtual PC Test Drive gobs of memory (not that it matters -- it still runs poorly) and still have memory to spare.

All this for $45. If I find a buyer for the 128 MB RAM module I replaced, I'll even get some of that back. (Not likely, though. Pretty soon we'll be getting 128 MB sticks in Cracker Jacks boxes. A while back, our local CompUSA was literally giving them away for free.)

The short answer (now that I've made you read the long one ) is that I'm sure you won't regret doing without 3 or 4 pizzas next month for the sake of buying some memory.

[ 11-02-2001: Message edited by: rw ]</STRONG>
Hey rw, where did you get you 512 for $45?

Also, going from 256 to 640, what exact was so tremendous? I recently was using my iMac with 128 and then I put in 512. Their was indeed a speed up. abotu the fastest thing to improve was the log-in time. app launching was also faster. much less disk paging. what other speed ups did you see?

I'm having some problems with my new 256 that I got. Check out this forum I have posted about it. Hopefully someone can help.

http://newforums.macnn.com/cgi-bin/u...5&amp;t=004974
Death To Extremists!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:30 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2