Messages in this thread | | | Date | Tue, 10 Aug 1999 23:39:17 +0200 (CEST) | From | Rik van Riel <> | Subject | Re: [Linux-Perf] Re: Questions regarding Linux swapping. |
| |
On Mon, 2 Aug 1999, Rogier Wolff wrote: > linuxkernel@NewMail.Net wrote: > > Should I set up swap-areas on each of the disks?
It depends. Usually you will want to have all your libraries and demand paged executables on a disk without swap, but YMMV.
As a general rule of thumb, you will want to swap to all of your disks, except the one that sees the most filesystem activity.
> > What is the performance difference between swap-file > > and swap-partition? > > Small. A little CPU-overhead. Swapping involves IO and that's much > slower than the CPU anyway.
Only, the kernel does much better I/O clustering with swap partitions than with swap files, so there could be quite a difference.
> > Some says putting swap-partitions in the outter-rings of the disks, > > some says inner-rings, while others say somewhere in the middle. > > Depends if you're going to use them. The outer tracks are the fastest. > You might want to reserve them for your root filesystem which you > actually use, or you might want to decide that you're going to swap on > a regular basis, and want that extra juice out of the swap partition.
Actually. The outer tracks make the most sense for the data that you're going to read in a huge scoop.
Seek-intensive stuff like swap, / (mostly demand paged) and /var are best placed in the _middle_ tracks where seek times are the best and transfer is reasonably good as well.
> > I am confused. > > > > Which one is correct?
Get used to the confusion. There is no single correct configuration :)
> I still recommend the archaic rule-of-thumb: Twice as much swap as > physical RAM. Why? RAM is many times more expensive as disk.
Good reason.
> But with current RAM-sizes you might never touch your swap. In that > case, you're better off finding some use for those faster tracks. If > on the other hand, you're poor, and can't pay for the extra RAM, or > are regularly handling extremely large data-sets, then putting it > at the beginning (outer tracks) will help.
This one is slightly worse, however. The outer tracks are best used for the data being read in. Swap should, in this case, reside in the _middle_ of the disk where average seek times are the lowest.
cheers,
Rik -- The Internet is not a network of computers. It is a network of people. That is it's real strength. -- work at: http://www.reseau.nl/ home at: http://www.nl.linux.org/~riel/
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |