Re: Where do you put your swap partition?
On Fri, Jan 18, 2008 at 02:18:50PM -0800, tofu.oni@gmail.com wrote:
> Just kidding. My actual question is, should I put any thought into
> where on the disk I place the swap partition? At the beginning of the
> disk? At the end? I thought it might be best to have it at the
> beginning, immediately followed by root, and with other partitions
> after that. My thinking was that most reads and writes would occur in
> root - and probably near the start of the root partition. So having
> the swap partition close by would reduce seek time by a couple of pico
> seconds - which should translate to thousands of nanocents per year.
>
I think that with modern disks and bad block replacment, you can't place
blocks at the "beginning" or "end" in a physical sense.
At best, assuming that the head doesn't have to seek, the data flow from
the drive is, what, 40 MB/s? Compare that with the speed of memory and
the placment on the drive is meaningless. If you use swap that much,
add more ram.
I have my swap on an encrypted LV on raid1. I have /tmp as tmpfs.
There should be very few writes to the root fs, but lots of reads from
/lib (and /usr/lib). Reads from /usr can be quits slow and still be
acceptable, just look at the performance of live CDs.
Doug.
Reply to: