[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Computing speed depends on location of swap partition??



Sundeep Holani wrote,
>    Due to some docs that I was reading I came across an interesting (and
>obvious) fact that computer speeds could be higher if data is being accessed
>from multiple disks in parallel. In this context , and in the situation that
>I have 2 hard-disks , would it not boost system speeds if the swap partition
>was on the disk other than the one containing the native Linux partitions?
>The reason why I think the answer should not be very obvious (to me) is
>because I have in mind the way data is multiplexed with the single system
>bus architecture , thus allowing only one disk (or device for that matter)
>to output on the system bus at any given time. I perhaps am not being to
>explain my confusion , and thats because I am very confused . And if the
>above proposal could work , does it not make sense to place the swap
>partition on the newer-faster-more_cache disk and the main partitions on the
>other , or is it the other way round?? I was wondering if somebody could
>work out a all-win partitioning scheme for my following setup..
>Hard-disks -- 1) segate 2.1 gb , slow , 128 kb cache  , 2) samsung 4.3gb ,
>faster , 300 odd kb cache .
>Required SW..
>Linux ofcourse... (should get main attention in performance gain..)
>win-98 , win-nt-4 .


	Theoretically, using multiple disks will give you a increase in
performance. But you have harddisks of different speeds. You might get
best performance if you put all your linux partitions into your 4.3GB
disk.

	There exists a technique called RAID (Redundant Array on Inexpensive
Disks) in which many small capacity drives are used to replace a
single large capacity drives. This technique is mainly meant to
increase the reliability of secondary storage. But it is true that
data transfer rate also increases (at least in some configurations).

	But RAID is implemented using separate hardware. Problems like the
'bus being busy' need not exist, since the RAID controller acts as an
interface the the PC bus and the RAID disks.

	Linux has software RAID drivers which is supposed to do the job of a
hardware RAID controller. These RAID drivers are 100% software and 0%
hardware. I personally don't think using them will give you much
increase in speed, but they sure can increase the reliability of
stored data. RAID drivers have to be included at compile time. Redhat
Linux comes with a package called 'raidtools', which is needed if you
plan to use RAID. (Before you use RAID, do note that RAID disks,
cannot be used as standalone disks, since data is stored in a
different format. You will have to backup your data and re-format, if
you ever stop using RAID.)

	If you are reluctant to use RAID then maybe you should try using two
swap areas, each on different disks. If the two swaps are turned on
with equal priority, then the kernel uses both the swaps concurrently,
leading to increase in performance. (But such a scheme requires
precious CPU resources to decide which parts of memory should go to
which swap area. The extra CPU usage might prevent you from seeing a
increase in performance.) Again two disks of equal performance might
be preferable.

Thank You

- -- 
Manoj Victor Mathew


- --------------------------------------------------------------------
For more information on Linux in India visit http://www.linux-india.org/

------------------------------