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 > Mac OS X > Panther Virtual memory quandry

Panther Virtual memory quandry
Thread Tools
Addicted to MacNN
Join Date: Oct 2003
Location: Far above Cayuga's waters.
Status: Offline
Reply With Quote
Oct 24, 2003, 10:59 AM
 
ok. here is the deal. i have a 700mhz ibook running 7b85, with 640mb of physical ram. i have the 30 gb harddrive and all but 1.6gb of that is used for assorted whatnot.

running panther, when i look in the activity monitor, i can clearly see that i have roughly 3gb of virtual memory in use. which leads me to this question:

where is this 3gb coming from?? clearly not totally my hard disk, as i only have 1.6gb free. (or is it??) is this a bug in panther (i.e. now way no how am i using that much virtual memory)??? or is panther shuffling my files on my HD around so it can have 3gb of virtual mem at a given point??

please understand my confusion. has anyone else noticed this?

Dan.
     
Addicted to MacNN
Join Date: Oct 2003
Location: Far above Cayuga's waters.
Status: Offline
Reply With Quote
Oct 24, 2003, 11:59 AM
 
still a little too early to be asking about panther?? just someone check this... do you have a seemingly large allotment of virt mem??

TIA
Dan.
     
Dedicated MacNNer
Join Date: Jul 2002
Location: Calgary, Alberta
Status: Offline
Reply With Quote
Oct 24, 2003, 12:14 PM
 
It's not actually using 3gb, thats how much it would have to use if it were to page *all* running apps to disk and all associated libraries etc. A little more free space would be helpfull, in the event you are running something that causes a mass exodus of programs from ram to page files the disk is going to get very full and could possibly cause massive system instability. If you run "top" from the command line, my system shows 2.06gb + 77M of total Virtual memory. 2.06gb is what the system would need if it were to page *everything* into VM, the 77m is the actual amount of Virtual memory in use.

To be more safe than sorry i'd delete the 3 gigs of Internet porn in ur documents folder to free up some space ;o) That free space will prove to be beneficial to your systems stability should the ssytem need to flush the ram.
"No ma'am i'm not angry at you, I'm angry at the cruel twist of fate that directed your call to my extension..."
     
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status: Offline
Reply With Quote
Oct 24, 2003, 12:29 PM
 
This number is the total of all "mapped" virtual memory, and unless you truly know how UNIX style memory management works is a useless number. There are a few things to know about this:

Classic starts out mapping a 1Gig memory partition for its self. It has to do things because the applications inside Classic expect to see a static memory space, and that was the size Apple chose.

All shared resources (frameworks, libraries, Fonts, etc..) are mapped into the memory space of every application that uses them, even implicitly. So all of the applications that use the Cocco frameworks wind up with v-maps that include a good chunk of extra space for addressing these frameworks. Since multiple applications (including Finder, etc..) all share these frameworks, only one copy exists in the real v-memory, but when you blindly add up all of the v-memory sizes, you get numbers that don't mean much...

A number of applications will malloc (request a block of memory) a lot of memory so that they can manage it themselves. This can have huge benefits in performance for applications that push a lot of data around, but there are plenty of cases where the application never actually uses the memory for anything. With UNIX style memory management this is not a big deal as the mapped memory is not actually allocated until you use it (and it then page faults). This unused space will also show up in v-size.

A much better number to pay attention to is the rsize. This is how much the application has actually used. This sometimes includes shard memory, so is still not a great counter for the uninitiated, but it is better then vsize.
     
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Oct 24, 2003, 12:30 PM
 
I'm running Panther.

Code:
PhysMem: 72.6M wired, 226M active, 223M inactive, 522M used, 117M free VM: 3.55G + 96.5M 537449(0) pageins, 30949(0) pageouts [arkham@flybook /var/vm] ls -lrt total 1048576 -rw------T 1 root wheel 67108864 15 Oct 21:03 swapfile0 -rw------T 1 root wheel 67108864 16 Oct 10:43 swapfile1 -rw------T 1 root wheel 134217728 16 Oct 11:11 swapfile2 -rw------T 1 root wheel 268435456 22 Oct 10:37 swapfile3 [arkham@flybook /var/vm] du -sk . 524288 .
That's on my iBook (using exactly 512MB of disk space) . The thing is, virtual memory is NOT hard drive space.

