Sign in with
Sign up | Sign in
Your question

Swap File placement? Partition placement?

Last response: in Storage
Share
April 17, 2002 5:57:05 PM

Ok.. I have read that it is a good idea to put your Windows swap file on a different hard drive that isn't accessed that often to get optimal performance. I have also heard it is good to locate the swapfile on the outer portion of a hard drive as it provides better performance.

Putting these 2 ideas together, I basically would want to create a small partition - on the outer portion of the drive - for just the swap file on a second hard drive... with the rest of that hard drive being another partition for file storage or whatever.

Therefore the big question is:

How do I know where the partitions will be placed on a hard drive when I create them? How can I ensure that the small 'swap file' partition is placed on the outer portion of a hard disk?

Maybe there is some standard logic that the partitions are created in order from the outside to the inside of the drive or something? Anyone know the answer?

<font color=green><b>More salt than just a grain you will need with posts of mine. - Yoda</b></font color=green>
April 17, 2002 6:27:26 PM

It should be placed (if possible) on the most used partition of the least used drive.

Ideally you would create a fixed size swapfile which would never need to be adjusted, and place it on for example D: and after a defrag, you're set.

<b><font color=blue>~ What do you mean "It isn't working!"...Now where's my sonic screwdriver? ~ </font color=blue></b>
April 18, 2002 3:35:16 AM

Modern HDDs are written from outside to inside.

I am also very much against past cluster size minimization schemes for multiple partitions on workstations. With an adequate configuration, you should be using a single partition (RAID or single drive) except in extremely rare cases. Data should be partitioned into separate folders - this is a much more efficient use of the space. If you had unlimited funds I might consider suggesting multiple RAID arrays for exceptional cases.

I usually recommend getting enough RAM so that swap file issues just don't really exist. Then set your swapfile to a static size - Maximum & Minimum as 100MB more than total RAM is a good start. Then use a single partition that you keep defragged. If you set the swapfile to zero, defrag, and then recreate a new swapfile with set maximums and minimums it will never get fragemented.

If you can't afford the RAM, then on install create a 500-1000MB partition as the first partition for the swap file. Then install the OS to the second partition. The initial boot files will be installed to the first partition, but the OS will be installed to the second. The real problem with this is that your OS will be on the "D:" drive. Many apps try to install files to the "C:" drive and you'll have to constantly watch it. A work around to get the second partition to be the C: drive is to create the first partition during the install, then create the second. Before installing to the second, delete the first. The second partition will be set to drive "C:" but you may have to do a little finessing to get it to boot at first. Try creating a boot floppy (ERD). Another method for accomplishing this is to use Partition Magic to move the system partition from the beginning of the disk to the end after you finish installing.

After the OS is installed you can then create a partition in the unused first area, format it, assign it a drive letter, copy the boot files to it, and move your swapfile to it.

This is a little complicated, but if you really want the ultimate in swapfile performance, the best idea is to just buy more RAM and set the swapfile as static on the same partition as the OS or on a different drive altogether.

I thought a thought, but the thought I thought wasn't the thought I thought I had thought.
Related resources
April 19, 2002 3:29:19 AM

Quote:
Modern HDDs are written from outside to inside.

That means older drives are written the other way around?

So when you partition, the first partitions is on the outer part of the disk instead of the inner part for modern drives?

:eek:  :frown: :mad:  :eek:  :redface: :cool: :lol:  :tongue: :wink: - What do you want to feel today? :) 
April 19, 2002 10:18:13 PM

Yes, the first partition is on the outer part (the faster part) of the disk for current HDDs and they are written from the outside to the inside.

Older HDDs used to use the same number of sectors per cylinder, so the sectors used to get larger as you moved away from the center of the disk (like pizza slices). Modern HDDs use same-size sectors over the entire surface of the disk, so the density increases the farther out on the disk you are. This mean that more sectors pass under the read/write heads per revolution at the outer reaches of an HDD platter. So, the outer edge of the disk is the fastest part of the disk.

CD-ROM drives are similar except that they are written in a spiral as opposed to cylinders and they are written from inside to outside. They used to be read in CAV (constant angular velocity) which means that the drive used to spin slower the farther out they got to keep the read speed the same - this is still true for CD writing and for playing music. Writing must stay at a constant speed (8x, 12x, etc.) and music playing needs constant 1x playback. With data discs, the maximum read speed is usually desired, so the CD-ROM will spin at its maximum RPM regardless. In other words, with a modern CD-ROM drive, the read speed gets faster toward the outside of the disk - like an HDD, except that the outside is the last part of the CD-ROM. This is why they are rated as YYx "Max" speed (i.e. 52x <i>max</i>). The "max" speed is how fast it is on the outer part of the disk. Check the spec's of your CD-ROM to find out what it's max inside read speed is (usually about 1/3 to 1/2 of the max outside speed due to pi and all).

I thought a thought, but the thought I thought wasn't the thought I thought I had thought.
!