Forums | MacLife
You are not logged in.
#1 2003-01-24 11:34 pm
- panic-button
- Member
- From: Las Vegas, NV
- Registered: 2001-03-25
- Posts: 114
Swap File/Partition Madness
Could someone, I mean, ANYBODY tell me:
Why in the heck you want to create a swap partition?
What does it do?
Why should you have one?
How much of one should you have?
And best of all:
How do you create one in OS X?
Thanks, people! 
--<BR>Intel Inside: Now I know that it wasn't an advertisement, it was a WARNING LABEL!

Offline
#2 2003-01-24 11:56 pm
- Jyri Erik
- Member
- From: Greenbelt, MD
- Registered: 2001-04-21
- Posts: 2411
Re: Swap File/Partition Madness
Okay, the best reason to create a swap partition is this. OS X uses (i think) 80MB swap partitions whenever it runs out of RAM. The problem is that the 80MB need to be contiguous. As your drive fragments through use it takes longer & longer to find that 80MB, thus slowing VM down even more. By setting up a seperate partition (as a multiple of 80MB, plus some extra for partition bookkeeping) you guarantee you have contiguous HD space at all times.
To create a SEPERATE swap partiton in OS X, there's a detailed explanation in issue 68 (April 2002), p.28. If you don't have the issue, I could write up the text for you.
Or, you could do what I did. Get a buttload of RAM & forget all about swapping. (768MB seems to work for me).
Jyri
Offline
#3 2003-01-25 7:16 pm
- Guest
- Guest
Re: Swap File/Partition Madness
OS X uses (i think) 80MB swap partitions
eh, 80MB swap "files".
Or, you could do what I did. Get a buttload of RAM & forget all about swapping. (768MB seems to work for me).
Jyri
hard to nitpick that one.
You probably don't need to worry about a seperate swap partition unless your machine is significantly performance-challenged to begin with.
Newish machines (G4 desktops basically) will not see much benefit from a swap partition.
#4 2003-01-26 12:02 am
- SwisSlesS
- Member

- From: Home of the Massholes
- Registered: 2002-06-19
- Posts: 8307
Re: Swap File/Partition Madness
I have 768 MB of RAM also, and I've never seen a performance dip. I'm assuming that it has just never run out of RAM.
I'm a dog, spelled backwards.
Offline
#5 2003-01-26 10:12 am
- panic-button
- Member
- From: Las Vegas, NV
- Registered: 2001-03-25
- Posts: 114
Re: Swap File/Partition Madness
I'm most interested in this becuase my wife has an iBook that is beginning to have some clear performance issues, and we only have 384MB of RAM in her machine.
I'll look for that issue, if I don't have it, I'll have to getcha to write that for me...
BTW, thanks again everybody. It is sooooo nice to be able to come to forums where people actually know what in the @#$@ they are talking about (well, MOST people). Unlike the windows forums I used to surf.
PB
--<BR>Intel Inside: Now I know that it wasn't an advertisement, it was a WARNING LABEL!

Offline
#6 2003-01-29 1:10 am
- panic-button
- Member
- From: Las Vegas, NV
- Registered: 2001-03-25
- Posts: 114
Re: Swap File/Partition Madness
Could someone pretty PLEASE post how to make a swap partition for OSX? I just wanna know soooooooooooooooo BAD!!!!
Thx,
PB
--<BR>Intel Inside: Now I know that it wasn't an advertisement, it was a WARNING LABEL!

Offline
#7 2003-01-29 7:41 am
- brainiac_7
- % rm -r brainiac_6
- Moderator

- From: CT Shoreline
- Registered: 2000-10-09
- Posts: 7252
- Website
Re: Swap File/Partition Madness
Read all about it at ResExcellence.
The author, Andy Moraitis, used to hang out in the Mac OS X: General forum and answer questions. He's quite a guy; he actually called me on the phone to help me hack it out in vi. Anyway, Jaguar changed the path to my swap partition and reset it back to my OS X partition, and I haven't had the stones to change it back.
Offline
#8 2003-01-29 7:47 am
- MacBoy4139
- BHA

- From: Big Hair Anonymous
- Registered: 2000-10-31
- Posts: 10911
Re: Swap File/Partition Madness
Did you notice a significant performance boost when you did it (i.e. is it worth doing)?
Thanks!
Dive in the Pool!
I'm still trying to figure out if you're a girl posing as Macboy4139, or a boy posing as a girl, and a bit confused sexually. <shrug> laughinol
Offline
#9 2003-01-30 4:47 am
- brainiac_7
- % rm -r brainiac_6
- Moderator

- From: CT Shoreline
- Registered: 2000-10-09
- Posts: 7252
- Website
Re: Swap File/Partition Madness
Under 10.0 it seemed to help. I talked with Andy and read his posts here after the more advanced OS Xs came out, and his feeling seemed to be that a Mac with a good amount of RAM (512 MB or more) didn't pageout (use VM) very often, and so a dedicated swap partition was less useful. He had top reports backing that up, too. Let's just say I didn't see a perfomance hit when I stopped using a dedicated swap partition with Jaguar.
I still think it's a cleaner idea to have your VM seperate from the OS and files and apps, due to HFS+ fragmentation.
Offline
#10 2003-02-03 9:41 pm
- Father of the Bar Mitzvah
- Member

