PDA

View Full Version : Virtual Memory


JoesMorgue
05-09-2009, 11:18 AM
I was talking to a friend last night, and he told me I needs a swap partition for Virtual Memory on OSX.

My drives are full, and I don't want to mess with re-partitioning them.

I know (thru my friend) I can create a fixed size file, or a Zero Byte Length file and let it grow/shrink as necessary.

How do I do these?

naquaada
05-09-2009, 12:26 PM
A swap partition like in Linux or AmigaOS 4.1 isn't neccessary in OS X, it handles is virtual memory in a different way - but don't ask me how. Windows wants about the 1.5x so much virtual memory as real memory, for this a file called C:/pagefile.sys is used. But I don't know if this is effective - I'm running XP in Parallels virtual memory disabled and it works fine.

You should leave enough free space on your boot partition. That's why I'm using multiple harddisks, the boot partition is only for applications and system data, including virtual memory. It's also safer, if you storing your personal data on another harddisk it is possible to reinstall your system without big data loss. If your board doesn't have enough harddisk connectors, buy a small SATA controller card with the SiliconImage SiI3112 chip, this one is supported by MacOS X.

Voyn1x
05-09-2009, 12:42 PM
To follow on from Naquaada's post, though not needed by the operating system itself, the ability to specify an external scratch disk is sometimes built in to certain memory intensive applications. Off the top of my head, Photoshop and Final Cut Pro both offer this feature. :)

naquaada
05-09-2009, 01:12 PM
What do you mean with 'scratch disk' ? I have in some applications f.e. Amadeus Pro, CloneDVD 2, Logic and others an option to use a drive for temporary data. Did you mean something like this?

You can take a look in the Activity Monitor in the Utilities folder, there you can see which program needs how much real and virtual memory. I have Activity Monitor always running and automatically started at login, using 'Show CPU history' in the Dock. So you can always see what your cpu's are doing and you can use Activity Monitor as comfortable Task Manager.

Voyn1x
05-09-2009, 01:19 PM
What do you mean with 'scratch disk' ? I have in some applications f.e. Amadeus Pro, CloneDVD 2, Logic and others an option to use a drive for temporary data. Did you mean something like this?

Exactly that, to quote wikipedia -

"Scratch space is commonly used in graphic design programs, such as Adobe Photoshop. It is used when the program needs more memory, and the amount of available system RAM is insufficient. A common error in that program is "scratch disks full", which occurs when one has left the scratch disks configured to the default setting, being the boot drive."

naquaada
05-09-2009, 01:32 PM
Never heard the expression 'Scratch Space'... or even a german equivalent witch would be 'Kratzplatz' or 'Kratzraum' :D

JoesMorgue
05-09-2009, 05:46 PM
According to my friend (With a true Mac) taken from my chat log:

No. Even if it's not used, swap space is allocated each time a process starts.
You need at least the amount of swap space that you have RAM. Double is better.
IRIX has four kinds of swap space:

1. Raw swap partition--this is the fastest, but requires that you
repartition the disk to change it.

2. Preallocated file--this is the second fastest, you use mkfile to create
a file of some length and then point swap to it. It has the advantage that
you can create it at any time, and it is all in one contiguous set of blocks
on the disk. It still takes up disk space, and is not accessable from the
miniroot for installation purposes.

3. Zero length file--You use touch to create a file and then point swap to
it. It has the advantage of not using space until you need it. It has the
disadvantage of possibly filling up the filesystem unexpectedly, and having
extents.

4. Virtual swap--This isn't really swap space at all, you are just telling
IRIX that you have this much space when you don't. It's generally good for
applications that spawn a bunch of processes rapidly which would allocate
a lot more swap than you actually have (mail servers would be a good
example). Some applications will die horribly if this is turned on
(Photoshop for instance).


I wants option number 3...Its kinda like the Winders SwapFile, it feels like the most desirable option to me. NTFS space is quite available...