Tech Support > Operating Systems > MacOS > How to free up virtual memory?
How to free up virtual memory?
Posted by Helge on March 6th, 2004


Hi! I've got a nice PowerBook Gr/400 with 640 MB RAM and 1 Gig of free
harddisk space. Problem is, after using the machine for 2 days, the 1
Gig of free harddisk is gone, my machine starts nagging that it needs
more harddisk space and even when quitting all apps, the machine keeps
the virtual memory and there seems to be _no way_ to reverse back the
process of "eating up harddisk for virtual memory".

Except of course "rebooting the machine". Which I'm currently doing on
a daily basis and means that I'm rebooting OS X now more often than I
ever did OS 9 or my WinXP machine for that matter.

I've seen the culprit: it's the files "swapfile0" - "swapfile4" inside
the hidden directory /var/vm . I've thought about just deleting them
instead of rebooting, but was afraid of doing it.

My short question:
Part 1: Is OS X really that badly programmed that it doesn't free up
unused virtual memory, happily eating away all my precious harddisk
space until I have to reboot?
Part 2: What can I do to remedy this situation? Any command to enter
into the terminal?
Part 3: I've seen that people create a separate harddisk partition
just for the virtual memory. All of the tutorials about this tell that
"640 MB is enough". Well, what happens when this partition is filled
up? Will the ever-hungry OS X just get to its grips and start using
the available space reasonably or will it crash?

Thanks for any help!
Helge

Posted by MR_ED_of_Course on March 7th, 2004


in article 98a1c678.0403061645.70d94bfb@posting.google.com, Helge at
helge@mailinator.com wrote on 3/6/04 4:45 PM:

I'm not sure what types of applications you're running but I never
experienced anything like this except for some time ago when I was running a
DVD ripping application that something kinda similar, until it was updated
with a new version.

You might try running Onyx (it's free):
http://www.versiontracker.com/dyn/moreinfo/macosx/20070

As well as running Disk Utility to make sure you aren't experiencing any
drive based problems.


Posted by Terry McDanel on March 7th, 2004


In article <BC6FB834.34418%OhNoSPAM@pacbell.net>, MR_ED_of_Course
<OhNoSPAM@pacbell.net> wrote:

It is a fact that OSX has a problem with this. There was a very long
thread in comp.sys.mac.misc or .system a few weeks ago. Didnt learn
much from the thread except that OSX is not as efficient as some other
unix OS's. The virtual memory strategy is called paging out (which i
think related to the name of the thread). Some professed experts said
that deleting the the vm files could indeed lead to disaster.

I also found out about a simple small freeware called Memory Stick (X.3
Panther only, Jag wont work) which you can find on versiontracker.com,
that doesnt solve any problems but makes the whole vm process more
concretely visual. It helps to manage the memory problem before you
get bogged down. It is pretty cool and the documentation explains a
lot.

I havent had any problems since i boosted to 640 meg memory but i dont
have to run big memory hog apps like you may be forced to. Dont know
about your particular PB but i guess it goes without saying that the
only practical fix is to add more memory or at least drive space.

Luck with it.
terry.

--
t mcdanel at fast mail dot fm

Posted by MR_ED_of_Course on March 7th, 2004


in article no-2A30FE.19113207032004@lust.ihug.co.nz, funkygreenchicken at
no@spam.net.au wrote on 3/7/04 2:11 AM:

You may want to read this:

http://tinyurl.com/2ozu8

Or for the archives:

http://developer.apple.com/documenta...l/Performance/
VirtualMemory/Virtual_Mem_on_Mac_OS_X.html

You're confusing several terms and concepts.

OS X has protected memory, virtual memory and pre-emptive multitasking.


Posted by funkygreenchicken on March 7th, 2004


In article <BC6FB834.34418%OhNoSPAM@pacbell.net>,
MR_ED_of_Course <OhNoSPAM@pacbell.net> wrote:

To my knowledge, OSX doesn't have Virtual Memory the way it had in
previous Mac operating systems. The programmers deemed it an archaic
and ineffective concept and did away with it. It's got another system
now, pre-emptive memory I think they call it. But if there is an option
for virtual memory then I stand corrected, pleased to hear it and how
the heck do you get at the damb thing then?

Posted by Jim Schimpf on March 7th, 2004


helge@mailinator.com (Helge) wrote in message news:<98a1c678.0403061645.70d94bfb@posting.google. com>...
I run a Lime iBook with 320 Meg (10.3.2) and use it heavily, I
only have about 600 Meg of disk left so the problem you see is quite
common for me. Simple solution, just log out wait a bit and log back
in. The swapfiles disappear when the programs using their pages are
gone. Thus logging out shuts down all of the programs that have their
fingers into these log files and they are reclaimed. I usually have
to do this when I get below about 200 Meg (at least the OS starts
warning me then) although I have taken it to almost 0.

--jim

Posted by Helge on March 7th, 2004


MR_ED_of_Course <OhNoSPAM@pacbell.net> wrote in message news:> > My short question:
These are the programs that are often running on my machine: Finder,
Mail, Adium, Photoshop, Excel, Word, Camino, IE, Transmit, BBEdit,
Hexedit, Toast6, iTunes, AudioHijack, iPhoto, TextEdit, VirtualPC,
Reason, Logic, Terminal, DVD Player, Bittorrent, MPlayer, WMP,
RealPlayer, Quicktime Player, Poisoned.

There is indeed a command in Onyx to "remove all swapfile files of the
folder: /private/var/vm/". Can anybody tell me whether this option is
save or will do its job and then crash the machine?

Cheers!

Posted by Tom Stiller on March 7th, 2004


In article <98a1c678.0403071105.16207ead@posting.google.com>,
helge@mailinator.com (Helge) wrote:

Removing a file in unix will remove the file from the catalog but it
will not recover the space until the file has no open instances. One
poster said that he ran Apple's "Secure Delete" on the trashed file,
with predictably disastrous results.

--
Tom Stiller

PGP fingerprint = 5108 DDB2 9761 EDE5 E7E3
7BDA 71ED 6496 99C0 C7CF

Posted by Barry Margolin on March 7th, 2004


In article <98a1c678.0403071105.16207ead@posting.google.com>,
helge@mailinator.com (Helge) wrote:

Each of those is using up virtual memory, and some of them (e.g.
VirtualPC) are probably using quite a bit of VM. Try this command from
Terminal:

ps -axww -o vsz,command | sort -n

to see which commands are using lots of VM.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***

Posted by Kirk Strauser on March 7th, 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 2004-03-07T00:45:02Z, helge@mailinator.com (Helge) writes:

Any reason not to upgrade the drive?
- --
Kirk Strauser
The Strauser Group
Open. Solutions. Simple.
http://www.strausergroup.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAS4b+5sRg+Y0CpvERAqsvAKCDoN5bYH9URiu7YR5tc3 RLUOzIXACeOQwe
vw6+ytH85FEDw9jlJL7lHQY=
=+xoV
-----END PGP SIGNATURE-----

Posted by Tim Adams on March 7th, 2004


In article <87znasv1mu.fsf@strauser.com>,
Kirk Strauser <kirk@strauser.com> wrote:


Or free up some space on the existing one?