a1291762
Registered
CAUTION! This involves reformatting your disk so be careful and back up your data. If this fries your HD then don't complain to me. You have been warned...
OS X uses dynamic paging (that horrible system that's in Windows95/98/ME) so a fragmented disk makes for very slow performance. With only 128MB RAM on my iMacDV (1999) and a 4GB HD, I run into this problem a lot.
Because OS X is also Unix, you can use a much more efficient paging system, One that's been around as long as Unix. Of course, it's a swap partition.
Unless you have a program like FWB harddisk toolkit, you'll have to re-initialize your HD to add a swap partition but it's definitely worth it.
After seting up a swap partition, I ran almost every app I could find in OS X and the system was still responsive. Normally after running 3 or 4 apps, my system gets a major case of HD chugging.
How to add a swap partition to OS X:
1. BACKUP YOUR DATA (This should be obvious)
2. Create partitions
I chose to have 1 HFS+ and 1 swap
OS 9's Drive Setup and OS X's Disk Utility (Run from the install CD) can both create swap partitions.
For Drive setup, create a partition of type Unix Swap
For Disk Utility, create a Unix partition and give it the name swap
*note I created my partitions with the graphical utility on the LinuxPPC 2000 Install CD. I know Drive Setup can create Unix swap partitions but I haven't tested if Disk Utility does it properly. For the technically minded, the swap partition must be of type Apple_UNIX_SVR2 and have the label "swap"
3. Initialize your HFS/HFS+ partitions.
I don't think this is nesecary if you use Drive Setup or Disk Utility. It was for me because LinuxPPC doesn't know how to format HFS+.
4. Install OS X (and OS 9 if you want it)
5. Bring up terminal
6. Become root
type "sudo csh" and then enter your password (this loads a shell as root without having to specifically enable the root account)
7. Edit the /etc/rc file
find the swap section
comment out all of it.
add the line "mount -vat swap"
- means mount all swap partitions in /etc/fstab
8. run pdisk /dev/disk? -dump
? is the disk number of your hd (probably 0)
record the number next to the swap partition
9. Edit or create /etc/fstab (it probably doesn't exist)
add a line like "/dev/disk?s?? none swap sw 0 0"
- ? is your disk.
- ?? is the number of the swap partition.
10. reboot.
I chose 200MB of swap but you might want more or less depending on how many programs you run.
If you keep running out of memory, you can re-enable dynamic paging (the bit in the /etc/rc file).
Unfortunately there's no way I can find to see if OS X is actually using the swap partition (other than opening heaps of apps and seeing if the HD chugs). the "top" command seems to report bogus values for VM (It said I had 1.5GB of VM but it should have reported 328MB)
Another advantage of this is that if you dual boot OS X and another Unix, you can share swap partitions.
If you don't understand what I was talking about, you probably shouldn't be trying this.
Link
OS X uses dynamic paging (that horrible system that's in Windows95/98/ME) so a fragmented disk makes for very slow performance. With only 128MB RAM on my iMacDV (1999) and a 4GB HD, I run into this problem a lot.
Because OS X is also Unix, you can use a much more efficient paging system, One that's been around as long as Unix. Of course, it's a swap partition.
Unless you have a program like FWB harddisk toolkit, you'll have to re-initialize your HD to add a swap partition but it's definitely worth it.
After seting up a swap partition, I ran almost every app I could find in OS X and the system was still responsive. Normally after running 3 or 4 apps, my system gets a major case of HD chugging.
How to add a swap partition to OS X:
1. BACKUP YOUR DATA (This should be obvious)
2. Create partitions
I chose to have 1 HFS+ and 1 swap
OS 9's Drive Setup and OS X's Disk Utility (Run from the install CD) can both create swap partitions.
For Drive setup, create a partition of type Unix Swap
For Disk Utility, create a Unix partition and give it the name swap
*note I created my partitions with the graphical utility on the LinuxPPC 2000 Install CD. I know Drive Setup can create Unix swap partitions but I haven't tested if Disk Utility does it properly. For the technically minded, the swap partition must be of type Apple_UNIX_SVR2 and have the label "swap"
3. Initialize your HFS/HFS+ partitions.
I don't think this is nesecary if you use Drive Setup or Disk Utility. It was for me because LinuxPPC doesn't know how to format HFS+.
4. Install OS X (and OS 9 if you want it)
5. Bring up terminal
6. Become root
type "sudo csh" and then enter your password (this loads a shell as root without having to specifically enable the root account)
7. Edit the /etc/rc file
find the swap section
comment out all of it.
add the line "mount -vat swap"
- means mount all swap partitions in /etc/fstab
8. run pdisk /dev/disk? -dump
? is the disk number of your hd (probably 0)
record the number next to the swap partition
9. Edit or create /etc/fstab (it probably doesn't exist)
add a line like "/dev/disk?s?? none swap sw 0 0"
- ? is your disk.
- ?? is the number of the swap partition.
10. reboot.
I chose 200MB of swap but you might want more or less depending on how many programs you run.
If you keep running out of memory, you can re-enable dynamic paging (the bit in the /etc/rc file).
Unfortunately there's no way I can find to see if OS X is actually using the swap partition (other than opening heaps of apps and seeing if the HD chugs). the "top" command seems to report bogus values for VM (It said I had 1.5GB of VM but it should have reported 328MB)
Another advantage of this is that if you dual boot OS X and another Unix, you can share swap partitions.
If you don't understand what I was talking about, you probably shouldn't be trying this.
Link