- From: Olathe, KS
- Registered: 2001-02-24
- Posts: 1631
- Website
Re: Swap File/Partition Madness
Here is an article with detail instructions on how to set up a system with OS, swap, apps and user stuff all on sepparate individual partions. The only problem is that it sounds like you have to start fresh from a new/wiped/formated hard drive. The article is Create a customized mount point system at Mac OS X Hints.
I'd like to give this a try, but I'm loath to wipe the HD and reinstall everything. As I've mention in other threads, I set my partitions up in a goofy way (2/2/96 GB, X/9/Every Thing Else) and I NEED to get more space for the OS X partition - I'm having OS X crash when it needs a swap file and can't find the space!
I'll probly wipe and follow these instructions at some point.
If you can't say something nice, say it in Yiddish.
Offline
#11 2003-02-04 4:37 am
- brainiac_7
- % rm -r brainiac_6
- Moderator

- From: CT Shoreline
- Registered: 2000-10-09
- Posts: 7252
- Website
Re: Swap File/Partition Madness
Cool article. Quite a project there.
Only on my latest desktop did it occur to me to partition at install, with partitions set aside for OS X, OS 9, Apps, Files, Video, and swap. I believe all I need to do is alter my fstab file to restore the active use of my swap partition.
Installing in this fashion was kind of annoying because the installer plunks OS X and 9 on the same disk, so at a certain point I had to copy OS 9 over to it's own partition, and delete the original 9.
Offline
#12 2003-02-04 5:50 am
- Father of the Bar Mitzvah
- Member

- From: Olathe, KS
- Registered: 2001-02-24
- Posts: 1631
- Website
Re: Swap File/Partition Madness
Installing in this fashion was kind of annoying because the installer plunks OS X and 9 on the same disk, so at a certain point I had to copy OS 9 over to it's own partition, and delete the original 9.
Really? It's been a while, so maybe I just don't remember. I installed 9 first on it's partion and then X on it's own separate partion second. Maybe that made a difference, because I don't remember having two copies of 9 installed.
I'm wondering if I could use a portion of the instructions to redirect all my applications to the largest partion, freeing up a bunch of space on my X partion for swap files. Since I try not to write to the X partion, I'm not worried about fragmentation, just available space due to apps!
If you can't say something nice, say it in Yiddish.
Offline
#13 2003-02-04 8:14 am
- MacBoy4139
- BHA

- From: Big Hair Anonymous
- Registered: 2000-10-31
- Posts: 10911
Re: Swap File/Partition Madness
Doesn't OS 9 force you to install on the first partition. Or am I just talking old school here?
Dive in the Pool!
I'm still trying to figure out if you're a girl posing as Macboy4139, or a boy posing as a girl, and a bit confused sexually. <shrug> laughinol
Offline
#14 2003-02-15 12:33 pm
- pdot
- Member
- Registered: 2000-08-07
- Posts: 197
Re: Swap File/Partition Madness
Doesn't OS 9 force you to install on the first partition. Or am I just talking old school here?
OS 9 can be installed on any partition. I've done it many times. Even if it does require you to install on the first partition, the beauty of OS9 is that you can move it somewhere else via drag and drop.
OS X (in the past, at least) requires the first partition.
Sawtooth G4/400 448MB RAM
ATI Radeon 8500
OS X 10.3.14159265358979323846264338327950288419716939937510
NEC Multisync LCD 1525X
MS Intellimouse Explorer Optical
Offline
#15 2003-02-16 7:32 am
- brainiac_7
- % rm -r brainiac_6
- Moderator

- From: CT Shoreline
- Registered: 2000-10-09
- Posts: 7252
- Website
Re: Swap File/Partition Madness
Yes, you can always move OS 9 to another partition (incredible, still). When I got my new Quicksilver, I partitioned my drive: OS X, OS 9, Apps, Files, Scratch. It took me a while to realize the Software Restore disk wouldn't let me select seperate partitions for X and 9. I finally installed it all on to my X partition, and moved 9 afterwards. Guess that'll be a thing of the past anyway, with 9 going away.
Here's something I caught over on MacNN this week. A shareware SwapFile configurator (still in beta) using AppleScript. Here's the link (use at your own risk):
SwapSwapVM
Offline
#16 2003-02-17 7:23 am
- brainiac_7
- % rm -r brainiac_6
- Moderator

- From: CT Shoreline
- Registered: 2000-10-09
- Posts: 7252
- Website
Re: Swap File/Partition Madness
I tried SwapSwapVM, and it worked fine.
I'd already set up a small partition for swap, and had used it for a while until whatever OS X upgrade re-wrote my fstab, etc. moving my vm back to my OS X partition. SwapSwapVM was pretty easy to use.
Now, do I feel any speed bump? Not really, but it's difficult to say yet. I haven't gone wild with multitasking on this machine yet, and 10.2.4 feels slightly faster anyway. Still I like the idea of giving vm it's own contiguous space to write to.
Offline

