Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'other swap options?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
other swap options?
Authored by: Anonymous on Mar 25, '01 07:10:58PM

I've got 1G of ram. I want to create atleast 1.5G of swap area to have a total of 2.5G Vmem.

MacOS created by default a swap file in it's root filesystem. This is not what I want. I read about the way to move the swap file to another filesystem that can exist on a faster drive. This is also not what I want. My root filesytem is a 18G scsi.

What I want is for MacOSX to be able to do what other unix flavor can. Swap out to a device, or a raw partition rather than a swap file in a filesytem. From what I see, it's not possible, but since macosx is a unix derivative, it has to be some hidden feature. To swap to a raw partition has dramatic performace increase over to a file in a filesystem.

I've even pre-created 1.5G of raw space in start at the first block of my drive, also to help improve swap performace. But it's idle and reserved for now until I can find out how to use it. Can MacOSX do this? Linux can, Solaris can, IRIX can. OpenBSD, NetBSD, FreeBSD can. I will not believe that OSX can't.

Has anyone looked into this?

Also can a multiple swaps be used? From what I understand in the Unix world, when creating multiple swap area across different drives, the os stripes between them, dramatic improving the speed of read/write to it. I want to be able to explore to performace potential of osX. I'm sure you guys do too. Let's look into this!

Thanks!



[ Reply to This | # ]
other swap options?
Authored by: patpro on Apr 27, '01 07:27:58AM

you may want to take a look at : http://www.peak.org/~luomat/articles/FAQs/Swapfile_Swapdisk/

As swap system of OSX is inherited from the Next's one, these readings are very informative. I based my own research on these docs to find out the way to move swapfiles.



[ Reply to This | # ]
other swap options?
Authored by: chabig on Dec 26, '01 11:55:42AM

If you've got 1GB of physical RAM, congratulations! You're doing the best you can to manage your memory.

The OS X virtual memory system only pages memory to disk when it's necessary. It doesn't reserve disk space in advance, rather it grabs 80MB chunks of disk space only when they're needed.

Chances are, with your 1GB of RAM, you never have any memory paged to disk. When you use all of your RAM and the first 4096 KB chunk gets paged to disk, it will go to an 80MB swapfile. If you task the system so hard that that file is all used up, OS X will create another 80MB swapfile, etc.

You shouldn't think "I want 2.5 GB of virtual memory." In fact, you've already got that, and more--up to the capacity of your hard disk. Got 5 gigs free on your hard drive--congratulations, you've got 6 GB of virtual memory! Got 10 gigs free, you've got 11 GB of virtual memory!



[ Reply to This | # ]
other swap options?
Authored by: patpro on Jan 02, '02 04:41:22AM

I don't agree with your statement saying that "Chances are, with your 1GB of RAM, you never have any memory paged to disk".

I have 640 MB RAM (ok, not 1GB) but I still managed to create about 10 swap files (76,3 MB each) just by opening a 15 or 16MB JPEG with preview.app. other app running were : IE, ircle, finder.app, dock.app, terminal.app, that's all.

So I would say, chances are with 1GB of RAM you will have memory paged to disk sooner or later.

note that OS9 can open the same JPEG and even a 32MB JPEG without virtual memory, and it does it really faster than preview.app on OSX



[ Reply to This | # ]