Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2006
    Western Europe

    Question Where to put swap physically on sata2

    I want my swap to be the fastest as possible.
    So I'm going to put it on the outer tracks of my sata2 hdd.
    But how do I do this in practice: how do I have to partition my hdd?
    My sata2 hdd has 250GB, so are the 'outer' tracks the ones around 0 to 10 GB or are they the ones around 240 to 250 GB?

  2. #2
    Linux Engineer valemon's Avatar
    Join Date
    Oct 2006
    I don't think it will make any difference putting the swap somewere specific. Anyway, most of the time you are not going to use much of your swap. Check this thread for more information
    Linux is like a Teepee, No Windows, No Gates, Only Apache Inside!
    Arch Linux
    Linux user #442041

  3. #3
    Just Joined!
    Join Date
    May 2006
    Western Europe

    Question it can make a big difference though

    Well, actually it can make a BIG difference, I read some hdd-reports discussing
    the read/write speed of inner or outer tracks. Turns out that outer tracks can be
    read/written much faster than inner tracks. So my question remains: where do I put my swap partition: last or first in the partition table of my hdd?

  4. $spacer_open
  5. #4
    I am 99% sure that data is physically written from the outside in (as opposed to CDs which write from the inside out). The file allocation table is always stored on track 0 which is at the outside of the disk, and the tracks increase in number as you move towards the centre.

    Most Linux partition managers I have used have the option to specify the start/finish number of tracks/cylinders as well as the physical size in MB. So from that I assume that if you make /swap the first partition then it will be at the outside.

    The only two reasons I can think of that the outside would be faster are:
    • hard drives spin at a constant speed, so if the circumference at the outside is double the inside it can read twice as much data per revolution
    • the heads sit at the outside of the disk, so they have less far to travel on a request for data

    The second reason I think would make a negligable difference to practical applications, but the first could be plausible. I am curious where you read the reports. Were they online? If so, can you link them?

  6. #5
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    the hills
    The problem is that nowadays, drives have become so big that the
    reported logical dimensions of a hard drive are fictional. Theoretically,
    the beginning of the disk would be the outer tracks, and thus faster.
    Make the swap partition the first partition on the disk. Now, if the firmware
    on the drive controller is lying, and this doesn't put this partition physically
    at the beginning of the disk, there's little you can do. Back in the day of two, three
    hundred meg drives you had true CHS geometry and you knew where each
    sector sat on the platters. Now, the controller just gives you a logical sequence of
    sectors. Where they actually reside is none of your, or the operating system's

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts