[X Newbies] swapfiles and changing swapdisk

Bill Reburn bill at pacificcoast.net
Sat Nov 30 08:49:50 PST 2002


Grégoire,

Since OSX came out a lot of heated discussion has gone on over the validity
of moving your Swap file to another partition/disk. Apparently this is
another step OSX (Unix?) handles all too well on it's own and for the most
part could never be bothered with (I would bet more than 90% of OSX users
don't even know what it is).

Moving the swap file isn't the easiest thing to do - but some very
Unixy-specific Terminal steps are required. Tutorials exist online.

Unless you are experiencing some specific issues related to memory - I would
recommend leaving it alone.

Moving it could help with troubleshooting if you know what you're doing,
many people thought moving swap files to another disk would help in
performance. For some it did.. But it gets blurry here.

Try to stick with me here - if I get boring;

A program like Adobe Photoshop also uses a disk swapping (ScratchDisk)
system that fundamentally is the same as OSX's swap. What happens is, when a
very large image file is loaded into memory - Photoshop may require
more/extra memory than what is physically available to perform certain steps
(adding text, changing colours) - so it swaps information/memory to another
disk or file, swapping back in when necessary, freeing up Ram and other
resources for the momentary step.

Even if you have 2gigRam, Photoshop (and OSX) will still do this.

If you have another HD installed (not a single partioned HD) you could move
the swap file location to the other disk so that the performance of that
'swap' step would improve. The improvement comes from having multiple drives
with multiple heads reading the information somewhat simultaneously. Having
the swap location (a 3 gig partition on another HD for example) free of any
other files, simultaneously allows and restricts all Swap information to
exist in that space - free of conatamination/fragmention by other files. You
also prevent the Swap file from being fragmented across your HD - keeping it
as one contigous file may help with performance.

If you only have one HD, moving the swap to a dedicated partition *could*
actually slow down your system. It may help if you have 'Runaway Swap File'
problems, or to keep it from being fragmented itself.

Overall though (outside of any troubleshooting) - I think this step is
pretty useless. There are websites out there that have done the math and the
performance gain is not only negligible, but so varied across different
machines - that it often causes many many problems for ppl.

IMHO - don't bother.


On 11/30/02 7:55 AM, "Grégoire Seither" <gregoire at pobox.com> wrote:

> How do you change your swapdisk ? I haven't seen that option in System
> prefs.
> 
> I have one Gig of RAM but - since until a couple of weeks ago, everyone
> told you to partition your disk - my OSX is on a 5 Gig partitiion. How
> do I change my swapdisk to use the other 115 Gig partition ? I haven't
> got the time to reformat right now...
> 
> Le samedi, 30 nov 2002, à 16:40 Europe/Paris, Vicki Schalin a écrit :
> 
>> I changed swapdisk to a very large (3 GB) empty separate disk
>> partition and that means that when/if Finder crashes I have some time
>> to restart Finder before the disk is filled with swapfiles.
> 






Bill Reburn



More information about the X-Newbies mailing list