VM is a mapping of physical memory out to made-up memory. Typically what this means is that your OS can say "give me whatever is stored at 0x219283847AD, and not worry if your computer really has that much RAM or not.

The implementation of that virtual->real memory map should not really be significant to you. Suffice it to say that unlike OS9, OSX does not require one byte of disk space for every byte of virtual memory. Only when the memory is actually used is space allocated on the disk. This disk allocation occurs by default in /var/vm as in my example above.
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
Mac Elite
Join Date: Apr 2003
Location: The City Of Diamonds
Status: Offline
Reply With Quote
Oct 24, 2003, 12:36 PM
 
Code:
PhysMem: 74.9M wired, 124M active, 421M inactive, 619M used, 405M free VM: 3.11G + 65.7M 14283(0) pageins, 8(0) pageouts
I'm on 10.2.8

And I have 1 swapfile. (78MB)
     
Forum Regular
Join Date: Mar 2001
Location: San Diego
Status: Offline
Reply With Quote
Oct 24, 2003, 12:56 PM
 
Just a warning for everyone. Never let your hard drive get below 1Gig of free space. once you run out of HD space you will start losing incoming email, settings, etc. I have had 3 users so far were this has happened.
     
Mac Elite
Join Date: Nov 2001
Location: Trafalmadore
Status: Offline
Reply With Quote
Oct 24, 2003, 01:15 PM
 
Fortunately for those unaware of their free disk space, Panther will now alert you when space left is getting too low for its comfort.
     
Addicted to MacNN
Join Date: Oct 2003
Location: Far above Cayuga's waters.
Status: Offline
Reply With Quote
Oct 24, 2003, 02:54 PM
 
wow, thanks everyone. unix is kinda greek to me, so i really appreciate this.

ill get on the deleteing of stuff. for the record, there is no porn on this thing, just 22gb of music. which is a whole nother can of worms

anyway, that was amazingly prompt and informative.

thanks
Dan.
     
Senior User
Join Date: Oct 2000
Location: Midwest
Status: Offline
Reply With Quote
Oct 24, 2003, 04:38 PM
 
I mentioned this in another post...10.3 has dynamic paging.... the kernel/processor/mmu memory algorithm adjusts the page/swap size up and down depending on more stuff that can be explained here. Very very slick.

Craig
     
Mac Elite
Join Date: Oct 2000
Status: Offline
Reply With Quote
Oct 24, 2003, 05:33 PM
 
I'm posting this because I seem to have rather a lot of swap files going on - more than I've seen others report - is that indicative of something?

swapfile0 - 64MB
swapfile1 - 64MB
swapfile2 - 128MB
swapfile3 - 256 MB
swapfile4 - 512 MB

I have a G4/533 DP 768MB RAM Mac OS X 10.3
     
Mac Elite
Join Date: Oct 2000
Location: Edinburgh, Scotland
Status: Offline
Reply With Quote
Oct 24, 2003, 06:24 PM
 
Originally posted by booboo:
I'm posting this because I seem to have rather a lot of swap files going on - more than I've seen others report - is that indicative of something?

swapfile0 - 64MB
swapfile1 - 64MB
swapfile2 - 128MB
swapfile3 - 256 MB
swapfile4 - 512 MB

I have a G4/533 DP 768MB RAM Mac OS X 10.3
When was the last time you ran Photoshop or some other HUGE memory hog, or restarted? I used to get loads of swap files in 10.2.8, but only had 384MB on my G4/733.

For the record. From 10.3, G4/733 with 896MB:
Code:
PhysMem: 73.0M wired, 121M active, 235M inactive, 429M used, 466M free VM: 3.51G + 78.3M 31456(0) pageins, 1(0) pageouts
Cache hit rate of 42.1%. The more memory you've got, the higher this percentage will be over time.
ClamXav - the free virus scanner for Mac OS X | Geobunny learns to fly
     
   
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 05:58 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