image
image

Go Back   macosx.com > Content & Information > Apple News, Rumors & Discussion

Reply
 
Thread Tools
  #1  
Old October 7th, 2001, 04:36 PM
Registered User
 
Join Date: Sep 2001
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
firewall is on a distinguished road
OS X Swap file

I have read on various posts that setting the swap file on a different partition speed up OS X a lot.

can anyone answer those questions for me

1- from a technical point of view why does it speed it up?

2- how big should the partition be?

3- I have 2 internal hard drives one with os 9.21 and the other with 10.1 , can i set the swap file on the 9.21 or should I partition either one of the drive to set a unique partition for the swap file?

4- how to set it up? ( idiot proof instructions, )

Thanks
Reply With Quote
  #2  
Old October 7th, 2001, 06:19 PM
Registered User
 
Join Date: Jul 2001
Location: Sweden
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
megus is on a distinguished road
I just did this today, following the instructions available at:
http://personal.bgsu.edu/~bombich/mactips/swap.html

Personally I don't se much of a speed-boost. Perhaps it's because I don't use any applications yet that would profit from this configuration.

//megus

B&W G3 400 MHz
448 Mb RAM
6+4 Gb HD

iBook SE 466 MHz
192 Mb RAM
10 Gb HD
Reply With Quote
  #3  
Old October 7th, 2001, 07:01 PM
efoivx's Avatar
Registered User
 
Join Date: Aug 2001
Location: NYC
Posts: 145
Thanks: 0
Thanked 0 Times in 0 Posts
efoivx is on a distinguished road
Some info

The swap is much like virtual memory. It uses disk space to page in and out data that ram doesn't have room for and does this with some intelligence lower priority things are what will swap first allowing things with higher priorities to get more of the real ram.

NOTHING is better than a whole lot of real RAM. the best solution is to not need to use the swap at all...

if you plan to move your swap file the best location is a separate small drive or partition of a separate drive.

it should not be more than 500 meg anything larger and you are defeating the purpose of isolating it.

the reason you isolate it is when data is written to a drive it can fragment and cause the drive to thrash around looking to find this data. causing the drive to loose performance. the system and your users space will no doubted get a lot of data read and written to it this combined with the data being written to the swap can slow things down.

swap files are created in 80 meg file increments as needs get higher swap space increases in 80 megs increments.

the reason you would use a separate drive is so that the swap is not competing with the other data to be read and written. as you can see with one drive setups a partition helps limit the area it has to look for the swap data in but the drive head still has to jump all over to read and write... while this solution is fine better is 2 drives with the swap on a small partition on the secondary drive. this further helps because now the drive doesn't have to bounce around reading and writing. small partitions are easier for a drive to manage and are less prone to bad fragmentation. this is why the swap should not be more than 500 meg any more than this would waste space and defeat the goal in addition the swap partition should not be used to save files to it is just for the swap.

in the end what all this sums up to is... you won't see amazing speed changes that's not what this does. it helps things run more efficiently so the speed gains are more in that you don't sit watching beachballs and system performance doesn't degrade while running a lot of apps. again NOTHING BEATS REAL RAM!

more info can be read here as well as a step by step how to guide

My main system config -

G4 500
640 megs RAM
2 internal IDE Drives
drive 1
Capacity: 27 GB
X 8.49 GB
Users 8.49 GB
Backup 8.49 GB

drive 2
Size: 6 GB
2 partitions
swap 500 meg
Classic remaining
Volume format: Mac OS Extended (HFS+)
I put classic on this drives partition because I rarely use it so most of the time the drive is free to run as swap only.

as you can see from above
classic, OS X, Users, swap all have their own partitions.

I hope this helps a bit
cheers
Reply With Quote
  #4  
Old October 7th, 2001, 10:03 PM
Registered User
 
Join Date: Feb 2001
Location: San Francisco
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
sinebubble is on a distinguished road
Swap Partition

You know, if you think about the geometry of a disk, it seems to me that it would make sense to put your swap partition on the first cylinders. Most people do not fill up even 25% of their disk, so the heads spend most of their time in that particular portion of the disk. Putting your swap on the outside cylinders means the arms have to sweep across the disk to access swap and then back to read data.

Thoughts?
__________________
G3 500MHz Pismo
UltraSPARCII 500MHz Netra
Reply With Quote
  #5  
Old October 8th, 2001, 12:49 AM
efoivx's Avatar
Registered User
 
Join Date: Aug 2001
Location: NYC
Posts: 145
Thanks: 0
Thanked 0 Times in 0 Posts
efoivx is on a distinguished road
Quote:
it seems to me that it would make sense to put your swap partition on the first cylinders. Most people do not fill up even 25% of their disk, so the heads spend most of their time in that particular portion of the disk. Putting your swap on the outside cylinders means the arms have to sweep across the disk to access swap and then back to read data.
To a minor point I would have to agree to this... Though the speeds that drives run at these days it would be minor but it is still related as to why you would use a separate partition or drive.

I do want to mention that 10.1 has made amazing strives to cut down on the need for VM. only in extreme low ram situations does it dip into this and I am sure that it will get better and better yet to come.

also one other thing I fail to mention earlier... If you DO decide to move your swap you will need to redo the /etc/rc edits every time you upgrade your OS.
So if your not into tinkering this could be a reason not to bother. Further if your machine has 64 megs of ram to 128 megs of ram you will not be able to avoid using the swap and in machines like this no matter how or where you place the swap you will not see dramatic speed improvements. Just a little more to think about.

Cheers
Reply With Quote
  #6  
Old October 8th, 2001, 02:40 AM
Registered User
 
Join Date: Sep 2001
Location: Tokyo, Japan
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
legacyb4 is on a distinguished road
Re: Swap Partition

I'm all for adding a cheap IDE multi-gig drive and setting aside a portion exclusively fo swap.

Can you refresh my memory on which partition is considered "inside" versus "outside" when looking at it through the Disk Utility? When you specify 2 or more partitions and looking at the "Untitled 1", "Untitled 2", etc., what is the correct order?

Cheers.

Quote:
Originally posted by sinebubble
You know, if you think about the geometry of a disk, it seems to me that it would make sense to put your swap partition on the first cylinders. Most people do not fill up even 25% of their disk, so the heads spend most of their time in that particular portion of the disk. Putting your swap on the outside cylinders means the arms have to sweep across the disk to access swap and then back to read data.

Thoughts?
__________________
Macbook (Black) C2D/120GB/2GB | G5/1.6 250GBx2/1.25GB
Free Mobile Phone Ringtone, Application, & Screensaver Uploader
Reply With Quote
  #7  
Old October 9th, 2001, 12:58 AM
Registered User
 
Join Date: Feb 2001
Location: San Francisco
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
sinebubble is on a distinguished road
Inside vs. Outside

Well, I'm a Solaris eng., so I'm used to laying out my disks with a little more control. The Disk Utility doesn't give you fine control of your disks. I'm working on the assumption that the first partition will be closer to the inner part of the disk and more partitions will be in the outer.
__________________
G3 500MHz Pismo
UltraSPARCII 500MHz Netra
Reply With Quote
  #8  
Old October 9th, 2001, 01:25 AM
Solaris's Avatar
Official something...
 
Join Date: Mar 2001
Posts: 117
Thanks: 0
Thanked 0 Times in 0 Posts
Solaris is on a distinguished road
Put the swap on the outside of the disk. This part of the disk spins faster than the inside, speeding up swapping

Does 10.1 have something similar to the format utility in Solaris where you can define partitions by cylinder?
__________________
Soon to be...
Dual 2 GHz PowerMac G5
512 MB RAM
2 x 250 GB
ATI Radeon 9800
23" Cinema Display
My $0.02 will be about all I have left!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Authoritative Partitioning Discussion mr. k Mac OS X System & Mac Software 13 November 11th, 2003 06:26 PM
I installed Fink under root and..... Hydroglow Unix & X11 5 November 27th, 2002 03:57 PM
How to compile stuff fintler Unix & X11 1 August 28th, 2002 07:57 AM
vignette client on mac os x erim Software Programming & Web Scripting 8 July 13th, 2001 01:14 PM
HOWTO - swap partition for OS X a1291762 Mac OS X System & Mac Software 6 April 19th, 2001 04:25 PM


All times are GMT -5. The time now is 11:05 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.