|
#1
| ||||
| ||||
|
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 |
|
#2
| ||||
| ||||
| D'oh, Crap, Bugger!!!
After running without dynamic paging for a day, I have realized that Mac OS X lacks a "swapon" command. This is what lets the OS use the swap partition as VM. If anyone tried this then I apologise. IT DOES NOT WORK! Sorry, Link |
|
#3
| |||
| |||
| Quote:
Apple states: Quote:
|
|
#4
| |||
| |||
|
Browsing the web has proven to be partially fruitless in terms of whether someone has figured out a swapon equiv. But, there is a suggest at: http://www.macosxhints.com/article.p...01215021440138 Which is better than the default setup of OSX. The article shows how to move your swap file to a different drive. Since I'm on a powerbook, I'll probably just move it to the parittion I made for the A/UX Swap space. Just thought folks may want to know about an alternative |
|
#5
| |||
| |||
| D'oh, Crap, Bugger!!!
I like the subject line. Type: pstat -s "swamode not implemented yet" (or something like that). Does it cheese you off, that we have UNIX.....but only bits of it. In some UNIX(s) swap is in /tmp (Solaris), it would have been a neat move to go that way, as mounting the filesystem /tmp can automatically bung swap there also. Maybe its implemented but we don't know it yet. Why did APPLE go back to BSD when they had a SYSTEM V (AUX) years ago? Which is where the "Apple_UNIX_SVR2" naming came from. All a little strange.
__________________ G3 B&W 500MHz/768 MacOSX 10.1.2 (4GB external) & 9.2.2 (9GB internal). iMac 500MHz/384 | iMac 233MHz/256 (IPnetRouter, AppleMailShare) PowerMac 7500 | PowerMac 7100 | Performa 5400 Pentium 11 300mhz Mandrake Linux 8.1. 10/BASE-T Ethernet hubs * 2, home built cables, piece of cake and cheap (cents) "Complex problems have simple, easy to understand wrong answers" |
|
#6
| |||
| |||
| dynamic_pager
It appears as if the program /sbin/dynamic_pager is the one which sets up swap. It looks like it runs constantly, a ps shows it running on my system right now: dynamic_pager -H 40000000 -L 160000000 -S 80000000 -F /priv... It's started from /etc/rc, and has the following argument list: usage: dynamic_pager [-F filename] [-L low water alert trigger] [-H high water alert trigger] [-S file size] [-P priority] and it looks like the default is /private/var/vm/swapfile0 |
|
#7
| |||
| |||
| Re: dynamic_pager Quote:
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Change SWAP Partition! How? Come in and see it! | Alexandert | Mac OS X System & Mac Software | 5 | May 8th, 2002 07:06 AM |
| Format a Partition From HFS+ to UFS | isaac_ho | Mac OS X System & Mac Software | 4 | September 20th, 2001 09:59 AM |
| Anyone know how to adjust the Vitual Memory Page Files? | knighthawk | Mac OS X System & Mac Software | 10 | September 8th, 2001 12:13 AM |
| How to hide a swap partition | Zeus | Mac OS X System & Mac Software | 2 | August 20th, 2001 11:12 AM |
| Swap Partition | jdog | Apple News, Rumors & Discussion | 11 | July 6th, 2001 03:20 PM |